elf2uf2-rs
is configured as the default runner, since the kb2040 does not expose any debugging
pins on the rp2040.
To flash the right half:
- With the kb2040 in boot mode: (hold BOOT button, press RESET button, then release BOOT button)
cargo run --release
To flash the left half:
- With the kb2040 in boot mode:
cargo run --release --features=left-kb
-
The standard Rust tooling (cargo, rustup) which you can install from https://rustup.rs/
-
Toolchain support for the cortex-m0+ processors in the rp2040 (thumbv6m-none-eabi)
rustup target install thumbv6m-none-eabi
cargo install elf2uf2-rs --locked
If you don't have a debug probe or if you want to do interactive debugging you can set up an alternative runner for cargo.
Some of the options for your runner
are listed below:
-
Loading a UF2 over USB
Step 1 - Installelf2uf2-rs
:$ cargo install elf2uf2-rs --locked
Step 2 - Make sure your .cargo/config contains the following
[target.thumbv6m-none-eabi] runner = "elf2uf2-rs -d"
The
thumbv6m-none-eabi
target may be replaced by the all-Arm wildcard'cfg(all(target_arch = "arm", target_os = "none"))'
.Step 3 - Boot your RP2040 into "USB Bootloader mode", typically by rebooting whilst holding some kind of "Boot Select" button. On Linux, you will also need to 'mount' the device, like you would a USB Thumb Drive.
Step 4 - Use
cargo run
, which will compile the code and started the specified 'runner'. As the 'runner' is the elf2uf2-rs tool, it will build a UF2 file and copy it to your RP2040.
The contents of this repository are dual-licensed under the MIT OR Apache
2.0 License. That means you can chose either the MIT licence or the
Apache-2.0 licence when you re-use this code. See MIT
or APACHE2.0
for more
information on each specific licence.
Any submissions to this project (e.g. as Pull Requests) must be made available under these terms.
This project was generated with https://github.com/rp-rs/rp2040-project-template