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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/19/09 22:37
Read: times


 
#166271 - If bugs is a big problem - consider your compiler choices
Responding to: ???'s previous message
Richard said:
If you go back to http://www.8052.com/forum/read/166228 you'll find my remark that having a single compiler that supports multiple cores is "flexible" and, I believe, SDCC is more so than KEIL.

Sorry, but you totally missed your target since your post does not contain anything about flexibility.

Richard said:
However, there have been many, Many, MANY queries about "why doesn't this work" when it works with a different compiler. That was the main thrust of my comments.

One more totally missed thrust. Lack of competence in C by the people who ask "why doesn't this work" is irrelevant to the ability of a compiler to support different cores or different architectures, or how hard it is to switch between different compiler vendors.

Richard said:
If one has a compiler that supports multiple MCU's, it's likely it will be easier than using different compilers for each MCU one uses, simply because one gradually learns the ins and outs of a given tool.

I think I have closer to 20 compilers installed. I have never seen this as a problem. One for a family of small PIC processors, one for a family of larger PIC processors, one for Atmel AVR, three for ARM (RVCT, gcc, Keil MDK), three for 16-bit x86 (Borland, Paradigm, MSC), three for 32-bit x86 (VC, MinGW, Cygwin gcc), one for ppc, ... And besides the different compilers, it isn't uncommon that I have more than one version of them too, since released products are normally locked to a specific compiler version.

The fact here is that after you have worked with a number of compilers, you will notice that it is way easier to move between different compilers (same vendor-different architectures, different vendors-same architecture, different vendors-different architectures) than it is to move betewen different architectures. And that it normally doesn't matter much if moving between two vendors when switching architecture or using a compiler that has support for both architectures. Any specific knowledge about gcc for ARM doesn't help much when you use gcc for PPC or gcc for AVR or gcc for x86, so in the end it is normally better to shop around for a compiler people think is very good than to select a compiler just because I have worked with other variantes in the "compiler family" or from the same vendor.

Richard said:
What I'd want to do is to avoid switching software vendors, because then I have to learn and remember a long list of bugs for each

I'm not much helped knowing any bug list for WinAVR (gcc) if switching to ppc_8xx-gcc. The front-end is the same, but the important part of the compiler is normally the back-end. In the end, the two compilers are like night-and-day. And if you do suffer from bugs, you are way more likely to find the bugs in the backend than in the common code shared between the different variants.

Richard said:
While few software tools are totally bug-free, remembering which tool has wich bugs is tedious. Software is supposed to enhance productivity, and not get in the way.

Long time ago, I had to report a number of compiler bugs with the Borland and Microsoft compilers. I hate the Microchip compiler that can't even handle standard C constructs. The ancient Microsoft C compiler could be tricked into failing to compile sometimes because of bad register allocation strategies but then we are talking about a 20-25 year old compiler. I don't know much about the WinAVR compiler since I quickly decided to only use assembler for any AVR project.

But in the end, I have hardly ever had need to worry about problems with the compilers I use. The bugs are normally in the supplied GUI, and it is so easy to use Code::Blocks, Crimson or similar when editing the sources and use commandline compilation.

The big thing is to know C, and to know the target hardware. Differences between two compilers is more like differences between two chips in the same family, i.e. a very trivial problem to handle. I don't see it as important that SDCC supports multiple architectures. I would still jump around when selecting compiler based on the requirements for a specific project. gcc also has support for a multitude of architectures and I use gcc a lot for some platforms. For other platforms, I go for other compilers because I think they are better suited. That their command-line parameters are different or they require a new set of environment variables for their library and header directories or that their #pragmas or chip extensions differ a bit doesn't really matter in the end. It represents so tiny part of the project.

In the end, the linker configuration files are often way harder to handle than the differences with the compiler, since all vendors invents their own "clever" ways of scatter-load your binary. But if vendor A has way better compiler or RTL than vendor B for a specific architecture, then that will be the deciding factor - not the amount of work to create the linker configuration files.

