No description
| src | ||
| build.rs | ||
| Cargo.toml | ||
| memory-m0.x | ||
| memory.x | ||
| openocd.cfg | ||
| README.md | ||
| RUSTROVER_SETUP.md | ||
Infineon Traveo II Rust Project
This project is configured for developing applications on Infineon Traveo II microcontrollers using Rust.
Prerequisites
Required Tools
-
Rust Toolchain
rustup target add thumbv6m-none-eabi thumbv7em-none-eabi rustup component add rust-src -
GNU Arm Embedded Toolchain
- Download from: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
- Install to:
C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\ - Add to PATH environment variable
-
OpenOCD
- Download from: http://openocd.org/
- Ensure
openocd.exeis in your PATH
-
VSCode Extensions
- Cortex-Debug (marus25.cortex-debug)
- Rust Analyzer (rust-lang.rust-analyzer)
Supported Devices
- Cortex-M7 devices: CYT4BF, CYT4DN series
- Cortex-M0+ devices: CYT2B7, CYT2B9 series
Project Structure
├── .vscode/
│ ├── launch.json # Debug configurations
│ └── tasks.json # Build tasks
├── src/
│ └── main.rs # Application entry point
├── memory.x # Memory configuration (Cortex-M7)
├── memory-m0.x # Memory configuration (Cortex-M0+)
├── build.rs # Build script
├── openocd.cfg # OpenOCD configuration
├── traveo-cyt4bf.cfg # CYT4BF target config
├── traveo-cyt2b7.cfg # CYT2B7 target config
└── Cargo.toml # Project configuration
Building
For Cortex-M7 devices (CYT4BF, CYT4DN)
cargo build --target thumbv7em-none-eabi --features traveo-cyt4bf
For Cortex-M0+ devices (CYT2B7, CYT2B9)
cargo build --target thumbv6m-none-eabi --features traveo-cyt2b7
Release builds
cargo build --release --target thumbv7em-none-eabi --features traveo-cyt4bf
Debugging
- Connect your Traveo II development board
- Start OpenOCD:
openocd -f openocd.cfg -f traveo-cyt4bf.cfg - In VSCode, use
F5or go to Run and Debug panel - Select the appropriate debug configuration:
- "Debug Traveo (Cortex-M7)" for CYT4BF/CYT4DN
- "Debug Traveo (Cortex-M0+)" for CYT2B7/CYT2B9
Memory Configuration
- Cortex-M7: 6MB Flash, 512KB RAM, 64KB TCM
- Cortex-M0+: 2MB Flash, 256KB RAM
Troubleshooting
- OpenOCD not found: Ensure OpenOCD is installed and in your PATH
- Target not found: Check that your development board is connected and powered
- Build errors: Make sure you have the correct target and features selected
Development Tips
- Use
panic-haltfor production code (default) - Use
semihostingfeature for debugging output during development - Memory regions can be customized in
memory.xandmemory-m0.xfiles - Add device-specific configurations in the respective
.cfgfiles
Next Steps
- Update the memory configurations for your specific device
- Add device-specific HAL code in
src/main.rs - Configure OpenOCD for your specific development board
- Add any additional dependencies needed for your application