This is the equivalent of a Hello, World! program for a small embedded system. It also illustrates how to configure a cargo workspace, which enables multiple modules for different hardware targets all in the same Git repository.
If you have a BBC Microbit v2 at hand, you can compile this code and flash your device:
./build.sh
./flash.shIf you don't have access to the hardware but wish to take some of the code for a spin, you may run the unit tests:
./unit_test.sh- BBC Microbit v2
- Rust edition 2021
- Rust
thumbv7em-none-eabihftoolchain (install withrustup target add thumbv7em-none-eabihf)
I like too use VS Code with rust-analyzer. I've gotten this to work with rust-analyzer with minimal changes. Amazingly, I can also run individual unit tests using rust-analyzer.
