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.

MSPM0G3507: MSPM0 Flash settings

Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG

Hello

I'm using MSPM0G3507.
I tried to delete 0x00002000 ~ 0x0000FFFF of Main memory in MSPM0 Flash settings.

After execution, Flash itself was successfully created, but the following message was displayed.
Is there any danger?
CORTEX_M0P: Flash Programmer: Error, Attempting NON-MAIN write without erasing!

  • Hi Kei,

    What tools are you using to program the device? Specifically what IDE and what debugger?

    Are you using Sysconfig?

    That message indicates that there is some portion of your program allocated to NONMAIN memory for some reason. Since its not being erased it isn't being reprogrammed, but if you're not careful writing to NONMAIN you may accidentally lock yourself out of the device. 

    Best Regards,
    Brandon Fisher

  • Thank you, Brandon.

    I have described my environment.
    ・Code composer Studio 12.4.0

    ・XDS110

    ・Use sysconfig 1.17.0

    I use ECC to write to NONMAIN.
    Also, the linker file fills the Code area with values.

  • HI Kei,

    ・Code composer Studio 12.4.0

    ・XDS110

    ・Use sysconfig 1.17.0

    What is your MSPM0 SDK Version? The latest is 1.20, and I believe it requires SysConfig 1.18. There are some bug fixes included but I don't believe that is the cause of your current issue.

    I use ECC to write to NONMAIN.

    Are you saying you are writing to the ECC corrected area of NONMAIN, that is fine and the best area to write to. If you are intentionally modifying Nonmain then I would encourage you to use the SysConfig tool to do it, rather than modifying it on your own. You can become permanently locked out of the device if you are not careful. If you are using sysconfig to do this then of course you should be fine.

    If you are intentionally modifying non-main, you must also set your debug configuration to erase the non-main region of flash memory before it is programmed, or you will get the error you are seeing.

    To do this, first right click on your project name in the project explorer, and go to Debug As -> Debug Configurations:

    Then in the debug configurations change the erase method setting for your project as described below:

    Also, the linker file fills the Code area with values

    The default linker shouldn't fill this, it should just ignore it if no coded is to be loaded. Have you modified the linker at all? 

    Best Regards,
    Brandon Fisher

  • Thank you, Brandon.

    SDK is using 1.10.0.05. This will be replaced with the latest version in the future. It has not yet caught up with the changes.

    I'm sorry, but I don't really understand how to change Nonmain using the Sysconfig tool, so I don't use it.

    I was also talking about ECC, but there were some mistakes.
    What I was managing was "Flash ECC code", not "Configuration NVM(NONMAIN) ECC code".

    I would like to manage data in a specific area with the linker. Therefore, we are filling part of the area of Code (Flash) ECC Corrected.

    I have used Debug Configrations to some extent.
    I'm Flashing a program with a two-step configuration.
    1.
    Erase Main memory only
    Flash 0x0000~0x1FFF
    fill from 0x2000 to 0x3FFF

    2.
    Erase Main memory Sector by range( 0x2000 ~ 0x3FFF)
    Flash 0x4000~0xFFFF

    Perhaps the cause is that there are two configurations, BCR_CONFIG and BSL_CONFIG.

  • Hi Kei,

    BCR_CONFIG and BSL_CONFIG are included in the default version of the linker, and shouldn't trigger that message unless you are also filling those regions. 

    If you flash a new example from the SDK do you still see this error? 

    Best Regards,
    Brandon Fisher

  • Thank you, Brandon.
    sorry. It was my confirmation mistake.
    NONMAIN was changed in sysconfig. A message was being printed for this purpose.