hello-daisy
Rust starter project for the @electro-smith Daisy Seed.
Dependencies
Install arm target for Daisy
rustup target add thumbv7em-none-eabihf
Install gdb
# install via macports (TODO homebrew, linux, windows)
sudo port install arm-none-eabi-gdb
Install openocd
Install from source or get it from: https://xpack.github.io/openocd/install/
Generate project
cargo install cargo-generate
cargo generate \
--git https://github.com/antoinevg/hello-daisy \
--name your-project-name
Flash and run
-
Plug a 2x10 mini adapter into the Daisy Seed with the red stripe facing up towards the white stripe.
-
Connect the other end to a ST-Link or similiar programmer.
-
Start openocd in one terminal:
cd /path/to/{{project-name}} /path/to/openocd
-
Run program in another terminal:
cd /path/to/{{project-name}} cargo build # some programmers may need you to hit the reset button on the Daisy Seed at this point cargo run
ITM logging support (optional)
-
Enable the
"log-itm"
feature for thedaisy_bsp
create inCargo.toml
:daisy_bsp = { version = "0.3.0", features = ["log-itm"] }
-
Edit the following files to enable ITM support:
openocd.cfg
openocd.gdb
-
Then run:
touch /tmp/itm.fifo itmdump -F -f /tmp/itm.fifo
More information: https://github.com/stm32-rs/stm32h7xx-hal/blob/master/examples/ITM.md
Discussion
https://forum.electro-smith.com/t/rust-starter-for-daisy-seed/