Crates.io | rmk-rp2040 |
lib.rs | rmk-rp2040 |
version | 0.1.0 |
source | src |
created_at | 2024-01-18 13:01:24.772585 |
updated_at | 2024-01-18 13:01:24.772585 |
description | Keyboard firmware written in Rust |
homepage | https://github.com/haobogu/rmk |
repository | https://github.com/haobogu/rmk |
max_upload_size | |
id | 1104174 |
size | 2,010,308 |
Keyboard firmware for cortex-m, with layer/dynamic keymap/vial support, written in Rust and tested on stm32 and rp2040.
Rmk just released version 0.1.0, migrate to Embassy! By migrating to Embassy, Rmk now has better async support, supports more MCUs much easier APIs than before. For examples using Embassy, check boards
folder!
This crate requires nightly Rust. openocd
(stm32) or probe-rs
(rp2040) is used for flashing & debugging.
You can build your own keyboard firmware using RMK or try built-in firmware example for stm32h7 & rp2040.
Example can be found at boards
. The following is a simple
step-to-step instruction for creating your own firmware:
cargo add rmk
rustup target add <your-target-name>
to install the
target. Here is the doc for target choosing. For example,
rp2040 is Cortex-M0+, so its target is thumbv6m-none-eabi
..cargo/config.toml
in your project's root, specify your target here.
See boards/stm32h7/.cargo/config.toml
main.rs
, initialize your MCU in rtic's mod app
, create usb polling task and keyboard task.
See boards/stm32h7/src/main.rs
cargo install probe-rs --features cli
cd boards/rp2040
cargo build
cd boards/rp2040
cargo run
Install openocd
Build the firmware
cd boards/stm32h7
cargo build
Flash
openocd -f openocd.cfg -c "program target/thumbv7em-none-eabihf/debug/rmk-stm32h7 preverify verify reset exit"
(Optional) Debug firmware using CMSIS-DAP
Open the project using VSCode, press F5
, the firmware will be automatically compiled and flashed. A debug session is started after flashing.
Check .vscode/tasks.json
and .vscode/launch.json
for details.
A lot of todos at the list, any contributions are welcomed :)
Rmk is licensed under either of
at your option.