8051 compilers

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

Reply to
Michael
Loading thread data ...

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.

Reply to
ghelbig

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
Reply to
Jim Relsh

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.

Reply to
Arlet Ottens

snipped-for-privacy@a39g2000pre.googlegroups.com...

een

ARM

Because Intel licenced it to anyone who wanted to get into the microcontroller market.

Because MANY people know the

Anyone can know the architecture inside out in a day, it@s so simple.

and it's more than fast enough for most control

If you only need a millisecond responce time then it will do, provided you program in assembler.

You need to junk it far sooner than that.

text -

Reply to
cbarn24050

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.
Reply to
Grant Edwards

On Nov 28, 4:17 pm, Michael wrote: [...]>

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.

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 (

Reply to
Dave Hansen

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.

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

Reply to
Paul Burke

Michael schrieb:

For professional use, Keil C seems a good choice. It comes with lot of manuals and they have good support forums. I personally haven't used it yet.

For student and beginners use, SDCC is not a bad choice. It is not as full featured but comes with a good manual and handles basic tasks very well. It doesn't seem to produce the tightest code possible but it is free and just works. Students who don't want to spend a lot of money and who run into the limitations of the Keil C demo can'T go much wrong if trying SDCC.

Maybe you should also ask at the

formatting link
forum? I'm sure you will receive useful ideas and comments on this subject aswell. Make sure to use the search function first to avoid being flamed ;)

cheers, Matthias

--
Matthias Arndt 
PGP-Key: http://www.final-memory.org/files/marndt.asc   ICQ: 40358321
>>> Jabber: simonsunnyboy@jabber.ccc.de
Reply to
Matthias Arndt

Go with the Keil, been using it for years.. works well and has very few bugs..

Reply to
thedoc

One reason I can think of is because the uC with the cool peripherals may not have a second source. So far I have not needed to redesign something because of a chip no longer being available.

Reply to
Gary Peek

I agree - and I've been telling my bosses that since I started working here. So far, I have been ignored, thus I am stuck with finding a new compiler.

-Michael

Reply to
Michael

When in doubt, write one!

--
Grant Edwards                   grante             Yow! The entire CHINESE
                                  at               WOMEN'S VOLLEYBALL TEAM all
                               visi.com            share ONE personality --
                                                   and have since BIRTH!!
Reply to
Grant Edwards

A new compiler is WAY cheaper than NEW HW, and having to support TWO processor variants. AVR is too similar to 8051, to make it worthwhile moving if you have lines of code, and boards already invested.

For new clean-sheet designs, (litte in common with present ones) look at the better 32 bit cores : AVR32 / PIC32 / ARM7 / ARM9 / Cortex M3 / Coldfire V1 / Z16F, or something japanese ....

-jg

Reply to
Jim Granville

Whoo here !!!

AVR is similar to 8051 !!??

What does this mean ??!!

The 8051 had many different memory segments.

The AVR is a flat memory architecture. ( IO registers and memory are in the same memory space )

Why do you think the AVR and 8051 have simular architecture ??

donald

Reply to
donald

The 'too similar', is in application footprints.

When you write in a HLL the core becomes "don't care", so things like package sizes, Code size, RAM, MHz, peripherals matter. - quite often, these select the device, NOT the core.

In the processor space, both the AVR an 80c51 have broadly similar performance, and offerings

8-100 pins, 1K-128K+

- if anything, the 8051 trumps the AVR if you need raw MHZ, (esp at low Vcc) or need high performance Analog (or even guaranteed analog specs), or Multisource.

80c51 has better interrupt structures : priorities, and register bank switching, and also has atomic boolean access, and true BIT variables. It was designed as a microcontroller.

So if you already use 80c51, don't bother look at AVR, look at AVR32 etc, for larger packages.

If you need lower pin counts, look at Silabs, Atmel, Winbond, NXP, CoreRiver (etc) and stay with 80c51 core.

-jg

Reply to
Jim Granville

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.