[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] avr-gnat (was: [ANN] WinAVR 20030115)

From: Ebert, Rolf
Subject: [avr-gcc-list] avr-gnat (was: [ANN] WinAVR 20030115)
Date: Tue, 21 Jan 2003 16:18:56 +0100

> > Eric,
> > 
> > do you have some more elaborate build instructions?
> > 
> > EW> Build Notes
> > EW> --------------------------
> > EW> GNU Binutils, GNU GCC, and AVRLibC were built with MinGW (see
> > Links).
> Currently, no. In the next week I will write up complete instructions 
> and send them off to the AVRLibC project, as they have an open 
> request for build instructions for Windows. I'll send you a copy of 
> it then.

I am looking forward.

> > Even building a native compiler in and for MinGW is already not a
> > simple task, but I eventually got there.  I failed, however, when I
> > tried to build an AVR cross compiler.

> If you're already familiar with the process however, here's the 
> (extremely) short answer:
> 1. Need good working bison and flex.

Flex and bison generate their files in the source directory tree.  Therefor,
I first try to bootstrap a compile on cygwin.  That leaves correctly (?)
generated files in the source dir tree. The following compile steps on MinGW
don't need to generate the files again.

> 2. Need patch for GCC.
> 3. Current MinGW version.

I have 2.0.0-3

> 4. Need MSYS 1.0.8-rc-2 (release candidate 2). CAUTION! MSYS 1.0.8 
> released will NOT build GCC correctly. I just spent a week figuring 
> this out.

I use 1.0.8-rc-4.  Do you have any experience with that version? Is it OK or

> 5. Build with the *nix build instructions listed in the AVRLibC 
> documentation.
> In WinAVR 20030115, the utilities contain the bison and flex I use. 
> The source download contains the GCC patch.
> > The reason I ask is, that I want to enable the Ada frontend for AVR. 
> > I got a minimallz working system built and running on Linux
> > (http://tech.ebert-langer.de/avr-gnat.html).  I'd like to get to at
> > least the same level on MinGW, too.
> > 
> Cool!
> Now, I don't know anything about Ada, but what about the library? 
> Will it have to have a separate library for Ada?

Yes.  It will need a separate runtime library.  Usually the gcc-ada runtime
system relies on functions from the C runtime (libc), where available.  I
try to limit the use of the libc and implement most parts in Ada directly
without reinventing the wheel.  Many real time functions, that are defined
in Ada (tasking, interrupt handling, delays, etc), have no equivalent
functions in C.  They must be implemented in Ada anyway.  Perhaps I can base
them on some of the readily available tasking systems in C like ethernut.

The Ada runtime system is divided into the namespaces "Ada", "System", and
"Interfaces".  I have added ad 4th namespace "AVR" for the avr specific
functions (IO, watchdog, EEPROM, etc)

The complete Ada runtime as defined in the standard is very big.  It
certainly takes more than 250kB on any platform.  It is out of question to
completely make that available on AVR controllers.  I try to limit it to the
absolute minimum.

> Let me know if you can get the Ada frontend working for the AVR. I'd 
> also like to know how to build it too and how to use the Ada 
> compiler. If it can make working code and it's not a huge addition, I 
> would be interested in adding it to WinAVR.

For building an (gcc based) Ada compiler you already need a working (gcc
based) native Ada compiler.  For the MinGW environment you can use the
experimental release gnatgcc-3.3-exp-20021006.tar.gz available in the MinGW
download area.  Building an Ada cross compiler then is simply done by
providing the option --enable-languages=c,c++,ada at the configure step.
This will build two additional binaries gnat1 and gnatbind.  It does not
build the additional GNAT utility programs nor the Ada runtime system.  That
is OK, though. 

> Thanks,
> Eric
avr-gcc-list at http://avr1.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]