This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: newlib with avr-libc support
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- Cc: "josh dot switnicki at utoronto dot ca" <josh dot switnicki at utoronto dot ca>, "newlib at sources dot redhat dot com" <newlib at sources dot redhat dot com>
- Date: Tue, 2 Jun 2009 06:41:43 -0500
- Subject: Re: newlib with avr-libc support
- References: <20090601145823.8699myjvfk08sc84@webmail.utoronto.ca> <4A24DC2E.4050105@rtems.org>
Ralf Corsepius wrote:
josh.switnicki@utoronto.ca wrote:
Hello,
I am working as a gsoc student on porting rtems to the atmega128.
I am having some trouble adding the .h files from avr-libc to newlib.
the end result I would like is to have two directories in the newlib
include path with the avr specific .h file in them so that when the
files are included in the code they would be included in the same way as
would be done with avr-libc
ie. #include <avr/interrupts.h>
this is my first time attempting something like this and all the help
and patience is greatly appreciated.
Generally speaking, you seem to be putting "the horse before the cart",
i.e. you seem to approaching the problem from the wrong end.
In RTEMS, stuff like interrupts etc. belong into RTEMS, not into newlib.
Ralf, the .h files he is merging include all the CPU model
ifdef's and IO register names and bit definitions. avr-libc
provides them and you need them to write device drivers,
bring their setjmp/longjmp over and to write the RTEMS
context switch and interrupt vectoring code. It is easier
to just take them in their entirety than pick them off one
at a time.
The problem he is having is that we need machine/avr/include/XXX
to get picked up and installed where XXX is a non-standard
directory. sys/linux does this but it looks like the method has
changed since I last looked at it.
--joel
Ralf