// TODO explain what does happens with Massdrop Loader
As an ISP Programmer, go with USBasp or a USBasp clone. Look for the following:
USBasp USBISP 3.3V / 5V AVR Programmer USB ATMEGA8
I bought this one:
If you go with a different ISP programmer, you will probably need to modify accordingly the avrdude
’s parameters.
sudo pacman --sync avrdude
Several bootloaders are available. I tried the following 2:
Download it from the repository https://github.com/Massdrop/mdloader:
The source code is available at:
Download it from
Documents -> Software
Unzip it. Then, use
ATMega32U4-usbdevice_dfu-1_0_0.hex
Disclaimer: I wasn’t able to make it work.
The keyboard needn’t be connected throught its USB cable. I’m not sure what would happen if the following steps are performed while the keyboard is connected. Disconnect it, just in case.
That’s the hardest part. I needed the 2 hands of a second person.
I used the following set of test leads
https://www.amazon.it/gp/product/B088LN43JT/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
which proved to be terrible.
// TODO add a photo of the TADA68 ISP’s pins // TODO add a photo of the test leads // TODO add a photo of the USBasp’s pins // TODO show the test leads claws // TODO explain how to get work around the claws
Run:
sudo avrdude -c USBasp -p atmega32u4 -U flash:w:mass_bootloader_tada68.hex
It all takes about 10 seconds.
After that, disconnect the ISP programmer, and connect the keyboard to the PC with the ordinary USB cable.
avrdude
has tons of parameters. We would use just 3 of them:
sudo avrdude -p {partno} -c {programmer} -U {config-file}
Parameter | Meaning | Value | Reference |
---|---|---|---|
-p |
partno: the chip part | atmega32u4 |
partno |
-c |
programmer-id | USBasp |
programmer-id |
-U |
memory operation | flash:w:${bootloaderHexFile} |
Memory operation |
partno
should be the chip name.
For TADA68 it should be:
ATmega32U4
which corresponds to
m32u4
This could be inferred from:
avrdude -p \? 2>&1| grep ATmega32U4
m32u4 = ATmega32U4
I made it work using USBasp
.
For what I got, a programmer is the electrical description of the ISP Programmer, including all its pins. Therefore, this parameter depends on the ISP programmer being used.
There is a large set rogrammers defined in /etc/avrdude.conf
. If your programmer is not included there, it can be defined in a custom configuration file, and passed to avrdude
via the -C
option.
This is the operation to perform, together with its parameters. It’s specified with the -U
option in avrdude
. I used:
-U flash:w:${bootloaderHexFile}`
where bootloaderHexFile
is the .hex
file downloded in Download a bootloader