Other Parts Discussed in Thread: CCSTUDIO
Tool/software: Code Composer Studio
Hi there.
I just solved some issues with a simple code where I use CPU1 and CLA1 loaded in RAM with 2837xD_RAM_CLA_lnk_cpu1.cmd file with some changes. The main changes are:
...
RAMGS0 -> PAGE =1 in PAGE = 0
...
.text : >> RAMD0|RAMD1|RAMGS0, PAGE = 0
...
Cla1Prog : > RAMLS4_LS5, PAGE=0
...
and then
MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 1;
in the CPU1 code to assign the right CLA RAM's ownership.
Now I got functional problem whe I load it in FLASH! I obtain ILLEGAL_ISR() halt. I looked some thread and I realized that the problem is on InitFlash() and DELAY_US() function: they must loaded from FLASH to RAM.
I belived, when I used 2837xD_FLASH_CLA_lnk_cpu1.cmd linker file, it was enough if I set _FLASH parameter in Command File Preprocessing Linker option. Moreover, above InitFlash() there is this code section:
#ifdef __cplusplus ??? I created C source files
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000 ??? I use cgt 6.4.2 so is ramfuncs section OK ?
#pragma CODE_SECTION(".TI.ramfunc");
#else
#pragma CODE_SECTION("ramfuncs");
#endif
#endif
#endif
I use CCStudio 7 with __TI_COMPILER_VERSION__ symbol value at 6004002 (cgt 6.4.2 -> With TI v16.9.1.LTS I got a lot of compilation problems). So, there is someone that explan me how I can load my code in FLASH to avoid ILLEGAL_ISR(). I wish to understand how I can found the origin of this error while sniffing assembler code and CPU registers.
Thanks a lot for your help.
Diego.