Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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

List of 31 messages in thread
TopicAuthorDate
predefined macros and sfr definitions            01/01/70 00:00      
   old Tasking version            01/01/70 00:00      
      Tasking            01/01/70 00:00      
         Here's what I have            01/01/70 00:00      
            reference            01/01/70 00:00      
   no aswer, but an extra question            01/01/70 00:00      
      assembler macros            01/01/70 00:00      
         not really            01/01/70 00:00      
   I doubt it - but            01/01/70 00:00      
      End of wrong stick?            01/01/70 00:00      
         OK "any", not "ant", but "8051-derivativ            01/01/70 00:00      
            Unfair            01/01/70 00:00      
               can be argued            01/01/70 00:00      
                  No unfair intentions            01/01/70 00:00      
                     universality is not desired            01/01/70 00:00      
                  it's especially all those installs            01/01/70 00:00      
                     They happily coexist at my place            01/01/70 00:00      
                        Uninstalling            01/01/70 00:00      
   Dunfield            01/01/70 00:00      
      Dunfield AppNotes            01/01/70 00:00      
         DDS            01/01/70 00:00      
         if it is asm            01/01/70 00:00      
         what's the big deal?            01/01/70 00:00      
            solution            01/01/70 00:00      
   First try            01/01/70 00:00      
      a couple of problems (for me)            01/01/70 00:00      
         Thanks            01/01/70 00:00      
            Sometimes even using things for "what it            01/01/70 00:00      
            Common Practice            01/01/70 00:00      
               nasty is relative            01/01/70 00:00      
         Limitations            01/01/70 00:00      

Back to Subject List