Friday, December 7, 2012

USB mass storage bootloader for the Stellaris Launchpad

Edit: prebuilt binaries now available at github!

I wrote a a bootloader for the Stellaris Launchpad (and other Stellaris boards/chips) that acts as a USB mass storage device.
It's inspired by the bootloader found on some NXP LPC microcontrollers.

Just plug in your board while holding SW2, it shows up as a tiny external drive, copy your firmware.bin to it and *bam!* your board has new firmware!
You can also download the current firmware from the drive.

It takes up 16kB of flash memory.
Please test it and report any issues!
Usage instructions at github.

Source code and prebuilt binaries:



  1. This is nice!
    Could you post this over at Stellarisiti ARM forums(
    ... i know many will be interested.

  2. Hi Andrzej, nice work!
    Will spend more time for free on "your tools" next time to thank you for supporting my hobby ;-)
    Greets, FSE

  3. recommend that you change line 118 from if (ROM_GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_0)) to

    if (ROM_GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_0) && ((HWREG(HIB_RIS) & 0x1f) == 0x00))

    That way we can wake from hibernate with button 2 without accidentally going into bootloader MODE!

    Great work nonetheless!

    1. tested the code, this is the correct implementation

      //Not pressed