RMK Rust-based keyboard firmware Docker image and development container setup.
Open VS Code -> Ctrl+Shift+P → Dev Containers: Reopen in Container
# Inside the container...
cd example-nrf5840
# Build .hex firmware
cargo build --release
# or
rmkbuild
# Build .uf2 firmware
cargo make uf2 --release
# or
rmkuf2Update TARGET_ARCH and rebuild if your project uses a different MCU architecture, select your MCU target architecture and update the TARGET_ARCH value in devcontainer.json.
| TARGET_ARCH | MCU |
|---|---|
thumbv6m-none-eabi |
Cortex-M0, Cortex-M0+ |
thumbv7m-none-eabi |
Cortex-M3 |
thumbv7em-none-eabi |
Cortex-M4, Cortex-M7 (no FPU) |
thumbv7em-none-eabihf |
Cortex-M4F, Cortex-M7F (with FPU) |
thumbv8m.base-none-eabi |
Cortex-M23 |
thumbv8m.main-none-eabi |
Cortex-M33 (no FPU) |
thumbv8m.main-none-eabihf |
Cortex-M33 (with FPU) |
Inside the container:
rmkit initRefer to Local compilation: Create firmware project.
Build the Docker image:
docker build --build-arg TARGET_ARCH=thumbv7em-none-eabihf -t rmk-dev ./.devcontainer
# or
podman build --build-arg TARGET_ARCH=thumbv7em-none-eabihf -t rmk-dev ./.devcontainerBuild firmware directly:
podman run --rm \
-v "${PWD}:/workspace" \
-w /workspace \
rmk-dev \
bash -c "cd example-nrf52840 && cargo build --release"