USB IR Toy firmware update
The IR Toy can be upgraded over the USB connection. It uses a modified version of the Diolan USB PIC bootloader. This is a great bootloader, written in ASM and released under the GPL, that enumerates as an HID device. The bootloader app is included in the project archive.
A neat thing about the IR Toy firmware is that it can be loaded with a normal programmer too. The firmware has a jump instruction at the appropriate location so that if a bootloader isn't present it will still work.
Follow these instructions to bootload a new firmware into the IR Toy.
Stuff you'll need
- Firmware upgrade package
- Terminal program or jumper (wire, gum wrapper, etc)
- Linux, OSX: Diolan booloader utility
Step 1. Activate the bootloader
Use one of the methods below to enter the bootloader.
With a terminal command
WINDOWS 7: There are reports that Win7 won't connect to the bootloader after the $ jump. It is recommended to use the second method instead - short the PGC and PGD pins
Open a terminal to the IR Toy virtual serial port, type $.
If you enter the bootloader with $, the IR Toy will stay in the booloader until an upgrade is completed. Or exit with: fw_update -reset -vid 0x04D8 -pid 0xFD0B
With a jumper on PGC/PGD
Alternately, place a jumper between the PGC and PGD pins, and then plug in the IR Toy.
The indicator LED will light when the bootloader is active.
The IR Toy bootloader is a USB HID device, not a serial port. No serial port will be added to your system!!!
Step 2. Upload the firmware
Get a firmware update package.
The Windows updater is included in the upgrade package, just run the .bat file corresponding to the firmware version you want to load.
You can safely ignore any warnings about the EEPROM and ID, these ranges are not included in every firmware update.
Command line: Windows, Linux, OSX, BSD
To compile the bootloader application (libusb-dev is required)
wget http://jesshaas.com/software/IRToy-fw_update.tar.gz tar xf IRToy-fw_update.tar.gz cd IRToy-fw_update LIBS=-lusb ./configure make
If above URL doesn't work for you, you can also checkout code from following github repo which include changes from Open Logic Bench Sniffer to compile correctly under Linux:
git clone git://github.com/dpavlin/fw_update.git cd fw_update/ ./configure make
To update the firmware
sudo ./fw_update -e -w -v -m all -vid 0x04D8 -pid 0xFD0B -ix ../USBIRToy.v22.hex
The basic command line parameters are shown above.
- -e (erase)
- -w (write)
- -v (verify)
- -m all (all memory, could be changed to flash)
- -vid 0x04D8 -pid 0xFD0B (the IR Toy bootloader USB IDs)
- -ix ../USBIRToy.v22.hex (the input firmware file, HEX format)
Step 3. Reset the IR Toy
Unplug the IR Toy, remove any jumper, and plug it back in. The upgrade is complete.