8051 Microcontroller

Thread Starter

RaviKumar.N

Joined Nov 24, 2005
4
Dear All,
I am Ravikumar.N, working on atmel AT89C52 microcontrolller. I have been writing C code for this processor from past 6 months. I am using SDCC cross compiler as a development tool.

When we call a funtion from any "ISR", that particular function has to be preceded by the pragma known as "#pragma nooverlay". This is with respect to SDCC compiler

If anybody knows the purpose of this pragma,please share our knowledge with me.


With Regards,
Ravikumar.N
 

n9352527

Joined Oct 14, 2005
1,198
It is to prevent the compiler from overlaying the parameters and local variables of that function. Overlaying is performed by assigning the parameters and local variables to the overlayable segment. If the parameters and the variables are overlaid, then it might not be available when the ISR occurs resulting in fatal errors or segment corruptions. Only non-reentrant, non-function-calling functions are overlayable and only in small memory model.
 
Top