Hello Friends,
I am working on MPC5553 and using freescale codewarrior 2.7 for MPC55xx
Can you please tell me how i can use nofralloc in C functions/interrupt.
or is there any other Pragma for the nofralloc in C.
Thank ou very much in advance.
The procedure should be at function level assembly, and the nofralloc directive should be used. This will ensure that you have full control over the stack.
Hello
You can only disable stack frame generation in inline assembler functions.
As soon as you implement a function in C a stack frame is created (and needed).
Why do you want to disable stack frame generation for an ANSI C function?
CrasyCat
Thanks CrasyCat
I have scheduler and Swither written in C language written for Infenion processors there we use #pragma NOFRAME.
I want to port same code to MPC5553 if I use inline assembler then I need to change whole implementation of Switcher to assembly.
Can you please tell me is it possible to disable stack frame of Interrupts written in C.
Hello
I did sync up with engineering on thsi one.
For C routine, the compiler will generate a frame if any of the conditions below is true:
- is a interrupt routine (for save and restore of volatiles used)
- calls other function
- uses nonvolatile register
- uses local
For complete control of the stack, the routine should be in function level asm and use of nofralloc directive.
You would then need to manually maintain the stack or make sure that a stack frame is truly not needed.
CrasyCat