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.
Part Number: LAUNCHXL-F28377S
Tool/software: Code Composer Studio
Hello TI community,
recently I've been trying to flash program onto the F28377S board using the "2837xS_Generic_FLASH_lnk.cmd" linker file. When I was using the generic ram linker file, my program ran fine. Currently when I debug the program and run, CCS takes me to "ILLEGAL_ISR" interrupt in "F2837xS_DefaultISR" source file. I have the functions and interrupts I created all defined in the main source file currently. I am not sure why this is happening. Is it because I don't have a function to push functions onto the RAM or am I missing something else?
Brenden,
You might have some functions allocated to ".TI.ramfunc" section in your linker command file.
These functions will have a Flash load address and a RAM execution address. You have to copy these functions to RAM from Flash before executing them. You can use memcpy() function to do this (check out InitSysCtrl() function in F2837xS_SysCtrl.c). If you do not copy these functions to RAM, CPU will fetch incorrect opcodes from RAM causing ITRAP/illegal ISR.
Also, make sure you execute the Flash API from RAM unless you execute the Flash API from one bank while erase/program the other bank. Check flash_programming_cpu1_FLASH.cmd at C:\ti\c2000\C2000Ware_1_00_00_00\device_support\f2837xs\examples\cpu1\flash_programming\cpu01 - This linker command file uses a Flash load address and a RAM run address for Flash API library.
Thanks and regards,
Vamsi
I am assuming to get memcpy() to execute, all I have to do is define _FLASH in my main source file? I noticed that in the example flash programming linker file that they only allocate .text to FLASHD and FLASHE. I am wondering if that might not be enough memory for my source files. I copied the "flash_programming_cpu1_FLASH.cmd" linker file into my project and added the common/lib directory into my linker search paths. I get the warning "#10068-D no matching section" when I compile. When I debug I still get prompted to the Illegal ISR function.
I feel like I didn't do the correct memcpy correction...
After playing around with the code, I realized I needed to define "_FLASH" in the SysCtrl.c source file. Now everything seems like it's working. I am still using the Generic_FLASH_lnk linker file.
Brenden,
If you use the Flash build configuration for a given TI example project, you will notice that the _FLASH symbol is defined in the build settings. Good that you figured it - I pointed you to sysctrl file so that you will notice it.
Thanks and regards,
Vamsi