$ rustup update
$ rustup default nightly
Add Cortex-M target by rustup.
// NUCLEO-F401RE(STM32F401 MCU) is Cortex-M4 with FPU (ARMv7E-M)
$ rustup target add thumbv7em-none-eabihf
$ cargo build --target thumbv7em-none-eabihf
=> firmware file: target/thumbv7em-none-eabihf/debug/nucleo-f401re_led_blink is out.
$ openocd -f board/st_nucleo_f4.cfg
Open another terminal, and execute telnet.
$ telnet localhost 4444
> reset halt
> flash write_image erase $(absolute_path_to_firmware)
> reset
Blink LED!