Keyboard firmware update (on Windows)
Flashing the Pro Micro is quite easy once you have your development environment set up. Make sure you follow the steps in this QMK guide and you have all the necessary softwares and drivers on your machine.
If you've already gone through this process earlier, you only have to do the actual writing of the firmware (or maybe some updating):
Updating the local building environment (optional)
- git pull
- make git-submodule
Issue these two commands to update your local building environment. You can do this regularly or if something behaved differently than expected based on the documentation.
Compiling the .hex file:
- Edit the files in qmk if needed: msys64/home/user/qmk_firmware/keyboards/your_keyboard
- edit the keymap.c file in msys64/home/user/qmk_firmware/keyboards/your_keyboard/keymaps/default/
- Open msys2 and type:
- Run the command:
qmk compile -kb:your_keyboard -km defaultin QMK MSYS or
make your_keyboard:default:avrdudein MSYS
- Open device manager (and keep it open) to follow how the Pro Micro is recognized. Its name and port number will change depending on if it's in bootloader mode, and you need this port number for avrdude to write the microcontroller.
- Reset your board: soft reset (press the dedicated key combo) or hard reset (by shorting RST and GND).
- Look for the new port number in device manager under ports. COM7 for me this time.
- Open avrdude (or avrdudess).
- Input/construct the following command with the the proper COM number from Device Manager (but don’t run the command yet):
- Reset your board again.
- You have 8 seconds to run the above command.
This compiles the hex file and attempts to flash the controller with avrdude.
If you don't want to write the controller, just compile the file, you can run the command:
(This can take some time. For me it goes unresponsive for 2 minutes before starting the compilation. Also, flashing sometimes fails even when the hex file is created successfully.)
Flashing the Pro Micro:
If you want to flash the controller with an existing hex file, here are the steps:
avrdude.exe -c avr109 -p m32u4 -P COM4 -b 57600 -D -U flash:w:"C:\mykb.hex":i
Well done! (Hopefully without any errors.) Try your keyboard with the brand new firmware.