This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Porting Newlib to Microchip's dsPIC series


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]