Hello,
Sorry for the long text. I'm a new user of the C2000 MCU family and I have faced an annoying situation regarding the ramfuncs section of the linker file.
I was following the Firmware development package for the F2837xS devices and I'm working with the v200 support libraries. I have created the example project that runs on RAM and all works perfectly. The problems have come when I have tried to run the same application from FLASH. The default CCS linker file and the one included into the device support folder includes these two blocks:
ramfuncs : LOAD = FLASHD,
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} LOAD = FLASHD,
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#endif
#endif
Compiling the code, these warnings appear:
And the code doesn't work, the variables _RamfuncsLoadStart, _RamfuncsLoadSize, etc are not correctly generated (size values always 0) so the initial copy from FLASH to RAM inside InitSysCtrl() is not done.
As all the library functions are using the "tag" ramfuncs, I have just commented the second block of the shown above. This works perfectly and now the application is working as expected.
My question is:
- First, Am I doing something wrong? It is really needed to modify the .cmd file in this way?
- Second, As the compiler condition is >=, it looks like that new libraries or codes will use this block instead of the "traditional" ramfuncs. I have to take this into account if in the future I want to update the support_device libraries?
Thank you,