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.
Tool/software: TI C/C++ Compiler
Hello,
I want to reserve around 15-20k of Flash for writing certain buffers that I require to persist through power off.
My project is based off of the simple peripheral OAD on chip example for the CC2652r.
sdk - simplelink_cc13x2_26x2_sdk_3_10_00_53
CCS - 9.0.1
Is there documentation somewhere that describes how to reserve this space in the linker file?
So far, I have managed to locate the linker file (the excluded linker file of the same name in the application should not be used) in this folder
C:\ti\simplelink_cc13x2_26x2_sdk_3_10_00_53\source\ti\ble5stack\common\cc26xx\ccs
I have tested changing some defines and observed the changes in the respective map files. I found that the persistent application map file would update, but the main application would not always build and update the map file. Build Clean had to be used to ensure it would compile again.
Note: I have implemented currently using osal_snv_write() and osal_snv_read(). Is there anyway of making these work for my space requirements, since they perform compaction and other useful features?
Any guidance is much appreciated.
Thanks,
Tyler
Tyler Tiede said:Is there documentation somewhere that describes how to reserve this space in the linker file?
From a compiler/linker standpoint you can do this using the #pragma DATA_SECTION. Please see section 5.10.8 of the ARM Compiler Users Guide.
You can place your data objects into a separate section using the pragma. Then in the linker command file, within the SECTIONS directive, you can specify which memory region to allocate that section to. You can also carve out a specific region of flash memory for it by defining it within the MEMORY directive. Details about the linker command file syntax are in the ARM Assembly Language Tools Users Guide.
There is a also a quick primer here: http://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
Tyler Tiede said:Note: I have implemented currently using osal_snv_write() and osal_snv_read(). Is there anyway of making these work for my space requirements, since they perform compaction and other useful features?
This question is best answered by the device experts. Let me know if you'd like me to move this thread over to the device forum for them to answer this question or if you'd prefer to start a new thread for this to keep the two questions separate.
Hi Tyler,
CC2640R2F has only 4KB of internal flash you can use for saving data. Refer to SNV at the documentation in the SDK. You can use osal_snv_write() and osal_snv_read to write/read data from internal flash.
-kel