This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Porting Newlib to Microchip's dsPIC series
- From: Karolina <karolina dot lindqvist at kramnet dot se>
- To: newlib at sourceware dot org
- Date: Sun, 1 Feb 2009 19:42:43 +0100
- Subject: Re: Porting Newlib to Microchip's dsPIC series
- References: <27ced5d00901311200p1fd1ea8eq3e92f261513d8c7@mail.gmail.com> <27ced5d00901311204q413cdd17i94c98c89d31f2605@mail.gmail.com>
lördagen den 31 januari 2009 skrev Leo Singer:
> Hey,
>
> I am porting Newlib to Microchip's line of 16-bit microcontrollers (I
> am using a dsPIC33FJ256GP710). The compiler is invoked using the name
> "pic30-gcc". I have some platform specific implementations of things
> like brk, sbrk, etc. Where should I put those?
>
> I put them in "newlib/libc/sys/pic30", and I think that I made my
> Automake and Autoconf files correctly (though it's my first time
> actually editing automake or autoconf files), but the source files
> that I added are not getting compiled.
>
> My "setjmp" and "longjmp", which I have placed in
> "newlib/libc/machine/pic30" are correctly getting built and linked.
>
> Thanks,
> Leo
I am trying exactly the same right now. I got the whole thing to build without
error, but now I got a little bit stuck with gcc, to get it to use the
correct paths for include/lib files etc. I got more work there than I
bargained for.
And then I am not sure if not newlib gives just too much bloat, and it would
be better to use unix v7 libs, or something.
Some things with newlib I find confusing. Some systems put system files in
libgloss/<systemname>, and others in libc/sys/<systemname>
I put them in libc/sys/pic30
Files I have patched so far:
newlib/libc/include/machine/ieeefp.h
newlib/libc/include/machine/setjmp.h
newlib/libc/include/sys/config.h
newlib/libc/include/sys/stdio.h
newlib/libm/machine/configure.in
config/mt-pic30
config.sub
newlib/configure.host
newlib/libc/machine/configure.in
But apart from making a clean build, it has to be integrated with all the
quirks of the PIC30 and tried out and get to work also. That is probably the
tough part.
Karolina