Firmware.bin file on bare metal LPC11U24

19 Dec 2012

Is the firmware.bin file visible on an LPC11U24 after connecting to USB supposed to match the binary file copied to the LPC11U24 when PIO0_1 is low? I am trying to figure out why functional mbed programs don't work on my custom pcb, and I discovered that the firmware.bin file differs significantly from the file I wrote to it.

For example, the vector table seems to start at 00000400 instead of 00000000, and the fifth vector has changed, along with the checksum in the eight vector. The checksum doesn't add up correctly, which would explain the problems I'm seeing with my board.

Could anybody else out there playing with bare metal LPC11U24 boards compare their firmware.bin file with the binary they programmed and see if they match?

Thanks, Ralph

31 Dec 2012

Problem turned out to be Linux vs. Windows. USB MSD bootloader seems to work incorrectly with Linux, and image gets loaded at the wrong address (starts at 0x400 instead of 0). When I get a chance I'll do some experimenting and see if I can trick it into putting it in the right place.

- Ralph

04 Jun 2013

Hi Ralph,

I wrote a small Perl script to automatically transfer the contents of the latest .bin file from /Downloads to the LPC11U24 that is in bootloader mode. So to answer your first question: yes, the bin file you load into your bare metal LPC11U24 is identical to the one you upload to your mbed.

The problem is the offset that the operating system is applying when writing the file to the virtual flash drive emulated by the boot loader. On windows, a regular copy works fine, but on Linux and OS X it does not. The script I wrote works around that by using 'dd' to copy the firmware to the controller.

You might need to adapt the commands a little bit for Linux (I wrote it/tested it for OS X). Feedback for the exact syntax on Linux is welcome, I will integrate it in the script so it works on both platforms.

You can find the script here: https://github.com/hollie/lpc_usb_flasher

Kind regards, Lieven.