Content originally posted in LPCWare by lpcxpresso-support on Fri Jan 15 15:26:20 MST 2016
Hi Marco,
First, you should attach at least an.axf file for us to investigate, and preferably your project settings and map file. The behavior you describe happens when GDB splits the flash image before sending it to the debug utility to program.This is typically a result of non-contiguous sections (e.g. section alignment, etc.). In other words, an address gap exists between the end of one section, and the start of the next. In this case, GDB sends separate flash program messages. The debug utility has no way to know whether it's the last image it's going to get, so it has to program what it has. If another flash program message arrives and the start address is offset within the sector, the data from the sector start has to be cached, the sector erased, and then reprogrammed with old/new data. Note you can use the FILL linker command to ensure there is no gaps in the image.
Thanks and regards,
LPCXpresso Support