gboot 0.29 - USB HID Bootloader for Silicon Labs MCUs

Silicon Labs logo
gboot is a very simple USB HID bootloader for Silicon Laboratories USB microcontrollers. It has been developed for C8051F32x and C8051F34x but it should work on the F38x as well.

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.
A lot of work has been done to reduce the size since the last release. Currently there are 2 version of the bootloader depending on the features required. Both the tiny build and the standard build fit in less than 1.5k (3 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 (http://gglabs.us/node/3). 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.

Features

  • 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

Flashing gboot

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:
srec_cat firwmare.ihx -Intel -offset -0x0400 -Output firmware.bin -Binary
Other tools like hex2bin can also be used as long as the proper syntax is used to make 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
gflash_cli b

To Do

  • Enhance/document the firmware/bootloader interface
  • investigate further code size reductions

USB-IF Testsuite reports

Chapter 9 Tests
HID Tests

AttachmentSize
Binary Data gboot-0.29.tar.gz177.83 KB
Filed under: