My Boot

MyUSB Library, Projects Add comments

The MyUSB Bootloader is coming along nicely. It resides properly in the boot space of the USB1287, and is recognised by the FLIP software correctly. I’ve still got the meat of the commands (erase/program flash and EEPROM) to go, but the already implemented commands (jump to app, read signature, erase app) work well, as does the rest of the bootloader.

The USB component of the MyUSB library expects the descriptors of a USB device to be located in the flash (PROGMEM) space. Locating the bootloader to the boot section highlighted this as a problem, as the pgm_* macros don’t work across the 64KB flash boundary. As a result, I’ve added in a new compile-time macro which tells the library to use descriptors stored in RAM. It’s not a bad compromise - I think it far more likely to be used elsewhere in user apps than macros to enable the library to work with PROGMEM descriptors in the boot section.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in