EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

8051 compilers

Started by Michael November 28, 2007
Hi there - I am stuck developing code for 8051 uCs. We have been using
the Dunfield compiler, but it looks like we are going to be moving
towards a more complete compiler. I have been using the 1K demo of
Keil, and it seems to be decent. I've run into a bug or two, but no
deal breakers just yet. I've used IAR's Embedded Workbench for ARMs,
but have yet to play around with their 8051 tools. There also seem to
be a number of others out there, including the free SDCC. I will be
developing code for Silicon Labs 8051s, if that matters.

Any opinions on which are the better compilers? They all seem to be
priced in the same area (besides a couple really low end ones, like
Dunfield) - so mostly I'm curious about features, bugs, support, etc.

Thanks!

-Michael
On Nov 28, 6:14 am, Michael <nleah...@gmail.com> wrote:
> Hi there - I am stuck developing code for 8051 uCs. We have been using > the Dunfield compiler, but it looks like we are going to be moving > towards a more complete compiler. I have been using the 1K demo of > Keil, and it seems to be decent. I've run into a bug or two, but no > deal breakers just yet. I've used IAR's Embedded Workbench for ARMs, > but have yet to play around with their 8051 tools. There also seem to > be a number of others out there, including the free SDCC. I will be > developing code for Silicon Labs 8051s, if that matters. > > Any opinions on which are the better compilers? They all seem to be > priced in the same area (besides a couple really low end ones, like > Dunfield) - so mostly I'm curious about features, bugs, support, etc. > > Thanks! > > -Michael
I have a number of opinions about 8051 compilers. If the project is large enough to need a C compiler, the 8051 probably isn't the right choice. This cockroach of microprocessors has been around for 30 years, and just won't die. For $3, I can get and ARM chip with more memory than the 8051 can address, and a bunch of cool peripherals; why would I want to use that dinosaur? I've used the SDCC tools, the Intel tools, and the Keil tools for the 8051. Getting binaries from the SDCC tool chain is a lot like herding cats. The Intel tools give great results, but have a steep learning curve. The Keil tools seem to be the Industry Norm, and once the few quirks present are worked out, give good results. No C compiler is going to produce good code for an 8051; the architecture does not work well with high-level languages. So take what you get, and call it "good enough". Remember, these are just my opinions, G.

