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.
Hello,
To use the CLA, I have the Cla1Prog section that copy code from FLASH to RAM. My CLA programs take more than memory space of one section, so I merged two sections as it is in C2000 example:
RAMLS2_3 : origin = 0x009000, length = 0x001000
Cla1Prog : LOAD = FLASHFG, RUN = RAMLS2_3, LOAD_START(Cla1funcsLoadStart), LOAD_END(Cla1funcsLoadEnd), RUN_START(Cla1funcsRunStart), LOAD_SIZE(Cla1funcsLoadSize), PAGE = 0, ALIGN(8)
But I would prefer to keep initial memory division and split code into multiple memory range. I tried the following code but it does not compile:
RAMLS2 : origin = 0x009000, length = 0x000800 RAMLS3 : origin = 0x009800, length = 0x000800
Cla1Prog : LOAD = FLASHFG, RUN = >> RAMLS2 | RAMLS3, LOAD_START(_Cla1funcsLoadStart), LOAD_END(_Cla1funcsLoadEnd), RUN_START(_Cla1funcsRunStart), LOAD_SIZE(_Cla1funcsLoadSize), PAGE = 0, ALIGN(8)
Note that even though my code does not compile, the Cla program are correctly mapped and split into two output sections with a length corresponding to my memory ranges.
So I would to know if it is really possible to do what I want to do and how to do so, or if I should keep merged memory range.
Thank you.
Hi,
You cannot use the LOAD_START,SIZE features if you want to split the section into multiple blocks. Since your linker cmd file uses these function, the linker will ignore ">>" operator and treat it as ">" operators where the section is placed either in LS2 or in LS3, not split between these 2.
If you want to split, you can still use >> operator , but you may need to use copyTable method for performing the copy.
For example :
Cla1Prog : LOAD > FLASH_BANK0_SEC0, RUN >> RAMLS1 | RAMLS2, TABLE(copyTable_cla1Prog), ALIGN(8)
Instead of using memcpy with Cla1funcsLoadStart, Cla1funcsRunStart, Cla1funcsLoadSize, you can use the function
Thank you for your answer,
It works well, I just needed to add an underscore for _copyTable_cla1Prog in the linker.
Also I think it is necessary to add the .ovly section int he linker to store the tables on FLASH.
Right, _ is required for COFF format. .ovly is the section where the copy tables ae saved and need to be allocated to a memory
Regards,
Veena