RMK supports nice!nano as well as any custom nrf52840 board you have.
nice!nano has a bootloader built-in, which supports UF2 firmware format. That means you don't need any debug probe to flash your firmware.
If you're using nice!nano, there are steps of how to get .UF2 firmware of RMK:
-
Get
cargo-binutil
tool:cargo install cargo-binutils rustup component add llvm-tools
-
Compile RMK using
cargo objcopy
, get .bin firmware:cargo objcopy --release -- -O binary rmk-52840.bin
-
Download uf2util from UF2 repo https://github.com/microsoft/uf2
git clone https://github.com/microsoft/uf2.git cd uf2/utils
-
Convert your .hex firmware to uf2 format
# If your nice!nano uses softdevice v6.x.x python uf2conv.py <PATH_TO_YOUR_HEX_FIRMWARE> -c -b 0x26000 -f 0xADA52840 -o rmk-52840.uf2 # If your nice!nano uses softdevice v7.x.x python uf2conv.py <PATH_TO_YOUR_HEX_FIRMWARE> -c -b 0x27000 -f 0xADA52840 -o rmk-52840.uf2
-
Flash
Set your nice!nano to bootloader mode, a USB drive will show. Just drag the .uf2 firmware to USB drive. RMK will be automatically flashed. Check nice!nano's document: https://nicekeyboards.com/docs/nice-nano/getting-started#flashing-firmware-and-bootloaders.
Note that RMK will switch to USB mode if an USB cable is connected. Remember to remove USB cable after flashing!
You can also check the instruction here for more info about nice!nano.
With a debug probe, you can have the full control of you hardware. To use RMK you should have nrf s140 softdevice 7.3.0 flashed to nrf52840 first.
The following are the detailed steps for flashing both nrf's softdevice and RMK firmware:
- Enter example folder:
cd examples/use_rust/nrf52840_ble
- Erase the flash:
probe-rs erase --chip nrf52840_xxAA
- Flash softdevice firmware to flash:
probe-rs download --verify --format hex --chip nRF52840_xxAA s140_nrf52_7.3.0_softdevice.hex
- Compile, flash and run the example
cargo run --release