RMK
Keyboard firmware written in Rust. Tested on STM32.
Prerequisites
This crate requires nightly Rust. openocd is used for flashing & debugging.
Usage
An example can be found at boards/stm32h7. The following is a simple step-to-step instruction for creating your own firmware:
- Create a rust embedded project, Add rmk to your project
- Choose your target. For stm32h7, you can use
rustup target add thumbv7em-none-eabihf - Create
.cargo/config.tomlin your project's root, specify your target. Seeboards/stm32h7/.cargo/config.toml - Create
main.rs, initialize your MCU in rtic'smod app, create usb polling task and keyboard task. Seeboards/stm32h7/src/main.rs
Compile
Just run
cargo build
# Check binary size after build
cargo size
Flash
Requires openocd.
VSCode: Press F5, the firmware will be automatically compiled and flashed. A debug session is started after flashing. Check .vscode/tasks.json for details.
Or you can do it manually using this command after compile:
openocd -f openocd.cfg -c "program target/thumbv7em-none-eabihf/debug/rmk-stm32h7 preverify verify reset exit"
TODOs
A lot of todos at the list, any contributions are welcomed :)
- basic keyboard functions
- system/media keys
- layer
- macro
- via/vial support
- encoder
- RGB
- cli