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.
Hi,
I have been trying to run an application from the internal flash memory on the TI 28379 Control Card. I changed the linker file to use the flash memory locations and defined _FLASH to enable memcpy. However I have been getting an error : " Break at address "0x3fe493" with no debug information available, or outside of program code" when I try to run the application. I am also changing the switch positions to get from flash for SW1. I am not sure if I am missing any other setup other than these two changes in setting up the run from Flash memory. Any suggestions will be really helpful.
Thank you,
Aditya
Aditya,
It is ITRAP ISR address in BootROM (see Table 4-13. Wait Point Addresses for CPU1 in TRM https://www.ti.com/lit/ug/spruhm8h/spruhm8h.pdf
Please take a look at this FAQ and see if that helps: [FAQ] Flash - How to modify an application from RAM configuration to Flash configuration? - C2000 microcontrollers...
Thanks and regards,
Vamsi
Thanks for the information Vamsi. I started looking at the reasons for the ITRAP ISR and it looks like initFlash() and Flashoff() functions are not being loaded to the RAM from Flash ( The value in the memory browser is zero for the entire RAM block at LOAD_START).
Everything else looks correct. Could this also be caused by problems with initialization of variables? The program does not run when I try to run using the debugger too. It works if I switch to a RAM based configuration instead of Flash.
Thanks,
Aditya
Aditya,
Glad it helped. If they are not copied to RAM, CPU will fetch those locations from RAM and end up in ITRAP.
Please use memcpy() to copy the content from flash to RAM.
Thanks and regards,
Vamsi
Thanks Vamsi,
So it looks like the memcpy() itself doesnt seem to be working properly. Earlier I was calling InitSysCtrl() which has the memcpy() at the very beginning. Do I need to call memcpy() separately in main() before InitSysCtrl() to copy the RAM?
Thanks,
Aditya
Aditya,
You don't need to call it twice. Please make sure whether the memcpy() in InitSysCtrl() is getting executed or not by doing single step execution. Did you check whether _FLASH is defined in your project settings or not? memcpy() gets called only when this is defined.
Thanks and regards,
Vamsi
Thanks for this suggestion. I realized the main() function itself is not getting executed and so it is not able to to the InitSysCtrl() to load other functions to RAM. I will search for errors with that and I think that should be able to solve the flash code not being copied issue.
Thanks again,
Aditya
Aditya,
Ok. Please continue your debug. I am closing this post since you now know that it is ITRAP. You an open a new post as needed and we can help you further.
Thanks and regards,
Vamsi