No description
Find a file
2025-10-02 19:28:58 +02:00
src Carry-over Infineon basis 2025-10-02 19:28:58 +02:00
build.rs Carry-over Infineon basis 2025-10-02 19:28:58 +02:00
Cargo.toml Carry-over Infineon basis 2025-10-02 19:28:58 +02:00
memory-m0.x Carry-over Infineon basis 2025-10-02 19:28:58 +02:00
memory.x Carry-over Infineon basis 2025-10-02 19:28:58 +02:00
openocd.cfg Carry-over Infineon basis 2025-10-02 19:28:58 +02:00
README.md Carry-over Infineon basis 2025-10-02 19:28:58 +02:00
RUSTROVER_SETUP.md Carry-over Infineon basis 2025-10-02 19:28:58 +02:00

Infineon Traveo II Rust Project

This project is configured for developing applications on Infineon Traveo II microcontrollers using Rust.

Prerequisites

Required Tools

  1. Rust Toolchain

    rustup target add thumbv6m-none-eabi thumbv7em-none-eabi
    rustup component add rust-src
    
  2. GNU Arm Embedded Toolchain

  3. OpenOCD

  4. 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

  1. Connect your Traveo II development board
  2. Start OpenOCD:
    openocd -f openocd.cfg -f traveo-cyt4bf.cfg
    
  3. In VSCode, use F5 or go to Run and Debug panel
  4. 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

  1. OpenOCD not found: Ensure OpenOCD is installed and in your PATH
  2. Target not found: Check that your development board is connected and powered
  3. Build errors: Make sure you have the correct target and features selected

Development Tips

  1. Use panic-halt for production code (default)
  2. Use semihosting feature for debugging output during development
  3. Memory regions can be customized in memory.x and memory-m0.x files
  4. Add device-specific configurations in the respective .cfg files

Next Steps

  1. Update the memory configurations for your specific device
  2. Add device-specific HAL code in src/main.rs
  3. Configure OpenOCD for your specific development board
  4. Add any additional dependencies needed for your application