Content originally posted in LPCWare by CodeRedSupport on Fri Jul 16 15:50:50 MST 2010
The debug stub (for speed reasons) may internally decide to mass erase the flash based on how much of the flash is used by your application.
First select the appropriate project in the Project Explorer. Open the flash utility, and navigate to the 'Program flash memory' tab. Browse for the .axf file, the search for and select the Release build .axf file. Specify either 'Mass erase' or 'Erase only required pages', and press the 'OK' button.