Porting Newlib to Microchip's dsPIC series

Karolina karolina.lindqvist@kramnet.se
Sun Feb 1 18:42:00 GMT 2009

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:

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.


More information about the Newlib mailing list