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
Dear Champs,
I am asking this for our customer.
The user has many CLA tasks and codes and found LS0 is not enough, but has trouble allocating the large CLA task codes into different LS memories.
Now, the user adds LS7 like below:
in the .cmd
MEMORY
{
PAGE 0 :
.....
RAMLS0 : origin = 0x008000, length = 0x000800
......
RAMLS7 : origin = 0x00B800, length = 0x000800
/* CLA specific sections */
Cla1Prog : LOAD = FLASH_BANK0_SEC4,
RUN = RAMLS0|RAMLS7,
LOAD_START(_Cla1ProgLoadStart),
RUN_START(_Cla1ProgRunStart),
LOAD_SIZE(_Cla1ProgLoadSize),
PAGE = 0, ALIGN(4)
in the .c initialization,
MemCfg_setCLAMemType(MEMCFG_SECT_LS0, MEMCFG_CLA_MEM_PROGRAM);
MemCfg_setCLAMemType(MEMCFG_SECT_LS7, MEMCFG_CLA_MEM_PROGRAM);
MemCfg_setCLAMemType(MEMCFG_SECT_LS1, MEMCFG_CLA_MEM_DATA);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS0, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS1, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS7, MEMCFG_LSRAMMASTER_CPU_CLA1);
However, the user got errors including:
#10099-D Program will not fit into available memory. Run placement with alignment/blocking fails for section Cla1Prog...
Q1: Is there anything wrong with the above memory allocation?
Q2: Can the compiler allocate large CLA codes (including several tasks) into different LS memories automatically?
Q3: How can we allocate different tasks into different LS memory, respectively? For example, allocate task 1 to LS0, task 2 to LS7?
Q4: If we combine LS0+LS1, does it work? Is there any considerations for combining these local share memories into one memory and then use it?
That is,
MEMORY
{
PAGE 0 :
RAMLS0 : origin = 0x008000, length = 0x001000 // LS0+LS1 by length=0x001000
...............
Cla1Prog : LOAD = FLASH_BANK0_SEC4,
RUN = RAMLS0,
LOAD_START(_Cla1ProgLoadStart),
RUN_START(_Cla1ProgRunStart),
LOAD_SIZE(_Cla1ProgLoadSize),
PAGE = 0, ALIGN(4)
in the .c initialization,
MemCfg_setCLAMemType(MEMCFG_SECT_LS0, MEMCFG_CLA_MEM_PROGRAM);
..............
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS0, MEMCFG_LSRAMMASTER_CPU_CLA1);
..............
Wayne Huang
Wayne Huang said:#10099-D Program will not fit into available memory. Run placement with alignment/blocking fails for section Cla1Prog...
Q1: Is there anything wrong with the above memory allocation?
Q2: Can the compiler allocate large CLA codes (including several tasks) into different LS memories automatically?
Q3: How can we allocate different tasks into different LS memory, respectively? For example, allocate task 1 to LS0, task 2 to LS7?
Q4: If we combine LS0+LS1, does it work? Is there any considerations for combining these local share memories into one memory and then use it?
I don't think the compiler will break a function into two in order to fit in memory that is not contiguous. To do this would require addition of branch and return calls.
My suggestion is to define a larger block using LS0 and LS1 merged as you suggested in the last question. The user will still need to allocate each block to the CLA during boot.
Regards
Lori