Dear Champs,
I am asking this for our customer.
The customers uses F280049 Launchpad for testing their own codes.
When their task1 code size is smaller than 2K works, there is no problem to run it on CCS or in standalone.
But when they wrote more codes and increased the task1 code size to larger than 2K words (about 3K words), they found something weird.
They could run it well on CCS with flash boot emulation (i.e. Reset CPU->Script/EMU flash->Run). He could also debug in CLA on CCS and saw GPIO toggling, too.
There was no special warning on the compiler.
But when they tried to run it in standalone without CCS/JTAG, it seemed nothing (C28/CLA) could run because the GPIO toggling in CLA failed.....
They use LS4+LS5 for CLA program memory and moved codes from flash to RAM accordingly.
Why the codes can be run on CCS well with flash emulation boot, but it failed in standalone?
Do you have any suggestion for us to debug?
We suspect the .cmd file is wrong, but we have not found it so far.
I can send you their .cmd and .map offline.
In the .cmd
/*LS4/LS5 RAM(4k)*/
RAMLS_CLA_PROG : origin = 0x00A000, length = 0x001000
Cla1Prog :
LOAD = FLASH_BANK1_CLA_PROG,
RUN = RAMLS_CLA_PROG ,
LOAD_START(_Cla1funcsLoadStart),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
PAGE = 0, ALIGN(4)
In C codes,
memcpy(&Cla1funcsRunStart, &Cla1funcsLoadStart, (Uint32)&Cla1funcsLoadSize);
MemCfg_setCLAMemType(MEMCFG_SECT_LS4, MEMCFG_CLA_MEM_PROGRAM);
MemCfg_setCLAMemType(MEMCFG_SECT_LS5, MEMCFG_CLA_MEM_PROGRAM);
MemCfg_setCLAMemType(MEMCFG_SECT_LS0, MEMCFG_CLA_MEM_DATA);
MemCfg_setCLAMemType(MEMCFG_SECT_LS1, MEMCFG_CLA_MEM_DATA);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS4, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS5, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS0, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS1, MEMCFG_LSRAMMASTER_CPU_CLA1);
In the .map
Cla1Prog 0 0009e000 00000be6 RUN ADDR = 0000a000
0009e000 000008ba cla_task.obj (Cla1Prog:_Cla1Task1)
0009e8ba 000002a2 cla_task.obj (Cla1Prog:_Cla1Task2)
0009eb5c 0000008a cla_task.obj (Cla1Prog:_Cla1Task8)
OR is there any restriction or condition about this?
Wayne Huang