-
-
Notifications
You must be signed in to change notification settings - Fork 183
Developer Information
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.
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
This instruction is for compiling the HoodLoader on your own with a Raspberry Pi (Debian). I cannot tell you how to compile Lufa with any other OS, but Google can. Believe me: Windows is a struggle to compile. On a raspberry you can only use the older avr-gcc 4.7.2 toolchain. Please tell me how to upgrade if you know how.
For me the easiest thing is to code with my Windows PC only and compile with my Raspberry over ssh. I recommend creating a Windows share by right clicking your Arduino folder and hit "share". Then mount this share with your Raspberry like this:
$ cd Desktop
$ mkdir Arduino
#Test mounting:
sudo mount -t cifs -o username=yourusername,password=yourpass,nounix,noserverino //YOUR-PC-NAME/Arduino Arduino
#run it automated at startup. If not connected this can cause a long timeout.
sudo nano /etc/fstab
//YOUR-PC-NAME/Arduino /home/pi/Desktop/Arduino cifs username=yourusername,password=yourpass,nounix,noserverino 0 0
You need to install the gcc-avr toolchain, avr-libc and compile with:
$ sudo apt-get install gcc-avr avr-libc
$ cd Desktop/Arduino/HoodLoader
$ sudo make clean
$ sudo make
HoodLoader2.0.3 compiles with 3958(+2 for Mega) bytes with a Raspberry Pi.
On Ubuntu you can use the newer toolchain which saves ~50 bytes of memory.
You need to install the gcc-avr toolchain, avr-libc and compile with:
$ sudo add-apt-repository ppa:pmjdebruijn/gcc-avr-release
$ sudo apt-get update
$ sudo apt-cache search gcc-avr
$ sudo apt-get install gcc-avr avr-libc git
$ avr-gcc -v
$ cd Desktop
$ mkdir Arduino
$ cd Arduino
$ git clone https://github.com/NicoHood/HoodLoader2.git
$ cd HoodLoader2
$ sudo make clean
$ sudo make
HoodLoader2.0.3 compiles with 3908(+2 for Mega) bytes with this toolchain.
Copyright (c) 2014-2021 NicoHood
Additional Information