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.
I was trying to load a function(ePWM interrupt) into RAM. I made some changes to the linker file. Basically, added a line. When I'm debugging, the function seems to be running from RAM. But if I reboot the controller, it's gone. I realize that the function needs to be copied at every boot. But that is not happening. How do I get it to copy the function at every boot.
I noticed that even after adding ramfuncs and making changes to the linker file, I still get the error "creating output section "ramfuncs" without a SECTIONS specification". I have added the zip file of my project. I have looked up many references and example codes. What else do I have to do to get it working? Any help is appreciated.
Thank You,
Steven.TheCode v0.53.rar
Hi Steven,
You should be able to modify the linker command file such that it loads from one address location and run from other location. Please take a look at
http://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
Hi Santosh,
Could you please be more specific. What do I have to change in the linker file?
Regards,
Steven
Steven,
What TI compiler version you are using?
#ifdef __TI_COMPILER_VERSION__
#if 0 //__TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} LOAD = FLASHA,
RUN = PRAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
#else
ramfuncs : LOAD = FLASHA,
RUN = PRAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
#endif
#endif
I tried to build your code, and I was getting the same error. Then I commented compiler version check, and then it is building ok. I am using cgt 18.12.03 STS.
So please check the compiler version and modify the check accordingly.
Dear Santosh,
That resolved my issue. I just checked it on my hardware as well. Thank you very much.
However, shouldn't these changes be made in future c2000 updates officially..
Anyways, thanks a lot.
Steven.