Open mtthw-meyer opened 3 years ago
a template for cargo-generate could be nice
I'm working on this. Trying to base it off of https://github.com/rust-embedded/cortex-m-quickstart
Two questions here:
main.rs
should do? My current idea is just to fill it with blinky.rs
.Yes, we'll find a place to put it if you get something working. Any of the examples would be a reasonable base for main.rs, blinky is fine.
OK, got it running: https://github.com/Spstolar/libdaisy-rust-quickstart . The steps for use are in the README, which can be cleaned up more if needed.
Assuming cargo-generate and the other precursor steps are done
cargo generate --git https://github.com/Spstolar/libdaisy-rust-quickstart
cargo objcopy --release -- -O binary template.bin
dfu-util -a 0 -s 0x08000000:leave -D template.bin
When creating a new libdaisy-rust project you'll need to copy or create your own memory.x and .cargo/config files to tell the compiler how to build the binary image.