FAQ
My matrix is row2col, the matrix doesn't work
RMK enables col2row as the default feature. To use the row2col matrix, you have to change your Cargo.toml, adds default-features = false to RMK crate, disabling the col2row feature. Note that you should enable other default features of RMK manually, such as col2row and storage after disabling default features.
If you're using the cloud compilation, you have to update your keyboard.toml, add row2col = true under the [matrix] section or [split.central.matrix] section:
Unable to find libclang
On some windows machines, you may get the following error when building the firmware:
That's because you don't have LLVM(Clang) installed, or the system doesn't know the path of installed LLVM(Clang). You can try solution here: https://rust-lang.github.io/rust-bindgen/requirements.html#windows
Where is my built firmware?
By default, the built firmware is at target/<TARGET>/<MODE> folder, where <TARGET> is your microcontroller's target and <MODE> is debug or release, depending on your build mode.
The firmware's name is your project name in Cargo.toml. It's actually an elf file, but without file extension.
I want hex/bin/uf2 file, how can I get it?
By default, Rust compiler generates elf file in target folder. There're a little extra steps for generating hex, bin or uf2 file.
-
hex/bin: To generatehex/binfile, you need cargo-binutils. You can useto install it. Then, you can use the following command to generate
hexorbinfirmware: -
uf2: RMK provides cargo-make config for all examples to generateuf2file automatically. CheckMakefile.tomlfiles in the example folders. The following command can be used to generate uf2 firmware:
I changed keymap in keyboard.toml, but the keyboard is not updated
RMK assumes that users change the keymap using vial. So reflashing the firmware won't change the keymap by default. For testing senario, RMK provides a config clear_storage under [storage] section, you can enable it to clear the storage when the keyboard boots.
Note that the storage will be clear EVERYTIME you reboot the keyboard.
rust-lld: error: section will not fit in region 'FLASH': overflowed by x bytes
This is because your MCU's flash is too small. Try building in release mode: cargo build --release. If the error still there, follow our binary size optimization doc to reduce your code size.
I can see a RMK Start log, but nothing else
First you need to check the RCC config of your board, make sure that the USB's clock is enabled and set to 48MHZ. For example, if you're using stm32f1, you can set the RCC as the following:
If the keyboard still doesn't work, enabling full logging trace at .cargo/config.toml:
run cargo clean and then cargo run --release. Open an issue with the detailed logs.
I see ERROR: Storage is full error in the log
By default, RMK uses only 2 sectors of your microcontroller's internal flash. You may get the following error if 2 sectors is not big enough to store all your keymaps:
If you have more sectors available in your internal flash, you can increase num_sectors in [storage] section of your keyboard.toml, or change storage_config in your RmkConfig if you're using Rust API.
OUTDATED: panicked at embassy-executor: task arena is full.
The current embassy requires manually setting of the task arena size. By default, RMK set's it to 32768 in all examples:
If you got ERROR panicked at 'embassy-executor: task arena is full. error after flashing to your MCU, that means that you should increase your embassy's task arena. Embassy has a series cargo features to do this, for example, changing task arena size to 65536:
In the latest git version of embassy, task arena size could be calculated automatically, but it requires nightly version of Rust.
If you're comfortable with nightly Rust, you can enable nightly feature of embassy-executor and remove task-arena-size-* feature.
What font is used for the RMK logo?
It's Honk.