STM32 bare metal programming in rust as per guide Embedded Rust
- cargo binutils
$ cargo install cargo-binutils
$ rustup component add llvm-tools-preview
- arm-none-eabi-gdb
- openocd
- qemu add to path env
- STLink USB driver
default compilation target defined in .cargo/config.toml
$ rustup target add thumbv7m-none-eabi
$ cargo build --target thumbv7m-none-eabi
$ cargo build --target thumbv7m-none-eabi
$ cargo readobj --target thumbv7m-none-eabi --bin stm32-bare-metal-rust -- --file-headers
$ qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel target/thumbv7m-none-eabi/debug/stm32-bare-metal-rust
$ qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -gdb tcp::3333 -S -kernel target/thumbv7m-none-eabi/debug/stm32-bare-metal-rust
$ arm-none-eabi-gdb -q target/thumbv7m-none-eabi/debug/stm32-bare-metal-rust