Bootloaders & QMK

Here are some important things I was unfortunate enough to have to learn about bootloaders during my stay in firmware hell. Had I learned these earlier, I could have averted many days of weeping forlornly into a rat’s nest of jumper cables and toolchain manuals.

I initially made the fatal mistake of assuming that the .hex files I was compiling with QMK should all be written directly with avrdude for my purposes. This is not the case.

Bootloader basics

ISP basics

Flashing with QMK toolchain

In summary, just because a .hex file can be flashed through QMK and the firmware works doesn’t mean that .hex file is safe to flash directly with an ISP programmer.

Excuse me, “theoretically” doesn’t delete itself??

According to QMK contributors, there are a lot of ways for the Caterina bootloader to accidentally brick itself. One of the more common problems is that if you try to send it a .hex file that is larger than the available space, it will just overwrite itself.

Despite these massive flaws, Caterina is frequently encountered and shipped with Pro Micros because it does not require special drivers on Windows, while DFU does.

The DFU bootloader has better safeguards against this kind of accidental overwrite.