Forums

LPC900/80C51 Compiler Toolchain

Started by Unknown June 20, 2007
In article <UYAfqtGnvufGFApg@phaedsys.demon.co.uk>, Chris Hills says...
> In article <f5mlqf$o0f$02$1@news.t-online.com>, Hans-Bernhard Br&#2013266166;ker > <HBBroeker@t-online.de> writes > >Chris Hills wrote: > > > >> In any event Sw is not pantentable. > > > >You should tell the USPTO that. And the EPO, too, while at it. And > >the hundreds of developers who found themselves threatened with > >lawsuits over the LZW patent, too. > > > >Software is explicitly declared non-patentable in the documents > >establishing the European Patent Office. > > Yes. There are no patents for software. > > > Yet the GIF patent prevailed. > > That was not the law that prevailed but commerce. It is not likely to > have the same effecting a year or two. > > >> OK then can some one PROVE how FOSS compilers are more advanced or > >>*at least* as good as commercial ones? > > > >Not unless we all agree on a quantifiable measur of "advanced" or > >"good" first. Which, of course, is the core of the problem. > > > >Proprietary tools cause certain risks to their users, primarily by > >tying your project's long-term survival to that of the tool vendor, > > Not seen that happen so far. SO far there always seems to be a way > around that.
I've not seen it yet for compilers but I have seen it for PCB CAD software. Case 1 - Product (PCB CAD) had a HW dongle and refused to work when HW was updated. The product had been abandoned at that point (I seem to remember takeovers being involved). A fix for new HW/OS not available. Case 2 - This one a compler. Abandoned by the original company. Thankful no HW or SW dongle so it could continue to be used through multiple OS and HW updates. Unfortunately compiler companies have moved to SW dongles (particularly FlexLm (spit! Ack!)) so case 2 looks like an increasing doubtful precedent to rely on. Bottom line micros with a GCC port will get used before micros w/o. If a micro has no open source compiler of reasonable (best not necessary) quality and no undongled commercial SW then it has to be a lot better/cheaper to be worth considering. Inexpensive ARM7s provide a large hurdle for any proprietary micro with no GCC port to clear. Since I've seen compilers add dongling after purchase, even undongled compilers get second biling. Robert -- Posted via a free Usenet account from http://www.teranews.com
>>Proprietary tools cause certain risks to their users, primarily by tying >>your project's long-term survival to that of the tool vendor, > > Not seen that happen so far. SO far there always seems to be a way around > that.
Umm - how about the Keil ARM compiler - now defunct. I'm just being pedantic here, I don't actually see this as relevant. Switching from one compiler to another is usually a very simple exercise. I don't have too much experience in the 8051 market, but am asked a lot by customers about ARM compilers. Once I go through the various pros and conns of each there is one thing that normally swings the decision, and this one thing is not actually a techincal attribute. Officially I'm compiler neutral so I'm not going to say what the one thing is :o)
>> possibly extending to a hostage-taking kind of situation. > > Not seen that happen do you have a case of that? Or is this just making up > FUD like everyone is saying MS are doing.
I know of cases of this in the OS market. Could not comment on the compiler market. -- Regards, Richard. + http://www.FreeRTOS.org A free real time kernel for 8, 16 and 32bit systems. + http://www.SafeRTOS.com An IEC 61508 certified real time kernel for safety related systems.
Chris Hills wrote:
> In article <NwAfi.11116$p8.10051@text.news.blueyonder.co.uk>, > FreeRTOS.org <noemail@address.com> writes >>> >>> OK then can some one PROVE how FOSS compilers are more advanced or *at >>> least* as good as commercial ones? >>> >> >> Wanting to remain an observer of this debate - however I am >> curious......what is this advancement buying you? Considering the law of >> diminishing returns, what does last years advancement get me? If its an >> extra micro seconds per control loop, and this is important to me, then I >> chose the wrong processor - not the wrong compiler. > > Yes much better compression and execution speed. > I have seen several programs that the Keil 2/4/8k limited compilers > could get to run on a 51 that the unlimited SDCC could not. > > The problem is when they want to add "just one more feature" without > changing the whole design. For example... smart cards and mobile SIMS > and many other things. Especially when by law you need to add something > to an old system or to change some IO because they are new sensors. > > Ideally you would scrap the whole system and start again to ad a small > change to an end of life product. > > The other problem is that there are new extended 8051 family members. > The ones with 8Mg adress space in both code and data areas. Internal > (on chip) External data space. And all sorts of things in the new parts > that the better commercial compilers will cope with the the FOSS ones don't > > I do find it strange that people are arguing so strongly for using > second rate tools in their profession. What would you think of a doctor, > dentist, aeronautical engineer who argued the same? >
I would normally expect a doctor, dentist or aeronautical engineer to use "second rate" tools when appropriate. I expect a doctor to use a very different level of quality in the tools used for brain surgery and the tools used to sew up a small cut in a finger. What people here are arguing for is not that we should prefer low quality tools, but that we should prefer *appropriate* quality tools. We need tools that are good enough for the job - beyond that, you can compare on things like price, availability, support, additional features, and whatever else interests you. As Richard says, what do these advancements give you? If I have an 8051 with 8K Flash, and SDCC compiles my program to 4K, then what benefit is a Keil compiler that compiles it to 2.5K ? It's a different matter if the figures are 10K for SDCC and 7K for Keil. In the first case, SDCC is good enough, and therefore a perfectly viable choice - in the second case, it is *not* good enough.

