Hello everyone:
I use S32K148 MCU ,and S32DS for Arm IDE V2.2.
I want to assign data and code to specific sections.
At first, I use #pragma section it not work, S32DS ignore it (Unknow pragmas).
Then,I use __attribute__ ((section(".mycode"))), It worked.But only one function was assigned to ".mycode" section below __attribute__ ((section(".mycode"))) instruct.
My code like this:
__attribute__ ((section(".mycode")))
void AAA()
{
}
void BBB()
{
}
After link,Only function AAA in section ".mycode".Function BBB in default ".text" section.
How to assign all function in one module to a section with one instruction like #pragma section in other platform?
Thanks.
Solved! Go to Solution.
Hi, you have actually answered yourself.
There are no pragmas in GCC, you will have to add mentioned attribute before every function.
Hi, you have actually answered yourself.
There are no pragmas in GCC, you will have to add mentioned attribute before every function.
Thanks a lot.