Setting up a Project
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.
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:
- Does it matter what repository I'm storing it in? We'll just copy it over to a more official one if I get it working, right? I am working out of https://github.com/Spstolar/libdaisy-rust-quickstart right now.
- Do we have an idea for what
main.rsshould do? My current idea is just to fill it withblinky.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 - Then (if you're using dfu-util):
dfu-util -a 0 -s 0x08000000:leave -D template.bin