Carry-over Infineon basis
This commit is contained in:
parent
7bdbb13177
commit
b2152284dd
8 changed files with 567 additions and 2 deletions
102
README.md
Normal file
102
README.md
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
# 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**
|
||||
```bash
|
||||
rustup target add thumbv6m-none-eabi thumbv7em-none-eabi
|
||||
rustup component add rust-src
|
||||
```
|
||||
|
||||
2. **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
|
||||
|
||||
3. **OpenOCD**
|
||||
- Download from: http://openocd.org/
|
||||
- Ensure `openocd.exe` is in your PATH
|
||||
|
||||
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)
|
||||
```bash
|
||||
cargo build --target thumbv7em-none-eabi --features traveo-cyt4bf
|
||||
```
|
||||
|
||||
### For Cortex-M0+ devices (CYT2B7, CYT2B9)
|
||||
```bash
|
||||
cargo build --target thumbv6m-none-eabi --features traveo-cyt2b7
|
||||
```
|
||||
|
||||
### Release builds
|
||||
```bash
|
||||
cargo build --release --target thumbv7em-none-eabi --features traveo-cyt4bf
|
||||
```
|
||||
|
||||
## Debugging
|
||||
|
||||
1. Connect your Traveo II development board
|
||||
2. Start OpenOCD:
|
||||
```bash
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue