r/Keychron • u/m147 • Jan 09 '24
V1 + QMK cli flashing
I'm having trouble flashing new changes to the keyboard. Here's what happens:
If I make a change to keymap.c in keyboards/keychron/v1/ansi_encoder/keymaps/<USER>/
compile with qmk compile and then flash with qmk flash
(I've got environment set up)
It will flash with no errors but the change won't be made.
If I then flash the stock firmware from Keychron from the official site and THEN flash my custom firmware the changes are made. I don't understand what is going on. It would be nice not having to flash two files in order to make changes. I understand I can do all this with VIA but I would like to understand qmk cli.
Any ideas?
Thanks for any help
View all comments
Show parent comment
2
u/PeterMortensenBlog V Jan 10 '24 edited Jan 10 '24
There is QMK keycode 'QK_BOOTLOADER': "Put the keyboard into bootloader mode for flashing"
And QMK keycode 'QK_CLEAR_EEPROM': "Reinitializes the keyboard's EEPROM (persistent memory)."
The Via configuration is stored in (emulated) EEPROM, so that ought to do it.
A macro (QMK or Via) with QK_CLEAR_EEPROM + QK_BOOTLOADER (perhaps a significant delay is needed between the two), assigned to a key on the Fn layer ought to be sufficient.