Flashing an ATMega for a Mysterium

Recently, one of my friends has been making a mechanical keyboard based off the Mysterium, which uses a raw ATMega32u4, instead of the more common Pro Micro or similar microcontroller. This takes a couple of steps to flash, which are documented below (because I've forgotten and been stuck on these a couple of times).

  1. Clone USBaspLoader
  2. Edit Makefile.inc and set DEVICE = atmega32, or whatever microcontroller you have.
  3. Connect an ICSP programmer to the ICSP headers.
  4. Run make fuse to set the fuses (!!!).
  5. Run make flash to flash the bootloader.[1]

You should now be able to flash the keyboard through qmk as normal.


[1]I'm not sure if this is actually necessary or if you can just flash through qmk now, but it probably can't hurt.