If you don't have rustup installed yet, follow the instructions on the rustup.rs site
rustup default stable
rustup target add thumbv7em-none-eabihf
rustup component add llvm-tools-previewIf you don't have VS Code installed yet, follow the instructions on the code.visualstudio.com site
Install plugins:
code --install-extension matklad.rust-analyzer
code --install-extension bungcip.better-toml
code --install-extension marus25.cortex-debugcargo install cargo-generate cargo-binutils probe-run cargo-embed uf2convcargo generate gh:amperka/iskrajs-rust-templateIn the root of the generated project.
cargo build --releaseIn the root of the generated project.
To build and flash using uf2 bootloader, use:
# for Windows or MacOS
cargo objcopy --release -- -O binary ./target/iskrajs.bin
uf2conv ./target/iskrajs.bin --base 0x08008000 --family 0x57755a57 --output iskrajs.uf2
# copy iskrajs.uf2 file to IskraJSBOOT or IskraJSMini disk
# for Linux
sh ./load.shTo build and flash using debugger, use:
cargo embed --release