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.

CCS/CC2642R: Customize Memory Map / Add extra Section to Generated Linker Command File

Part Number: CC2642R

Tool/software: Code Composer Studio

Hi everyone,

we are using CCS 10 with:

C:/ti/simplelink_cc13x2_26x2_sdk_4_10_00_78/source
C:/ti/simplelink_cc13x2_26x2_sdk_4_10_00_78/kernel/tirtos/packages
C:\ti\ccs1000\xdctools_3_61_00_16_core/packages
BLE5 Stack
I Want to add an extra section to RAM to store some information that does not gets initialized during boot up.
So we can store some information before performing a re-boot. 
We need that when we are about to be reset by watchdog. So to write a certain marker into that section that tells us at following reboot that it was caused by watchdog.
We have some further usecases, like Hardfault, Bios-Assert, etc...
In all those cases it is not save for us to write directly into NVM storage....

Second Use-Case is to write a pattern when the bootloader (BIM) found the current image to be mallicous and falls back to the factory image. So the application can get to know that it was defaulted!
The problem i face is, as much i could gather the application linker command file gets auto-generated upon project build / rebuild. So adapting one of them is out...
Is there any way to add an user-defined section?
Is there some documentation about it? My goolge-search only only got me outdated information referencing dead links...
Kind regards
Clemens 
  • Hi Clemens,

    This would not be possible on the CC2642R in regards to the normal SRAM. This because the SRAM is initialized to "0" during early ROM boot as part of the ECC parity reset procedure. 

    To achieve what you want, I would recommend looking into using the AUX RAM to store this temporary information as this RAM is not part of the ECC protected SRAM. If you are not using the Sensor Controller then you should be fine writing/reading the memory as you see fit but if you are using the Sensor Controller then you would need to make sure to not interfere with it.

    https://dev.ti.com/tirex/explore/node?node=AOFmdaK8impnxmEqGU3jkg__pTTHBmu__LATEST

    In case you use the Sensor Controller, I would advice you "reserve" a range of RAM in the Sensor Controller application that you then later access from the ARM side (this is basically just a way to make sure that the memory you use is not part of the SC application code). 

  • Hi MW,

    Thanks for your fast reply.

    ECC, Ok I see.

    I have read the relating part about AUX RAM

    https://dev.ti.com/tirex/explore/content/simplelink_cc13x0_sdk_4_10_01_01/docs/proprietary-rf/proprietary-rf-users-guide/proprietary-rf-guide/aux-as-ram.html#

    because we use 4.10.

    What I now don not understand:

    In the linker command file cc26xx_app.cmd, define the AUX_RAM memory area.

    I don't have that nor any other cmd / linker command file. Only the auto generated FC2_B_Sample_CC26X2\Debug\configPkg\linker.cmd.

    Is there a prototype anywhere to start from and how would i integrate it into the build?

    Kind regards

    Clemens

  • Hi M-W,

    i just double checked:

    In our application i see the following file being used in the command-line call for the ARM Linker:
    -l"C:/ti/simplelink_cc13x2_26x2_sdk_4_10_00_78/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/simple_peripheral_oad_offchip/tirtos/ccs/cc13x2_cc26x2_app.cmd"

    After searching through various option windows in CCS i found the location were that linker command file is specified:

    So i guess that i can copy the file into the project, make my adaptions and adapt the Entry in the "library" compartment....

    Kind regards
    Clemens