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.
Tool/software:
How do I configure the memory spaces for my ISR and automatically load along with the vector spaces from FLASH space to RAM space during initialisation?
Hi Aswin,
The two links you had sent are somewhat convoluted, and do not detail exactly what they are doing to simply execute code in this manner.
From what I gather, it looks like conceptually they are performing the following:
1) ISR code is mapped to a pointer in FLASH
2) memcpy is used to transfer this code from where the ISR is located in FLASH to an area of RAM predefined as a "scratchpad space" that is large enough to contain the ISR code and can be made larger as necessary.
3) Copy the address of the new ISR code in place of the vector already contained in RAM
Could you send me code that does this explicitly so that I don't need to guess?
Thanks,
Lihu
Guessing this is all I need to do?
#pragma CODE_SECTION(ADC_isr_code, ".TI.ramfunc")
As long as it and the other code existing in this space, should be automatically loaded from FLASH space to RAM and the addresses in the vector are already correctly pointing towards the address of the isr code should be automatically updated?
Hi Lihu,
Yes you are right. When you use the #pragma CODE_SECTION(ADC_isr_code, ".TI.ramfunc") , the function will be automatically loaded from FLASH to RAM.
Please have a look at section 6.9.4 The CODE_SECTION Pragma in the compiler document for more information.
TMS320C28x Optimizing C/C++ Compiler v22.6.0.LTS User's Guide (Rev. Y)
Thanks
Aswin