0
votes

I'm struggling with programming NXP LPC1549 microcontroller using the built-in USB ISP bootloader. According to the user manual Chapter 34.5, the device shows up as a USB mass storage device. The old firmware can be deleted and new one should be downloaded just by dragging and dropping it to the USB device.

All of this works indeed, but my 64-bit Ubuntu 16.04 shows an error message when ejecting the USB drive saying

Error ejecting /dev/sdb: Command-line 'eject "/dev/sdb"' exited with non-zero exit status 1: eject: unable to eject, last error: Invalid argument

After reset the microcontroller doesn't wake up and when looking with a debugger it's clear that the firmware flashing didn't go as expected. This is output of hexdump of the actual binary file and this is a hexdump of first 0x2000 bytes of the microcontroller's memory read with the debugger.

The funny thing is that with Windows everything works without problems and the application runs as it should. This also verifies that my firmware is ok and working.

I'm right now a bit helpless since I don't have a clue what could be the problem and how to start solving it.

1
Sounds like a bug in Linux USB driver.SergeyA
That's what I'm fearing here..olltsu

1 Answers

0
votes

I have met the same kind of issue on a Raspberry Pi (Raspbian). Finally the following command did the job:

dd bs=1024 conv=nocreat,notrunc if=/home/pi/new_version.bin of=/media/pi/CRP DISABLD/firmware.bin

new_version.bin is the new firmware to flash on the device.

I hope this helps.

Michel