Compiling newlib for the msp430x architecture

Nick Clifton nickc@redhat.com
Fri Sep 1 12:01:00 GMT 2017


Hi Stephan,

> But I am not sure what you mean with the generic -mlarge multilib version. Is it automatically built alongside the -msmall (default i think) version?

Yes.

What should happen is that the compiler (gcc) should automatically choose 
the correct version of the standard libraries to use when building your
application.  So, suppose you compile a program with "-mmcu=msp430f2617 -mlarge"
specified on the command line, gcc should automatically recognise this as
requiring a -mlarge compatible version of the C library and select that version
when linking your program.

Different versions of the same library are held in different sub-directories of
the installation directory.  So for example the -mlarge version of the C library
should be in the large/ sub-directory of /usr/lib.  (Or wherever the libraries
have been installed).  All of this should be transparent to the programmer.  You
should not need to know about it.  You just compile and link your application
and the correct libraries are automatically selected by the gcc driver.

The problem comes when you try to build your own version of these standard libraries.
Ideally you would just build them using the standard "configure ; make" process,
but for some reason you are trying to force a specific MCU selection and this is
causing the problems.  And my question to you is - why are you trying to do this ?


> The compiler is the bare gcc toolchain from TI if that helps.

Does the toolchain from TI not come with the (multiple versions of the) C library 
already built ?

Cheers
  Nick



More information about the Newlib mailing list