This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 debugger: erase SEGMENT only?

There is an application where a part of the flash memory contains tables for an LCD (fonts, icons). Normally, a hex file is flashed for this purpose. However, the debugger erases the whole main flash upon every debug iteration.

I don't find a debug config option to set segment erase (CCS 6.1). However, the underlying flasher engine supports this. Did I overlook anything?

A workaround could be to convert the hex file (or the original bin file) to a library file and then specify this library in the appropriate options of the project. But I fear that doing this is not a standard approach (supported by utility program).

  • Rob Maris said:
    I don't find a debug config option to set segment erase (CCS 6.1). However, the underlying flasher engine supports this. Did I overlook anything?

    For MSP430, the erase options supported are as shown in this page. There isn't an option to erase just a segment, however if the memory region containing the LCD tables is not to be altered, you could try "Erase and download necessary segments only". 

  • Thanks for this hint. Indeed this does what it should. I selected the fifth erase option.

    I simply did't expect this setting avaiable only when the debugger is already RUNNING. That was the reason for asking it. I'd recommend that this setting be configured under debug configuration, which is project specific and also allows configuration PRIOR to starting debug.

  • Rob Maris said:
    I'd recommend that this setting be configured under debug configuration, which is project specific and also allows configuration PRIOR to starting debug.

    The erase setting can be configured directly from the Project properties or from the Debug configuration prior to starting the debugger. 

    Right-click on the project in Project Explorer view, go to Properties->Debug, then select MSP430 Properties on the right pane and it is available there.

    Or you can get to it from the Debug Configuration, Target tab, MSP430 Properties.