??? 05/13/06 13:03 Read: times Msg Score: +1 +1 Good Question |
#116161 - predefined macros and sfr definitions |
Hi all,
SDCC has taken up the task of creating an 8051 compiler.h header file which has macros for creating sfr definitions in a portable manner. For this we need to know how several other 8051 compilers can be identified by the preprocessor and what the (preferred) sbit / sfr / sfr16 /sfr32 syntax is. It will be something like: #if defined SDCC // SDCC #define Sfr(name, addr) __sfr __at(addr) name #elif defined __C51__ // Keil? #define Sfr(name, addr) sfr name = addr #elif defined ... #endif So 8051 derivative manufacturers who are willing to provide header files don't have to do so for every compiler out there. A typical header file could then look like: #include <compiler.h> Sfr(P0, 0x80); ... Now we need to collect the data and I'm asking your help. I don't want to register myself for every compiler out there just to be able to download an evaluation version and install all these compilers so I can finally open the manual for it. I understand these companies want to tie in everyone who exposes some interest in their products, but I'm not willing to give in to that. What is the predefined macro to detect these compilers, how do they define sbit / sfr / sfr16 / sfr32 and what are the restrictions? Keil Raisonance IAR Tasking Hi-Tech Dunfield Crossware Wickenhauser Greets, Maarten |