Skip to content

Developer Information

Nico edited this page Jan 24, 2015 · 19 revisions

How to compile the bootloader

You can compile the bootloader with a Raspberry Pi or with Ubuntu yourself. Everything you need is covered here (avr-gcc 4.7.2 and 4.8.1 as well!) See this tutorial on how to get the newer 4.8.1 for raspberry pi

HoodLoader2.0.3 compiles with 3958(+2 for Mega) bytes with avr-gcc 4.7.2 and with 3908(+2 for Mega) bytes with avr-gcc 4.8.1.

USB PID/VID

The HoodLoader2 itself uses the official Arduinos VID and PID. The HID Project and the board definition files uses a special PID but this has nothing to do with the bootloader itself.

#define LUFA_VID					0x03EB
#define LUFA_PID					0x204A

#define ARDUINO_VID					0x2341
#define ARDUINO_UNO_PID				0x0043 // R3 (0001 R1)
#define ARDUINO_MEGA_PID			0x0042 // R3 (0010 R1)
#define ARDUINO_MEGA_ADK_PID		0x0044 // R3 (003F R1)

HoodLoader2atmega16u2.vid.0=0x2341
HoodLoader2atmega16u2.pid.0=0x484C
HoodLoader2atmega32u2.pid.0=0x484D
HoodLoader2atmega8u2.pid.0=0x484E
HoodLoader2at90usb162.pid.0=0x484F

Changes to the Atmega Bootloader Programmer

To upload the HoodLoader2 I used a modification of Nick Gammon's Atmega Bootloader Programmer. Instructions can be found here.

One of the change was to add new bootloader files. You can convert your hex file as described with Nick's Lua script. One thing to add is the address of the 16u2 in the end_addresses array (line 16). The new .lua script is also in the repository now.

You need to download the MUSHclient as described in his instructions. He provides a simple, ready to use zip file.