Other Parts Discussed in Thread: C2000WARE
Hello,
I was trying to find a linker file for CPU2 that also uses CLA2 (and also for FLASH programming). However, I could not find a linker file that supports CLA2. I only found "2837xD_FLASH_CLA_lnk_cpu1.cmd" in C2000Ware -> device_support -> f2837xd -> common -> cmd, which is presumably only for CPU1 and CLA1.
I looked at an example "cla_asin" in device_support -> f2837xd -> examples -> dual that uses CLA2 to calculate the arcsin of an input argument. I looked at which linker file the CPU2's project would be using, but it seems that even CPU2 is using the "2837xD_FLASH_CLA_lnk_cpu1.cmd" linker file. I ran the example project and it seems to be working fine, but it confused me because I thought CPU2 + CLA2 should get a different linker file compared to CPU1 + CLA1. For example, in the "2837xD_FLASH_CLA_lnk_cpu1.cmd" linker file, the part that specified CLA specific SECTIONS are as follows:
Cla1Prog : LOAD = FLASHD,
RUN = RAMLS4_5,
LOAD_START(_Cla1funcsLoadStart),
LOAD_END(_Cla1funcsLoadEnd),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
PAGE = 0, ALIGN(4)
CLADataLS0 : > RAMLS0, PAGE=0
CLADataLS1 : > RAMLS1, PAGE=0
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, PAGE = 1
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, PAGE = 1
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} LOAD = FLASHD,
RUN = RAMD0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#else
ramfuncs : LOAD = FLASHD,
RUN = RAMD0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#endif
#endif
/* The following section definition are for SDFM examples */
Filter1_RegsFile : > RAMGS1, PAGE = 1, fill=0x1111
Filter2_RegsFile : > RAMGS2, PAGE = 1, fill=0x2222
Filter3_RegsFile : > RAMGS3, PAGE = 1, fill=0x3333
Filter4_RegsFile : > RAMGS4, PAGE = 1, fill=0x4444
#ifdef CLA_C
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1, PAGE = 0
.scratchpad : > RAMLS1, PAGE = 0
.bss_cla : > RAMLS1, PAGE = 0
.const_cla : LOAD = FLASHB,
RUN = RAMLS1,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize),
PAGE = 0
#endif //CLA_C
Here, everything is in terms of CLA1, not CLA2. How can CLA2 be using the same CLA Data, Program, Message RAMs with the CLA1? This doesn't make sense to me.
So the question is, if I want to use the "2837xD_FLASH_CLA_lnk_cpu1.cmd" in C2000Ware, should I modify some parts of it accordingly? For example, should I change "Cla1toCpuMsgRAM" to "Cla2toCpuMsgRAM" and all the other occurences of "Cla1" to "Cla2" ?
Or, can I just use "2837xD_FLASH_CLA_lnk_cpu1.cmd" for the CLA2 exactly as I have used it for CLA1 and be fine with it?
Thank you very much.
Yoon