Forum: System Workbench for STM32

Not clearing entire flash on fw load

Hi there,

Im using an STM32F411 (512kB flash), but my program is only 50kB. I do however do some parameter storage and flash writes all over the rest of the flash (custom bootloading).

What I find, is that when I load code new code or start a debug session, it doesn’t clear all the flash, and whatever I’ve written there in previous versions of my program is still there? I would’ve thought it would clear the entire flash on each new fw load?

Is there a way I could force this behavior? To clear the entire flash?

France

Hi,

Yes, there’s a menu entry for that cool

Select your project (the tool need it to know which MCU and debug link to use) then right click >> Target >> Erase chip... and voilà...

Best regards,

Bernard (Ac6)


Excellent, you legend Bernard! Thanks