Electronic – Problems programming LPC1343 microcontroller in Ubuntu


When I copy a binary that works on a lpc1343 to the mounted usb-device representing the lpc1343 flash, the binary file is changed and does not work. Doing the same with the flash mounted via usb on Windows or Mac OS does not have the same problem. What could be the problem, and how can it be fixed?

Edit: The problem seems to be the vfat implementation in Linux which seems to prefix 0s before the file to be transferred.

Best Answer

you can solve this by using mtools (userspace fat utilities):

mdel -i /dev/sdf ::/firmware.bin
mcopy -i /dev/sdf new_firmware.bin ::/