David Brown wrote:

> If I have an 8051 > with 8K Flash, and SDCC compiles my program to 4K, then what benefit is > a Keil compiler that compiles it to 2.5K ?
Lower EMI and power consumption to name two benefits. Walter..
In article <467FBF4C.A1680365@bytecraft.com>, Walter Banks 
<walter@bytecraft.com> writes
> > >David Brown wrote: > >> If I have an 8051 >> with 8K Flash, and SDCC compiles my program to 4K, then what benefit is >> a Keil compiler that compiles it to 2.5K ? > >Lower EMI and power consumption to name two benefits. > >Walter..
Also because the program may still not run with the SDCC compiler Code size is only one component on a Harvard Architecture. The usual problem with the SDCC is running out of DATA space long before the CODE space limit of the Keil compiler becomes a problem. I keep saying this. It is important. So your SDCC compiler produces 4K of CODE but still can not get the Data to fit. What then? If the Keil fits twice as much code into the space as the SDCC you will run out of CODE space very much faster using the SDCC. (Code ALWAYS expands:-) What then? SDCC is OK if you are using a standard 8051 with a small program with no data, no power or EMI limitations that will not expand or need to be ported to another 8051. The program has to be simple... what are you going to debug it with? AFAIK SDCC has no simulator/debugger Chris -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Walter Banks wrote:
> > David Brown wrote: > >> If I have an 8051 >> with 8K Flash, and SDCC compiles my program to 4K, then what benefit is >> a Keil compiler that compiles it to 2.5K ? > > Lower EMI and power consumption to name two benefits. >
Yes, I know those are other benefits of having faster programs, but that's irrelevant here. My point is that if SDCC (or some other free or low-cost tool) does a good enough job for what you need, then is there any reason for buying something more expensive and more advanced? The answer is, of course, no. It seems, in this thread, that Chris Hills is having a great deal of difficulty in understanding the concept of "good enough", and fails to understand why anybody would ever be happy with a tool that is not the absolute best available solution. I *know* there are many advantages in a compiler that produces smaller and faster code - but often that is irrelevant. I *know* there are advantages in having a compiler that has been through all sorts of industry standard torture tests, but that too can be irrelevant. I *know* there are advantages in a compiler that is easy to install, or easy to work with - but again, that may not matter (and it's a subjective issue anyway). "The best is the enemy of the good" (Voltaire, if google got it right.)
On 24 Jun, 01:39, Chris Hills <c...@phaedsys.org> wrote:

