Fully halt the controller by first clicking the Halt button on the toolbar or by clicking Target → Halt. Finally, reset the controller by clicking on or clicking Run → Reset.
Erase the code in the controller for the next build level by clicking Tools → On-Chip Flash, and click Erase Flash in the On-Chip Flash tab (make sure that all of the flash banks are checked) as shown in Figure 4-6. This operation erases all of the program code stored in flash. (This step is optional).
Note:
Do not click Cancel, turn off the power of the board, or disconnect the emulator when erasing flash.
Close the CCS debug session by clicking the Terminate Debug Session button or clicking Run → Terminate.
Figure 4-6 Erase Program Code in Flash for Next Build Level