List of 95 messages in thread
TopicAuthorDate
What's wrong with gimme code?            01/01/70 00:00      
   Mainly            01/01/70 00:00      
      I agree with Jez Smith            01/01/70 00:00      
         Non academic gimme code?            01/01/70 00:00      
            This makes me very suspicious            01/01/70 00:00      
            gimme code=my own time is too valuable            01/01/70 00:00      
               Easy to see which is school assignment            01/01/70 00:00      
                  The wise student needs pointers, not complete solutions            01/01/70 00:00      
            "Here's what I've come up with ...            01/01/70 00:00      
               But what's wrong in asking for an example implementaton?            01/01/70 00:00      
                  The teacher recognises the good student            01/01/70 00:00      
                     Now there's a laugh if ever there was one ...            01/01/70 00:00      
                  nothing IF ...            01/01/70 00:00      
            children should do their own homework            01/01/70 00:00      
   What's wrong with gimmee code.            01/01/70 00:00      
   Sounds Like; Whats wrong with Spoon Feeding..?            01/01/70 00:00      
      perhaps it enables ...            01/01/70 00:00      
         Generic solutions applicable to more people            01/01/70 00:00      
         Then they'll become expert at potty ...            01/01/70 00:00      
   it makes you dumb!            01/01/70 00:00      
   How'd you like ten of those guys working for you?            01/01/70 00:00      
      But that's the point!            01/01/70 00:00      
         We agree in principle, Kai ... but ...            01/01/70 00:00      
         Hiring & firing is expensive!            01/01/70 00:00      
            and that's not all!            01/01/70 00:00      
   As an example            01/01/70 00:00      
      No-one is suggesting breach of copyright            01/01/70 00:00      
         arrogance?            01/01/70 00:00      
            Examples of Erik's arrogance            01/01/70 00:00      
               no, I do not state any such,            01/01/70 00:00      
                   A couple of corrections            01/01/70 00:00      
                     more useful product?            01/01/70 00:00      
         life is not B&W            01/01/70 00:00      
            Good help _is_ to a big part to give hints            01/01/70 00:00      
               Votes and freedom of speech?            01/01/70 00:00      
               When I was a youngster ...            01/01/70 00:00      
                  Returning to the original subject.            01/01/70 00:00      
                     same same but sometimes different            01/01/70 00:00      
                     Since you like AVRFREAKS so much ...            01/01/70 00:00      
                  Versatility and diversification            01/01/70 00:00      
                     This is 8052.COM            01/01/70 00:00      
                  and.....            01/01/70 00:00      
         There's always help for those who can do their own work.            01/01/70 00:00      
            There's the key!            01/01/70 00:00      
         that is not the issue            01/01/70 00:00      
            I'm with you 100% on that, Erik            01/01/70 00:00      
               calm down Richard            01/01/70 00:00      
                  support for more MCU's makes it more widely useful            01/01/70 00:00      
                     it?            01/01/70 00:00      
                        Which MCU's will KEIL support?            01/01/70 00:00      
                           Irrelevant            01/01/70 00:00      
                              Keil's blind spot            01/01/70 00:00      
                                 Keil will probably get squeezed            01/01/70 00:00      
                              If only that were the case            01/01/70 00:00      
                                 Portable 'C' [edited]            01/01/70 00:00      
                                 Write what you mean or mean what you write            01/01/70 00:00      
                                    OK ... Here's the point            01/01/70 00:00      
                                       If bugs is a big problem - consider your compiler choices            01/01/70 00:00      
                                 C is not that difficult            01/01/70 00:00      
                                    I can't totally disagree ... it's a matter of degree            01/01/70 00:00      
                                    Richard misses the point completely            01/01/70 00:00      
                  The thing is...            01/01/70 00:00      
                     I don't think thats true at all            01/01/70 00:00      
                        Not what I meant            01/01/70 00:00      
                           Andy's right!            01/01/70 00:00      
         elders and betters would have given a helpful reply.            01/01/70 00:00      
   If you think 8052.com is bad ...            01/01/70 00:00      
   When was it the last time someone asked for code?            01/01/70 00:00      
      oohhh            01/01/70 00:00      
      Here?            01/01/70 00:00      
      Latest example of "Gimme Code"            01/01/70 00:00      
   What the forums are all about            01/01/70 00:00      
      Progress            01/01/70 00:00      
         No, don't agree with "exhausted all the possibilities"            01/01/70 00:00      
            patience            01/01/70 00:00      
         inexperienced            01/01/70 00:00      
            Well actually...            01/01/70 00:00      
               you must have a very smart wife            01/01/70 00:00      
                  If you're a friend ;-)            01/01/70 00:00      
      arrogant?            01/01/70 00:00      
         encouragement            01/01/70 00:00      
            absolutely            01/01/70 00:00      
            What you have to remember            01/01/70 00:00      
               Tim Berners-Lee            01/01/70 00:00      
                  he only invented the web thingy            01/01/70 00:00      
                     Exhausted all the possibilities...            01/01/70 00:00      
                        this is just not fair            01/01/70 00:00      
                           It's about attitude            01/01/70 00:00      
                              on intentions etc.            01/01/70 00:00      
                              98% of 100            01/01/70 00:00      
                           good and bad            01/01/70 00:00      
      OK Charles (et al), here's your chance!            01/01/70 00:00      
         re: OK Charles here's your chance            01/01/70 00:00      
            QED.            01/01/70 00:00      
            Yet one more exhausted visitor            01/01/70 00:00      

Back to Subject List