I’ve just received a brand new STM32F401 (BlackPill) development board which I successfully flashed with Adafruit’s latest UF2 bootloader (TinyUF2 0.20.1)
Flash was performed on MacOS with dfu-util.
Everything went smooth and my device’s firmware updated with a slightly different default blink program on it. I can open it in the OS’s file manager and see the files and so on.
Issue is that when I replace the UF2 with a custom one, the board doesn’t restart or perform any of the new firmware actions. When I restart it with (boot0 + nrst or unplug) the UF2 file reverts to the original one.
I decided to downgrade the bootloader to TinyUF 0.5.0 which was previously used by some F4 users. But then I observed the same behaviour. dfu-util pushes the bootloader with success but my hexdump shows the 0.20.1 still sitting there.
I tried to zero out the bootloader which this time returned a valid zero out hexdump too, but after reboot, the bootloader was reverted to 0.20.1 again. (0.5.0 flash over the zeroes reverts it to 0.20.1 also)
I don’t own an ST-Link. Both bootloaders are stated to be made for F401 per Adafruit’s repo. That’s my first ever board and I don’t know what this behaviour may even suggest. I can provide command outputs and any help is appreciated.
EDIT: Turned out TinyUF2 has locked my first two available partitions via option bytes, which I resolved with STM32CubeProgrammer over USB/DFU. Had to hold down boot0 during the option bytes overwrite, otherwise they would get reverted.