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,
Using ”#pragma CODE_SECTION“ we can force place a function F in an arbitrary section. However, if F in turns A, and A calls B, B calls C, then putting F in the designated does section does not guarantee the performance of F because F’s execution still depends on A, B and C.
F could be a critical ISR and A, B, C are rather generic functions such like an I2C or TIMER access. If I use #pragma CODE_SECTION to put A, B and C all in a faster memory, it would be unnecessary; what is needed is only to put them in faster memory when they are called by F.
Apparently we cannot allocate two different locations for the same function. Therefore is it possible to compile F all inline? I mean if
F()
{
A()->B()->C();
}
We somehow ask the compiler to put the expanded code of A, B and C, and functions calls reachable by F into F all together to make a monolithic/holistic F which finishes its execution in its own stack without the need to call dependent functions. I think in principle this should be possible.
So is there a way we can force the compiler to do this? I am using TI v4.9.1 ARM compiler for the ARM core of L138.
Paul