An updated version of gboot available here
gboot is a very simple USB HID bootloader for Silicon Laboratories USB microcontrollers. It has been developed for C8051F320/1 but it should work, after a few trivial modification, on other Silicon Laboratories USB MCUs.
The main advantages of a HID bootloader versus other types of USB bootloaders is that HID does not require any third party kernel driver as the basic HID driver is included in all modern operating systems.
Currently there are 2 version of the bootloader depending on the features and the space available. The tiny build fits in less than 1.5k (3 flash blocks) and the standard build is less than 2k (4 flash blocks).
gboot can only be compiled using SDCC, but this does not limit the use of other compilers for the firmware.
A small command line flashing utility called gflash is available for windows and linux. A GUI version of the flasher is planned.
gboot is open source and it is licensed under the GNU GPL V3. Other licensing schemes are available email us for details.
- return basic information about the device and flash layout
- erase a flash page
- write to flash
- read flash
- prevent write/erase of the bootloader code
- detect HW button for firmware recovery
- reboot the MCU
For the initial bootloader installation you must use Silicon Labs IDE or the flasher. I was not able to get any of the free tools (ec2drv or ec2drv-new) to work with my Silabs toolstick. It seems that the firmware of the toolstick is incompatible with the ec2drv.
If you find a solution/alternative please contact me.
Preparing your firmware for use with gboot
Build your firmware with the extra link option --code-loc 0x0400.
This will instruct the linker to skip the first 1024 bytes of flash as they are occupied by the bootloader.
Convert the intel hex file to binary using srec_cat, hex2bin or your favourite tool (making sure the code starts at offset 0 in the bin file).
Flashing the firmware
Flashing the firmware it's pretty easy using gflash:
gflash_cli p file.bin
- Enhance/document the firmware/bootloader interface
- investigate further code size reductions
- add Silabs C8051F34x and C8051F38x support out of the box