[Experimental] chipKIT compiler using Newlib Standard C lib

Announcements for new builds and MPIDE enhancements
jasonk
Posts: 100
Joined: Mon May 23, 2011 6:38 am
Location: Chandler, Arizona
Contact:

[Experimental] chipKIT compiler using Newlib Standard C lib

Post by jasonk » Fri Oct 21, 2011 6:03 am

We now have experimental builds of the compiler using the open-source Newlib Standard C and Math lib. We're hoping that the growing chipKIT community will help us test this Newlib build with the chipKIT core files and libraries.

You can download these builds here: https://github.com/jasonkajita/chipKIT-cxx/downloads (I recommend making a backup copy of your existing compiler.) Extract the pic32-tools directory from the zip over your existing directory located in hardware/pic32/compiler.

For those of you interested in the source code, the Newlib source-code repository is here: https://github.com/jasonkajita/pic32-newlib

Once we get the issues ironed out (and I do expect that there will be conflicts between the chipKIT core files/libraries and Newlib), I will fork these repositories over to the chipKIT32 team account and we can make it the default compiler for chipKIT.

When posting to this forum or entering an issue in the github tracker, please be sure to mention that you are using the experimental compiler with Newlib. I'm also interested to hear about how this change affects your sketch code size and performance. Do we also need to provide the proprietary library as an alternative or is Newlib everything we need?

The community has been asking for this for a while. I've finally gotten off of my lazy butt to get this done, and we are that much closer to having a full open-source compiler toolchain.
Jason Kajita
Microchip Technology
Follow me on Twitter

ricklon
Posts: 178
Joined: Sun May 22, 2011 6:59 am

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by ricklon » Sun Oct 23, 2011 1:32 am

Way to go Jason!

I'm excited to check this out, and start working on integration with the mpide.

--Rick

funlw65
Posts: 16
Joined: Wed May 25, 2011 5:59 am
Location: Romania
Contact:

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by funlw65 » Sun Nov 06, 2011 9:50 pm

That's surprising... good move!

Vasi

jasonk
Posts: 100
Joined: Mon May 23, 2011 6:38 am
Location: Chandler, Arizona
Contact:

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by jasonk » Sun Dec 18, 2011 2:04 am

Hi everyone,

Please let us know if you've tried this build of the compiler. We are hoping to switch to a Newlib build of the compiler for the official mpide build by February 2012, but we want to get more feedback before we make it official. It would be a big step towards having a completely open-source solution.

Specifically, we'd like to know if you've had success with the Standard C library functions such as sprintf and malloc. Also, if you have sketches that use floating-point arithmetic please try them with this compiler.

Thanks everyone!
Jason Kajita
Microchip Technology
Follow me on Twitter

funlw65
Posts: 16
Joined: Wed May 25, 2011 5:59 am
Location: Romania
Contact:

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by funlw65 » Tue Jan 03, 2012 3:11 pm

All I can say, is that retrobsd for Chipkit Max32 project use it as the main compiler tool. See here.
The svn builds are compiling fine.

Vasi

ricklon
Posts: 178
Joined: Sun May 22, 2011 6:59 am

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by ricklon » Wed Jan 04, 2012 12:11 am

I'll do a test build at the end of the week using the newlib based compiler.

--Rick

username
Posts: 10
Joined: Mon Jan 16, 2012 9:53 pm

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by username » Tue Jan 24, 2012 2:19 am

I encountered two errors... the first was when using the Ethernet shield, namely (1) the redefinition of ultoa() and then (2): undefined references to kill and getpid, please see below:

/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/lib/libc.a(lib_a-signalr.o): In function `_kill_r':
/Users/kjason/github-jasonkajita/mac-build/newlib/pic32mx/newlib/libc/reent/../../../../../../pic32-newlib/newlib/libc/reent/signalr.c:61: undefined reference to `kill'
/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/lib/libc.a(lib_a-signalr.o): In function `_getpid_r':
/Users/kjason/github-jasonkajita/mac-build/newlib/pic32mx/newlib/libc/reent/../../../../../../pic32-newlib/newlib/libc/reent/signalr.c:96: undefined reference to `getpid'
collect2: ld returned 1 exit status


I SOOOO want a working malloc too!

Thanks for all your work.

jasonk
Posts: 100
Joined: Mon May 23, 2011 6:38 am
Location: Chandler, Arizona
Contact:

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by jasonk » Tue Jan 24, 2012 6:05 am

Thanks for the report. I'll look into it. Are you having a problem with malloc also?
Jason Kajita
Microchip Technology
Follow me on Twitter

username
Posts: 10
Joined: Mon Jan 16, 2012 9:53 pm

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by username » Wed Jan 25, 2012 12:35 pm

My problems with malloc are with the previous compiler toolchain (c32?), which I was hoping newlib would solve.

Thanks again!
-Scott

jasonk
Posts: 100
Joined: Mon May 23, 2011 6:38 am
Location: Chandler, Arizona
Contact:

Re: [Experimental] chipKIT compiler using Newlib Standard C

Post by jasonk » Thu Jan 26, 2012 6:01 am

Scott,

Is the sketch that is causing the _kill_r one of the Network Shield examples? I'm not sure where the call to signal is coming from.

Thanks,
Jason
Jason Kajita
Microchip Technology
Follow me on Twitter

Post Reply