Rust embedded examples for STM32F407VET6 microcontroller.
This repository contains simple examples for STM32F407VET6 micro-controllers.
The board can be purchased from AliExpress for about 10$, click here
The above details have been picked up from here.
Reference Manual : click here
This code is to blink the D3 LED on the board.
To build the release binary :
cargo build --release --example leds
In one terminal start openocd :
openocd
In another terminal start setup gdb to run launch the application :
arm-none-eabi-gdb -x openocd.gdb target/thumbv7em-none-eabi/release/examples/leds
The code prints the button status onto the console via semihosting.
To build the release binary :
cargo build --release --example buttons
In one terminal start openocd :
openocd
In another terminal start setup gdb to run launch the application :
arm-none-eabi-gdb -x openocd.gdb target/thumbv7em-none-eabi/release/examples/buttons
This is a little more complicated and fun example. The board has 2 user buttons and 2 user LEDs. The code configures each button to trigger on being pressed, and the interrupt handler toggles a button.
To build the release binary :
cargo build --release --example leds
In one terminal start openocd :
openocd
In another terminal start setup gdb to run launch the application :
arm-none-eabi-gdb -x openocd.gdb target/thumbv7em-none-eabi/release/examples/leds
Note that the gdb configuration has been passed to gdb. But the application is not started on the board, run
continue
command in gdb to resume execution.
Licensed under the MIT License.