Ever wanted to play tetris on a soldering iron? Me neither. Now you can do so anyways.
Install rustup, dfu-utils.
Add the target platform:
rustup target add riscv32imac-unknown-none-elf
Install cargo-binutils for cargo objcopy:
cargo install cargo-binutils
cargo build --release
Convert ELF to binary:
cargo objcopy --release -- -O binary app.bin
Flash:
sudo dfu-util -d 28e9:0189 -a 0 -D app.bin -s 0x08000000:leave
- Pinecil GD32VF103 RISC-V Rust Demos: https://github.com/alvinhochun/gd32vf103-pinecil-demo-rs
- Longan Nano Rust examples: https://github.com/riscv-rust/longan-nano/tree/master/examples
- The Embedded Rust Book: https://rust-embedded.github.io/book
- EXTI interrupt example: https://github.com/andelf/longan-nano-playground-rs/blob/master/examples/button.rs
embedded_graphics: https://docs.rs/embedded-graphics/latest/embedded_graphicsssd1306: https://docs.rs/ssd1306/latest/ssd1306gd32vf103-pac: https://docs.rs/gd32vf103-pac/0.4.0/gd32vf103_pacgd32vf103xx-hal: https://docs.rs/gd32vf103xx-hal/0.4.0/gd32vf103xx_halembedded-hal: https://docs.rs/embedded-hal/0.2.4/embedded_halbitvec: https://docs.rs/bitvec/latest/bitvecoorandom: https://docs.rs/oorandom/latest/oorandomheapless: https://docs.rs/heapless/latest/heaplessnumtoa: https://docs.rs/numtoa/latest/numtoa