> However as over many years I have discussed in private with many > commercial compiler developers, code analysis developers and seen the > results of their tests I have been able to form a good picture. Most of > what I have seen or been able to examine is under NDA.
I'm with you on this one. In 2006 the latest GCC compiler was not able to match the codesize or performance of an ARM compiler that was released in 1995. The only target GCC is good at is x86, partly because it gets a lot more attention than any other target, partly because most of the optimizations happen in hardware anyway.
> The problem is the FOSS Sw is just that. Open. So any development is > seen by all the commercial tool developers. However the reverse is not > true. So anything FOSS has the commercial people also have and > therefore FOSS can not be more advanced. At best it can only be equal.
I don't believe commercial companies look closely at GCC source code. Many companies have strict policies that stop people from even looking at open source code to avoid accidentally copying stuff. However any good compiler expert only needs to look at the generated code in order to "borrow" optimizations.
> On top of that the commercial developers get access to the silicon > companies and some sophisticated development tools and test suites. How > many GCC or SDCC compilers have been run against Plum-Hall or Perennial?
Full access to silicon/FPGA and specs is essential to provide a well tuned compiler indeed. I don't think that is a barrier to open source, there are many well respected open source companies that would be given access to these things (and I know that happens). I wouldn't call the commercial test suites very good, most compiler teams develop their own testsuites as none are good enough to test a compiler.
> Test suites that are rigorous can cost more recourse to develop than the > compiler itself.
Quite possibly.
> There are techniques used in the commercial tools that are not used in > Gcc or SDCC and the like. To maintain their advantage the commercial > tool companies are not going to tell FOSS developers what these are. > Though in some cases like DATA overlaying on the 8051 knowing what is > done is of little help. There is a lot of effort involved in data > overlaying and other forms of optimisation.
As I said above, one doesn't need to know what the techniques are, it's relatively easily to deduce from the generated code. Interestingly, open source compilers use more modern techniques than commercial compilers (which were created in the 1980's). However technology alone doesn't make a good compiler, you need to know how to use it. The main difference between a good compiler and a mediocre one is the amount of effort that has gone into fine tuning it. And this is where I think commercial development has the advantage. Compiler vendors find and pay the best people to do whatever it takes to make the compiler as good as possible (with the idea that this large investment will pay itself off later). I don't see this kind of dedication in open source compilers, as developers usually don't get paid for their work and so don't attract the best people. The ARM port of GCC for example was neglected for years (with Thumb not working at all) until ARM paid for it to be fixed and brought up to date with the latest architectures. That's said, I don't believe one or the other is inherently better. I would be happy to put a few years into turning GCC into a really good compiler that beats most commercial ones. However who is going to pay me my consulting rate? Big companies with their own compilers... I'm currently in Seattle :-) Wilco
wilco.dijkstra@ntlworld.com wrote:
> And this is where I think commercial development has the > advantage. Compiler vendors find and pay the best people > to do whatever it takes to make the compiler as good as > possible (with the idea that this large investment will > pay itself off later). I don't see this kind of > dedication in open source compilers, as developers > usually don't get paid for their work and so don't > attract the best people.
This is non-sense. I think you'll find that most of the GCC developers are being paid to work on GCC. Just look at the GCC steering committee: <http://gcc.gnu.org/steering.html> Next, you may want to look at the list of contributers: <http://gcc.gnu.org/onlinedocs/gcc/Contributors.html> While GCC work *may* be done by anyone, serious development and maintenance of this cornerstone of Free Software is mostly done by paid skilled professionals, whose employers understand the value of the GCC.
> The ARM port of GCC for example was neglected for years > (with Thumb not working at all) until ARM paid for it to > be fixed and brought up to date with the latest > architectures.
Demand drives GCC just like demand drives the commercial compilers. -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." The Eagles, "Already Gone" The Beatles were wrong: 1 & 1 & 1 is 1
In article <1182781203.153856.318520@m36g2000hse.googlegroups.com>, 
wilco.dijkstra@ntlworld.com writes
>On 24 Jun, 01:39, Chris Hills <c...@phaedsys.org> wrote: > >> However as over many years I have discussed in private with many >> commercial compiler developers, code analysis developers and seen the >> results of their tests I have been able to form a good picture. Most of >> what I have seen or been able to examine is under NDA. > >I'm with you on this one. In 2006 the latest GCC compiler was not able >to match the codesize or performance of an ARM compiler that was >released in 1995. The only target GCC is good at is x86, partly >because it gets a lot more attention than any other target, partly >because most of the optimizations happen in hardware anyway.
Thanks. How come if you and I (and Walter) can see it no one else can? This is my argument FOSS Devotees are blinded by their "religion"
>And this is where I think commercial development has the advantage. >Compiler vendors find and pay the best people to do whatever it takes >to make the compiler as good as possible (with the idea that this >large investment will pay itself off later). I don't see this kind of >dedication in open source compilers, as developers usually don't get >paid for their work and so don't attract the best people.
Now the FOSS people seem to argue the opposite. They say commercial compilers that are closed source no one really cares about code standards because the outside world can't see it. But because the Open source can be seen by all far more care is taken....
> The ARM port >of GCC for example was neglected for years (with Thumb not working at >all) until ARM paid for it to be fixed and brought up to date with the >latest architectures.
However they brought it up to date and left it there... which is not the same as actively supporting it.
>That's said, I don't believe one or the other is inherently better. I >would be happy to put a few years into turning GCC into a really good >compiler that beats most commercial ones. However who is going to pay >me my consulting rate? Big companies with their own compilers... I'm >currently in Seattle :-) >Wilco
I know that several companies have put an Engineer on to GCC for 5-10 days "for fun" * to see what they could do with it and all managed to get huge increases in code density and speed. (Not on X86 though) * Actually in all cases it was to see how competitive Gcc *might* be if it was properly developed.. However much FOSS is effectively becoming commercial now anyway. The only difference is the core programmers don't get paid, yet the FOSS Devotees love it. Turkeys voting for Christmas. -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
In article <FCQfi.7283$G9.2019@bignews6.bellsouth.net>, Michael N. Moran 
<mnmoran@bellsouth.net> writes
>wilco.dijkstra@ntlworld.com wrote: >> And this is where I think commercial development has the >> advantage. Compiler vendors find and pay the best people >> to do whatever it takes to make the compiler as good as >> possible (with the idea that this large investment will >> pay itself off later). I don't see this kind of dedication in open >>source compilers, as developers >> usually don't get paid for their work and so don't >> attract the best people. > >This is non-sense. I think you'll find that most of the GCC >developers are being paid to work on GCC.
Like Linux. Gcc is now commercial
>> The ARM port of GCC for example was neglected for years >> (with Thumb not working at all) until ARM paid for it to >> be fixed and brought up to date with the latest >> architectures. > >Demand drives GCC just like demand drives the commercial >compilers.
The problem is that the FOSS Devotees think that everyone who does any work on GCC is a Devotee. There are many cynical non-belivers who are not helping in order to help the faith..... they have other objectives and don't care if FOSS sinks or swims. \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/