My latest project uses an NXP LPC11U24 chip which is an ARM Cortex-m0. One of the neat features is that you can boot it into a preloaded usb bootloader than enumerates as a 32kb mass storage device, and then you can copy your bin file onto it - effectively programming it.
However on my Linux Debian PC, the program does not run when I reset the chip - the LEDs just glow slightly which is the same as it does when it's in the bootloader. But it does work on a Windows 10 (even a Windows 10 virtual machine running on my Linux machine).
I assumed that the flash memory must be changing in some way so I took MD5SUMs of the bin file at different stages and here is what happened:
1. MD5 of the bin file on my laptop harddrive - 4911e46463102b3bd8bbf69e75c2e407
2. Using my Windows 10 VM, attach chip via usb bootloader, delete current firmware, replace with bin file. MD5 the bin file on the chip - 4911e46463102b3bd8bbf69e75c2e407 (the same)
3. Exit bootloader, program begins to run, flashing LED etc. Reconnect chip via usb bootloader, MD5 the bin file on the chip - bec2c37631b20f3bf4723f11f9674010 (different - but program still runs)
4. Using my Linux Debian machine, attach chip via usb bootloader, delete current firmware, replace with bin file. MD5 the bin file on the chip - 4911e46463102b3bd8bbf69e75c2e407 (the same as what I got with the Windows machine)
5. Exit bootloader, program does not run, LEDs glow dimly. Reconnect chip via usb bootloader, MD5 the bin file on the chip - 664f5274738df16546427baea6c8066f (different to anything before)
This is 100% repeatable.
So from what I can see, the chip's flash changes in some way when the bootloader is disconnected, but on Linux it changes differently to how it changes on Windows such that it doesn't run at all. Slightly at a loss to what this could be. I was hoping that maybe someone else had used the bootloader on Linux or had any idea what the difference could be.
p.s. Unless there is some unsolvable problem I REALLY don't want to use Windows.