Hi,
I want to produce functions or interrupt handlers in C without prologue, epilogue.
something like #pragma NO_HOOKS(myFunc) but for prologue/epilogue.
In gcc is very easy with the __attribute__ ((naked)) or __attribute__ ((interrupt, naked)), then I take care of the registers I want to save.
This is very handy and easy.
Can something like #pragma NAKED(myFunc) be adeed to TI C/C++ compiler?
Here you have 2 examples where I want to use it
a) For interrupts in one of my cases when I use context switching, at switching tasks I save all the register and that doesn't need to be duplicated by the compiler. The prologue/epilogue added by the compiler forces me to go for asm.
b)In another case I could do directly the code for the 16 bit parallel flash image needed at boot (my boot loader) in C instead of going to asm, just
asm(" .word 01010101h"); // Magic number which tells the IROM-bootloader that the Flash width is 16Bit
asm(" .global _bootEntryPoint");
asm("_bootEntryPoint:");
and the rest just pure C, easy to write,read, maintain and well documented.
But... the prologue added is a killer.