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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/20/07 20:12
Read: times


 
#135436 - Time to eat your words!
Responding to: ???'s previous message
Erik Malund said:
Things like "unsigned char XDATA" are defined in a separate file as, for this, UX8. Of course all things involving SFRs and such will have to change, my question refer to the basic C syntax.

Well, I always say that one should always encapsulate all compiler-dependencies in typedefs, #defines, etc.

Try a search for "Conditional Compilation"; eg,
http://www.8052.com/forum/read.phtml?id=129556

That way, I can compile all my 8051 code in Borland or Microsft - so the "basic C syntax" is taken care of.
(of course, the code doesn't actually run - but it compiles).

Stuff like:
#if KEIL
#define XDATA xdata
#elif BORLAND
#define XDATA
#elif MICROSOFT
#define XDATA
#else
#error Unsupported/Undefined compiler
#endif

Note the final #else and #error to catch misconfigurations...

Maarten Brock started a thread a while ago with this very aim:
http://www.8052.com/forum/read.phtml?id=116161

You said,
although I have absolutely no interest in them, I laud your efforts
http://www.8052.com/forum/read.phtml?id=116492


Looks like now is the time to get interested!


List of 66 messages in thread
TopicAuthorDate
Keil \\\'51 and AVR            01/01/70 00:00      
   AVR?            01/01/70 00:00      
      AVR            01/01/70 00:00      
      you got me, Atmel AVR            01/01/70 00:00      
   The standard compiler for the avr is avr-gcc            01/01/70 00:00      
      OH NO            01/01/70 00:00      
         Well, at least you do have the opportunity            01/01/70 00:00      
            I'll tell my boss that the project will get delaye            01/01/70 00:00      
               On the other hand            01/01/70 00:00      
                  part of the reason for this post            01/01/70 00:00      
         Do not use            01/01/70 00:00      
            michael some questions            01/01/70 00:00      
               partial answer            01/01/70 00:00      
                  actually            01/01/70 00:00      
               IAR...            01/01/70 00:00      
      used avr-gcc in the year 2000 and            01/01/70 00:00      
   Time to eat your words!            01/01/70 00:00      
      not really            01/01/70 00:00      
   you can save a lot of time if you create            01/01/70 00:00      
      very helpful, thanks            01/01/70 00:00      
   yes and if you can describe in more            01/01/70 00:00      
      ok, here we go            01/01/70 00:00      
         RESTATE PURPOSE of thread            01/01/70 00:00      
            What bugs???            01/01/70 00:00      
            I suggest Imagecraft C compiler            01/01/70 00:00      
               Ive found that gcc produces fast code and its free            01/01/70 00:00      
                  Worthless statistics            01/01/70 00:00      
                     the issue here is            01/01/70 00:00      
                        if I understand it right...            01/01/70 00:00      
                           Not so strange?            01/01/70 00:00      
                              this is slightly different            01/01/70 00:00      
               GCC - over-strict ANSI?            01/01/70 00:00      
            CodeVision AVR            01/01/70 00:00      
               CodeVision - no Linker?            01/01/70 00:00      
                  No linker            01/01/70 00:00      
                     pray tell            01/01/70 00:00      
                        IAR            01/01/70 00:00      
                           sounds par for the course            01/01/70 00:00      
                     No linker with CodeVision AVR            01/01/70 00:00      
                        Both '51 and AVR at the same time?            01/01/70 00:00      
                           yes and no            01/01/70 00:00      
                           8051 to AVR migration            01/01/70 00:00      
                              questions, misunderstandings, answers            01/01/70 00:00      
                                 so you have the solution?            01/01/70 00:00      
                                    it's IAR            01/01/70 00:00      
                                       Just for the AVR...            01/01/70 00:00      
                                          I do not know, I did not ask            01/01/70 00:00      
                                             some snippets on AVRs...            01/01/70 00:00      
                                                interesting, evidently they have taken upon themse            01/01/70 00:00      
                                                   your link was broken            01/01/70 00:00      
                                                      But what about 1 instead of I?            01/01/70 00:00      
                                                         this is not about mistypes, it is about missing            01/01/70 00:00      
                                                            apparently, Atmel admits it...            01/01/70 00:00      
                                                               so where is the 51freaks equivalent            01/01/70 00:00      
                                                                  the "confirmation" is apparently...            01/01/70 00:00      
                                                               you just have to accept eric doesnt like atmel            01/01/70 00:00      
                                                   or            01/01/70 00:00      
               bit variables on WINAVR            01/01/70 00:00      
                  using avrstudio and gcc generated .coff files            01/01/70 00:00      
   well, the whole story seems to be not            01/01/70 00:00      
      My experience            01/01/70 00:00      
   just a few words            01/01/70 00:00      
      SiLabs non-American?            01/01/70 00:00      
         not the chip, the board            01/01/70 00:00      
   WINAVR experience            01/01/70 00:00      
      WinAVR <=> GCC            01/01/70 00:00      

Back to Subject List