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: Linker Command File

Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG

For the first time I am trying to set aside some persistent storage for some configuration info.

Are there any tutorials or manuals on exactly how to do this, and more importantly where in Flash is the best place for this kind of data to go?

I have something that is working, but I wanted to make sure I did things correctly.

  • Hi Keith,

    If you're using a sysconfig enabled project, I recommend building the project then copy and pasting the .cmd file that appears under Generated Source -> SysConfig

    Remember to disable the linker file generation in SysConfg

    Then in your .cmd file you can partition your flash sectors, personally I leave the main application code Flash at 0x0 and add the configuration variables in the back section of flash.

    If you think you will be writing the variables frequently you can also use the high endurance flash that is at 0x0 (lower 32KB has higher write endurance), but you will need to move the .intvecs accordingly.

    Regards,
    Luke

  • Thanks for this.

    What is frequently? I would imagine never any more than once a week.

    Can I put it behind the INTVEC?

  • I would say frequently is up to you and the expected lifetime of the equipment/application. The higher endurance offers 100K cycles (over the 10k of normal flash)

    You can place your configuration after the intvecs. I recommend a flow like

     

    MEMORY
    {
    	FLASHVEC 		(RX)  : origin = 0x00000000, length = 0x00000400
    	USERCONFIG 		(R)	  : origin = 0x00000400, length = 0x00000400
        FLASH           (RX)  : origin = 0x00000800, length = 0x0001F800
        SRAM            (RWX) : origin = 0x20200000, length = 0x00008000
        BCR_CONFIG      (R)   : origin = 0x41C00000, length = 0x00000080
        BSL_CONFIG      (R)   : origin = 0x41C00100, length = 0x00000080
    
    }

    The intvec is always at 0x0 and I sectioned it away from your user variables because when you do an erase operation you don't necessarily want to be erasing the intvec.

    Regards,
    Luke

  • Thank you so much!