<ghelbig@lycos.com> schreef in bericht 
news:204cf97c-7acb-4585-9cd8-000637468b7f@a39g2000pre.googlegroups.com...
> On Nov 28, 6:14 am, Michael <nleah...@gmail.com> wrote: >> Hi there - I am stuck developing code for 8051 uCs. We have been using >> the Dunfield compiler, but it looks like we are going to be moving >> towards a more complete compiler. I have been using the 1K demo of >> Keil, and it seems to be decent. I've run into a bug or two, but no >> deal breakers just yet. I've used IAR's Embedded Workbench for ARMs, >> but have yet to play around with their 8051 tools. There also seem to >> be a number of others out there, including the free SDCC. I will be >> developing code for Silicon Labs 8051s, if that matters. >> >> Any opinions on which are the better compilers? They all seem to be >> priced in the same area (besides a couple really low end ones, like >> Dunfield) - so mostly I'm curious about features, bugs, support, etc. >> >> Thanks! >> >> -Michael > > I have a number of opinions about 8051 compilers. > > If the project is large enough to need a C compiler, the 8051 probably > isn't the right choice. This cockroach of microprocessors has been > around for 30 years, and just won't die. For $3, I can get and ARM > chip with more memory than the 8051 can address, and a bunch of cool > peripherals; why would I want to use that dinosaur?
Why do you reckon MCS-51 is still being used? Because MANY people know the architecture inside-out and it's more than fast enough for most control tasks which don't require a spiffy graphical UI in full color. As soon as your task requires an operating system (Linux or an RTOS) or graphical interface MCS-51 shouldn't be used and ARM is a *far* better choice. As you already pointed out, cost isn't the issue anymore. -- Posted via a free Usenet account from http://www.teranews.com
ghelbig@lycos.com wrote:
> On Nov 28, 6:14 am, Michael <nleah...@gmail.com> wrote: >> Hi there - I am stuck developing code for 8051 uCs. We have been using >> the Dunfield compiler, but it looks like we are going to be moving >> towards a more complete compiler. I have been using the 1K demo of >> Keil, and it seems to be decent. I've run into a bug or two, but no >> deal breakers just yet. I've used IAR's Embedded Workbench for ARMs, >> but have yet to play around with their 8051 tools. There also seem to >> be a number of others out there, including the free SDCC. I will be >> developing code for Silicon Labs 8051s, if that matters. >> >> Any opinions on which are the better compilers? They all seem to be >> priced in the same area (besides a couple really low end ones, like >> Dunfield) - so mostly I'm curious about features, bugs, support, etc. >> >> Thanks! >> >> -Michael > > I have a number of opinions about 8051 compilers. > > If the project is large enough to need a C compiler, the 8051 probably > isn't the right choice. This cockroach of microprocessors has been > around for 30 years, and just won't die. For $3, I can get and ARM > chip with more memory than the 8051 can address, and a bunch of cool > peripherals; why would I want to use that dinosaur?
I'm doing the support of some 35K line project in C for the 8051 :) It uses 7 memory banks, and does plenty of floating point stuff, and other things that the 8051 isn't really suitable for, such as pointers to functions. I'm fairly sure the 8051 is not the best choice for the job, but I'm dealing with an existing design, so changing the CPU is not an option. If you do have that luxury, I would recommend picking a more capable architecture such as an ARM. I'm using the Keil compiler, and it does manage to convert all of this code into something that actually runs.
On Nov 28, 6:19=EF=BF=BDpm, "Jim Relsh" <jrel...@gmail.com> wrote:
> <ghel...@lycos.com> schreef in berichtnews:204cf97c-7acb-4585-9cd8-0006374=
68b7f@a39g2000pre.googlegroups.com...
> > > > > > > On Nov 28, 6:14 am, Michael <nleah...@gmail.com> wrote: > >> Hi there - I am stuck developing code for 8051 uCs. We have been using > >> the Dunfield compiler, but it looks like we are going to be moving > >> towards a more complete compiler. I have been using the 1K demo of > >> Keil, and it seems to be decent. I've run into a bug or two, but no > >> deal breakers just yet. I've used IAR's Embedded Workbench for ARMs, > >> but have yet to play around with their 8051 tools. There also seem to > >> be a number of others out there, including the free SDCC. I will be > >> developing code for Silicon Labs 8051s, if that matters. > > >> Any opinions on which are the better compilers? They all seem to be > >> priced in the same area (besides a couple really low end ones, like > >> Dunfield) - so mostly I'm curious about features, bugs, support, etc. > > >> Thanks! > > >> -Michael > > > I have a number of opinions about 8051 compilers. > > > If the project is large enough to need a C compiler, the 8051 probably > > isn't the right choice. =EF=BF=BDThis cockroach of microprocessors has b=
een
> > around for 30 years, and just won't die. =EF=BF=BDFor $3, I can get and =
ARM
> > chip with more memory than the 8051 can address, and a bunch of cool > > peripherals; why would I want to use that dinosaur?
> > Why do you reckon MCS-51 is still being used?
Because Intel licenced it to anyone who wanted to get into the microcontroller market. Because MANY people know the
> architecture inside-out
Anyone can know the architecture inside out in a day, it@s so simple. and it's more than fast enough for most control
> tasks which don't require a spiffy graphical UI in full color.
If you only need a millisecond responce time then it will do, provided you program in assembler.
> > As soon as your task requires an operating system (Linux or an RTOS) or > graphical interface MCS-51 shouldn't be used and ARM is a *far* better > choice. As you already pointed out, cost isn't the issue anymore.
You need to junk it far sooner than that.
> > -- > Posted via a free Usenet account fromhttp://www.teranews.com- Hide quoted =
text -
> > - Show quoted text -
On Nov 28, 12:31 pm, ghel...@lycos.com wrote:
> > I have a number of opinions about 8051 compilers. > > If the project is large enough to need a C compiler, the 8051 probably > isn't the right choice. This cockroach of microprocessors has been > around for 30 years, and just won't die. For $3, I can get and ARM > chip with more memory than the 8051 can address, and a bunch of cool > peripherals; why would I want to use that dinosaur?
I agree completely. Unfortunately my hands are tied. I'm pushing to switch over to Atmel AVRs, but since I am just a lowly engineer who doesn't know anything (*cough*) I have no say in the matter. This is all for code that I'm developing for new hardware, not old, mind you. I've been considering just quietly doing the next board with an AVR and seeing if anybody bitches.
> I've used the SDCC tools, the Intel tools, and the Keil tools for the > 8051. Getting binaries from the SDCC tool chain is a lot like herding > cats. The Intel tools give great results, but have a steep learning > curve. The Keil tools seem to be the Industry Norm, and once the few > quirks present are worked out, give good results. > > No C compiler is going to produce good code for an 8051; the > architecture does not work well with high-level languages. So take > what you get, and call it "good enough".
I've been using the Keil compiler and it's definitely at least OK. I just talked with them and they said it'd cost me $2895 for the full set of tools. IAR's toolset would set us back $2426. The Keil salesperson was utterly clueless and about as helpful as a rock, while the IAR salesperson was quite helpful and seemed to know what he was talking about. Can you tell me more about SDCC? I suspect I'd make my boss very happy if he didn't have to fork over for IAR or Keil. -Michael
On 2007-11-28, Michael <nleahcim@gmail.com> wrote:

