Re: Microcontroller Compilers (C)

Klaus Rotter <>
15 Feb 2001 00:33:05 -0500

          From comp.compilers

Related articles
Microcontroller Compilers (C) (2001-02-12)
Re: Microcontroller Compilers (C) (Jan Gray) (2001-02-15)
Re: Microcontroller Compilers (C) (Klaus Rotter) (2001-02-15)
Re: Microcontroller Compilers (C) (2001-02-15)
Re: Microcontroller Compilers (C) (Kyle) (2001-02-15)
Re: Microcontroller Compilers (C) (2001-02-15)
Re: Microcontroller Compilers (C) (Preston Gurd) (2001-02-15)
Re: Microcontroller Compilers (C) (QarnoS) (2001-02-15)
Re: Microcontroller Compilers (C) (2001-02-15)
[5 later articles]
| List of all articles for this month |

From: Klaus Rotter <>
Newsgroups: comp.compilers
Date: 15 Feb 2001 00:33:05 -0500
Organization: Rotter GbR
References: 01-02-046
Keywords: C
Posted-Date: 15 Feb 2001 00:33:05 EST

Matt Guthaus <> wrote:
> I've been looking at GCC (Using and Porting the GNU Compiler Collection)
> and LCC. However, it seems that neither of these compilers is well adapted
> to 8- or 16-bit microcontrollers. GCC has only two 16-bit machine definition
> files (PDP11 and dsp16xx) and LCC has none.

Please look at the actual developers verfsion of gcc, it's called
egcs. There is a well done port of gcc to Atmels 8-bit uC AVR. There
exsits also a port of gcc to Motorolas 68HC11 and 68HC12. Besides
that, Imagecraft uses the lcc core for producing compilers for both
AVR and HC11.

> What would people recommend for the fastest way to get a prototype
> compiler working? GCC or LCC? Another compiler with a portable
> backend?

If your CPUs contain a lot of general purpose registers and it is
using a more or less linear adress space, I think a port could be
quickly done with both compilers. GCC is more complete, you get also
C++ for little cost. Please remember you also need an assembler and
linker and porting binutils is IMHO not as easy as porting gcc
itself. LCC is the better way if you want to modify the compiler
itself, because IMHO it is better documented.
  Klaus Rotter *

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.