Why does the Nucleo/Discovery onboard ST-Link clear flash memory (0x08000000 - 0x08000200) when I connect to the ST-Link USB?
I've had this happen on multiple boards, and can watch it do this from the ST-Link Utility program.
Fixed: ST-Link firmware needed updating.
I never experienced such an issue with my (admittedly older) Nucleo boards.
It would be helpful for others if you name the board(s) and the SW version you had that trouble with.
There has been a lot of tinkering with the mbed firmware, especially the faux MSC and holding devices in reset. The last batch of STM32F4-DISC1 boards wouldn't run from charger cables until updated. The early V2.2x would make sense.
I've had the issue on the STM32L053 Discovery, Nucleo-L053R8, and the Nucleo-F411RE. I already updated the firmware, so I'm can't check with 100% certainty, but I believe I had both v2.23 and v2.22 of the firmware causing issues. Updating to v2.28.18 fixed the problem.
My latest Nucleo is a 746ZG from last year, which doesn't have >this< issue.
It exhibits another problem (The Cortex M7 debug problem), so I re-flashed the onboard ST-Link into a JLink.
Retrieving data ...