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.

MSP432WARE: Flash Programmer Error "Attempting NONMAIN write without erasing"

Part Number: MSP432WARE
Other Parts Discussed in Thread: MSPM0G3519, LP-MSPM0G3519

Device: MSPM0G3519 (using LP-MSPM0G3519 LaunchPad) Tools: CCS Theia / XDS110 Debugger

Problem: > I am unable to load my code. I am receiving the following errors in the console:

  1. Flash Programmer: Invalid mass erase command

  2. File Loader: Memory write failed: Flash Programmer: Error, Attempting NONMAIN write without erasing!

  3. Load failed.

Context: I am working on a CAN bootloader project. I have tried to flash the code but it seems the NONMAIN region is locked or not being erased properly.

Question: > How can I properly erase the NONMAIN region or perform a factory reset to allow the new code to load?

  • Hi Abhishek,

    When attempting to make modifications in NONMAIN memory, the project settings need to be updated to allow NONMAIN to be erased.

    This can be done by:

    1. Right clicking on your project in the explorer view and selecting properties
    2. Navigate to Debug->Category: MSPM0 Flash Settings
    3. Go to the Erase Configuration and select either "Erase MAIN and NONMAIN memory (see warning above)", "Erase MAIN, DATA, and NONMAIN memory (see warning above)", or "Erase MAIN and NONMAIN necessary sectors only (see warning above)". Choose the one that fits your applications needs best. It is recommended to choose an option with necessary sectors only.

    Additionally, the following steps can be used to factory reset the device:

    1. Expand your project in the explorer view->expand the target config folder
    2. Right click on the .ccxml file and select Start Project-less Debug
    3. In the debugger view, expand the Threads tab and left click the CORTEXS_M0P core
    4. Select scripts->MSPM0G3519_Commands->MSPM0_Mailbox_FactoryReset_Manual or MSPM0_Mailbox_FactoryReset_Auto in the top toolbar of the IDE.

    Best Regards,
    Brian

  • Hi Abhishek,

    Were you able to recover the device with the methods previously described?

    Were you still unable to flash the device after changing the erase configuration in the Flash Settings?

    Best Regards,
    Brain