> Can you tell me more about SDCC? I suspect I'd make my boss very happy > if he didn't have to fork over for IAR or Keil.
Then you definitely should switch to AVR. The free tools for AVR are much better. The gcc port for AVR is definitely production quality, and AVR-Studio from AVR is free. -- Grant Edwards grante Yow! Being a BALD HERO at is almost as FESTIVE as a visi.com TATTOOED KNOCKWURST.
On Nov 28, 4:17 pm, Michael <nleah...@gmail.com> wrote:
[...]>
> I've been using the Keil compiler and it's definitely at least OK. I > just talked with them and they said it'd cost me $2895 for the full > set of tools. IAR's toolset would set us back $2426. The Keil > salesperson was utterly clueless and about as helpful as a rock, while > the IAR salesperson was quite helpful and seemed to know what he was > talking about.
The last time I used Keil (about 7 years ago on an 8051 project) the product was solid and support was exceptional. The last time I used IAR (about 5 years ago on an AVR project) the product was solid, but support was patchy at best. Previous experiences with IAR tools and support have never been greatly positive either. All IME, the situation may have changed at either (or both) of the companies.
> > Can you tell me more about SDCC? I suspect I'd make my boss very happy > if he didn't have to fork over for IAR or Keil.
I've not used SDCC, but as Grant said, avr-gcc is an exceptional tool, well supported and free. If you can find an AVR device to suit your needs, and you don't want to pay for tools, this is definitely the way to go. Getting all the free tools (debugger, chip programmer, etc.) isn't trivial, but it isn't too difficult either. And there's a lot of help available on the 'net. I've also used CodeVisionAVR, an inexpensive (<US$200) tool that's very well supported. CVAVR has some issues with ANSI compatibility, but it comes with support tools (such as a wizard to generate code to initialize the hardware on your chip) and libraries (including LCD and one-wire device interfaces) that really do simplify code development. If you have working hardware, you can literally have code running in your device within 10 minutes of installing the tool. And an AVR is ever so much more pleasant to work with than an 8051... Regards, -=Dave
ghelbig@lycos.com wrote:

> If the project is large enough to need a C compiler, the 8051 probably > isn't the right choice. This cockroach of microprocessors has been > around for 30 years, and just won't die. For $3, I can get and ARM > chip with more memory than the 8051 can address, and a bunch of cool > peripherals; why would I want to use that dinosaur? >
Not all systems require vast speed and/ or concise code. Time to market is also a consideration, as is supply. The 80x5x is sufficiently multisourced in pin- compatible packages to give users peace of mind. You can't say that for ARM; many of the variants available come from suppliers with a track record of dumping lines when the (one) big customer changes his requirements.
> I've used the SDCC tools, the Intel tools, and the Keil tools for the > 8051. Getting binaries from the SDCC tool chain is a lot like herding > cats. The Intel tools give great results, but have a steep learning > curve. The Keil tools seem to be the Industry Norm, and once the few > quirks present are worked out, give good results. >
Dunfield is light and quirky; it's a small-C sort of thing, and it works, you can easily get working code stuffed into your application. I've also used Raisonance, but that was when it was only 300 Euros. It is mostly very good, and I expect they've ironed out some of the bent bits by now. Nice-ish IDE, crap in-house RTOS. When the disk it's on dies, I'll drop it, because it's keyed to the HDD. But I'm sure eventually an agreed set of small-to-medium bellyjean ARMs will develop, that our sons and daughters will be grumbling about in 30 years time. PB
> > I've been using the Keil compiler and it's definitely at least OK. I > just talked with them and they said it'd cost me $2895 for the full > set of tools. IAR's toolset would set us back $2426. The Keil > salesperson was utterly clueless and about as helpful as a rock, while > the IAR salesperson was quite helpful and seemed to know what he was > talking about. > > Can you tell me more about SDCC? I suspect I'd make my boss very happy > if he didn't have to fork over for IAR or Keil.
I am using SDCC and it works fine for me. 2 pretty large projects (32K o f code each). It supports 8051 architecture (and few others) and also has includes for different vendors (Atmel, Simens ...) You need to used to it, write makefiles (I did) and then it goes easy. I don't see the point in spending 2K for compiler really unless you don't care.

The 2024 Embedded Online Conference