mtthw-meyer / libdaisy-rust

Hardware Abstraction Layer implementation for Daisy boards
MIT License
47 stars 17 forks source link

Setting up a Project #22

Open mtthw-meyer opened 3 years ago

mtthw-meyer commented 3 years ago

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.

x37v commented 3 years ago

a template for cargo-generate could be nice

Spstolar commented 2 years ago

I'm working on this. Trying to base it off of https://github.com/rust-embedded/cortex-m-quickstart

Two questions here:

mtthw-meyer commented 2 years ago

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.

Spstolar commented 2 years ago

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

  1. cargo generate --git https://github.com/Spstolar/libdaisy-rust-quickstart
  2. cargo objcopy --release -- -O binary template.bin
  3. Then (if you're using dfu-util): dfu-util -a 0 -s 0x08000000:leave -D template.bin