This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc for any microcontroller?
- From: <tm_gccmail at mail dot kloo dot net>
- To: Gabriel Paubert <paubert at iram dot es>
- Cc: Petr Danecek <danecek at ucl dot cas dot cz>, gcc at gcc dot gnu dot org
- Date: Mon, 24 Mar 2003 13:40:15 -0800 (PST)
- Subject: Re: gcc for any microcontroller?
On Mon, 24 Mar 2003, Gabriel Paubert wrote:
> On Mon, Mar 24, 2003 at 04:29:41PM +0100, Petr Danecek wrote:
> > thank you for your answer, Toshi.
> > if i understand it correctly, HC08 would be difficult to port, though
> > not impossible. now, is it worth of it? maybe there is a more suitable c
> > compiler somewhere. i doubt that writing cc from scratch is a good
> > choice...?
> > petr
>
> There is a Debian packages called sdcc (small device C compiler) and
> a companion simulator package (sdcc-ucsim):
>
> "SDCC is a C compiler for the Intel MCS51 family, AVR and Z80
> microcontrollers. The package includes the compiler, assemblers and
> linkers, and a core library."
>
> If it can generate (probably awful) code for the 8051, it must be
> fairly easy to target almost any architecture, however strange it is.
>
> Disclaimer, I've never used it, I just discovered it a few days ago
> when looking for something completely unrelated. But having written
> a few thousand lines of 8051 assembly, I've not yet figured how a
> compiler can target such a baroque processor.
>
> Gabriel.
The homepage for that is on sourceforge: http://sdcc.sourceforge.net.
As mentioned before, the usual strategy for code generation on
accumulator-based machine is to fake an architecture with general-purpose
registers.
Toshi