Source code reusability

Silverio Diquigiovanni silverio.di at qem.it
Tue Oct 24 14:52:50 UTC 2000


Charles-Antoine Gauthier wrote:

> Highly recommended approach. Also, if the timing allows, consider
> using the RTEMS first level interrupt handler. I would never trust a
> compiler to do the right thing (e.g. with some systems, address
> translation may need to be turned back on ASAP). At least, check the
> generated code for sanity.

Perhaps can be, Alejandro Villanueva suggest another mode

Alejandro Villanueva wrote: 

> #define INT_PRAGMA #pragma interrupt 
>  
> INT_PRAGMA 
> void interr( void ) { 
>    printf( "Hi there!" ); 
> } 
>   
> int main (void) { 
>    printf( "Main is here!" ); 
> } 
> --------------------------------- 
> 
> cpp defines.c > defines.pre 
> cat defines.pre 
> --------------------------------- 
> # 1 "defines.c" 
>   
>   
> #pragma interrupt 
> void interr( void ) { 
>    printf( "Hi there!" ); 
> } 
>   
> int main (void) { 
>    printf( "Main is here!" ); 
> } 
> --------------------------------- 

> I think that once you obtain this file you can compile it with gcc.

Exist a gcc command to induce the prepocessor to do his work two time ?

Thank you !!!



More information about the users mailing list