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.

MSPM0L1306: Questions about EEPROM emulation and linker command file

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG,

We are planning to implement EEPROM emulation in our application using the "EEPROM Emulation Type A Design" from MSPM0 SDK v1.20.1.6.

Please help with the following questions:

  1. Where is the linker command file for the EEPROM examples in the SDK? The CCS project examples for EEPROM Emulation Type A Design do not have a linker command file associated with them so these do not build. Please provide a linker command file or suggest one that can be used.
  2. What is the linker syntax we can use to split code memory allocation around the EEPROM emulation sectors? We are wanting to keep the Flash sectors associated with EEPROM emulation in the lower 32KB of Flash to take advantage of the additional write/erase endurance. To do this we have modified our linker command file MEMORY directive to split the 64KB Flash into three separate regions - FLASH_LOW, FLASH_EEPROM, an FLASH_HIGH. We then try to use the linker ">>" operator to allocate the .text sections into FLASH_LOW and FLASH_HIGH. However the, MSPM0 requirement for 8 byte alignment on a Flash word prevents the use of that operator. See below example excerpt from the linker command file showing what we are trying to do. 
    1. The palign(8) operator conflicts with the split directive and the linker issues this warning, "#10092-D split placement (>>) ignored for ".text":  cannot split object with PALIGN operator"

We are using CCS Eclipse 12.5 with TI Clang v2.1.2.LTS

MEMORY
{

...

FLASH_LOW (RX) : origin = 0x00000000, length = 0x000077FF /* First 30KB of FLASH */
FLASH_EEPROM (RX) : origin = 0x00007800, length = 0x0000800 /* EEPROM Emulation region of FLASH. Must be in bottom 32KB */
FLASH_HIGH (RX) : origin = 0x00008000, length = 0x0000FFF8 /* Upper 32KB of FLASH */

...}

SECTIONS
{
....
.text : palign(8) { *(.text) } >> FLASH | FLASH_HIGH /* Specify that program memory can be split across these MEMORY regions */

...}

  • Hi,

    I import the project and there is one cmd file in the project. 

    And for how to define the .text region. I tried with below configuration without errors. 

    .text   : palign(8) {} > FLASH_LOW|FLASH_HIGH

    Best regards,

    Cash Hao

  • Hi Cash. Thank you for the reply. Can you please confirm which versions of CCS and SDK you used for your test? There must be something wrong with my setup. 

    Regarding the linker syntax you shared, that will not split the .text section. The effect of the syntax you used is that if .text doesn't fit in FLASH_LOW, then it will be linked into FLASH_HIGH. What we need is for the code to fill all the space in FLASH_LOW and then as the code grows beyond the size of FLASH_LOW, the linker will split the section and then continue to allocate in FLASH_HIGH. 

    -Ruben 

  • Hi,

    I am using CCS v12.3 with SDK 1.20.00.05. 

    Try this one without palign(8)

     .text: { *(.text) } >> FLASH_LOW | FLASH_LOW1

    Best regards,

    Cash Hao

  • Hi Cash. Thanks again for the help. I did some more testing on item 1 and I confirm that when I import the example projects from SDK v1.20.00.05 the linker command files are there, even with CCS12.5. This seems to be a problem with the project specs in the latest SDK v1.20.1.6. Please report this to the MSPM0 s/w team to file a Jira ticket.

    Regarding the suggestion on the linker format, I confirm that removing the palign(8) operator resolves the linker warning and allows the splitting of .text section, but I'm concerned that omitting the palign(8) operator can cause problems because the MSPM0 internal Flash bus width is 8 bytes wide and the CPU maybe fetching code on that boundary. Can you please check with the chip design or systems colleagues if there are any functional requirements to use palign(8) or if this is optional?

  • Hi,

    For the SDK version v1.20.1.6, it moves the static .cmd and startup files to syscfg generated file,

    For the newest example imported to CCS, and there is a need for custom linker file:

    Rebuild the project, copy the /Generated Source/device_linker.cmd file to the root folder of your project.(just like the old version SDK does).

    Then disabled syscfg -> Project configuration files -> Linker File Generation.

    Rebuild the project, you can modify the linker file by yourself.

    I can check on whether there is an issue when omitting the palign(8). But it takes time since it is almost Christmas.

    Best regards,

    Cash Hao

  • Cash,

    Thank you for your continued help on this! I still don't see how to move forward with the SDK v1.20.1.6 EEPROM examples because when I import those into CCS, I don't even see a Sysconfig file. Maybe I'm still missing something about the procedure you are suggesting.

    Regarding the issue when omitting palign(8), I am ok to wait until after the Christmas/New Year break. In the meantime we will try some tests without it.

  • Hi,

    Get it. If you do not see a sysconfig file. You can follow the quick start guides for CCS to check the installation procedure. It is located in the default SDK installation path. Something like: C:\ti\mspm0_sdk_1_20_01_06\docs\english\quickstart_guides

    Best regards,

    Cash Hao

  • Hi,

    I was having the same issue that you described. After triying with different EEPROM's examples from a great variety of SDK, I decided to try with the "mspm0_sdk_0_57_00_00_eng" version. In this example is not required a Sysconfig file. With this version both projects (Type A and Type B with its tests) run in a MSPM0L1306 chip (I'm using CCSTheia 1.0.0)

    I hope that it will be helpful information for you.

    Best regards,

    Nicolas

  • Hi Nicolas,

    The "mspm0_sdk_0_57_00_00_eng" version is for early sample MCU. It is not recommended to use on the final silicon devices. Please use the v1.xx SDK for test.

    Best regards,

    Cash Hao

  • Hi Cash,

    I am using the "mspm0_sdk_1_20_01_06" version to develop my current firmware, but I have gone back to this version because both EEPROM emulation examples from the "1_20_01_06" didn't work.

    Best regards,

    Nicolas

  • Hi Nicolas. Please note that the EEPROM examples from SDK v1.20.00.05 import correctly so you don't have to go all the way back to the early engineering release. That being said, I don't think the EEPROM examples have changed since the beginning so it's probably fine. There is definitely something wrong with the CCS projects for EEPROM examples in v1.20.01.06 and hopefully this has been reported to the right people for fixing in next release. 

  • I confirm that the problem with the missing linker files in the EEPROM projects from SDK v1.20.01.06 was related to outdated Device Support Package in CCS12.5. After I updated the MSPM0 Device Support Package to v1.5.0.03 I am able to import the EEPROM examples from SDK v1.20.01.06 and they include the linker command files. This resolves one of the original questions on this thread. Thanks