custom build of newlib-nano in MCUXpresso

Showing results for 
Search instead for 
Did you mean: 

custom build of newlib-nano in MCUXpresso

Contributor I

I am trying to design a redundant-page bootloader, and I therefore need my code to function with position independence. From what I can tell, my code hits hard faults when compiled with -fPIC due to newlib being compiled without the -fPIC flag.

On top of this, I would like to compile newlib-nano with exceptions enabled. I know that exception handling is a large part of the size of newlib, but I would still like to remove things such as wide-char support, etc. to save as much space as possible.

How should I go about this? It is unclear to me how to re-build these libraries and integrate them into MCUXpresso. In an ideal world, I would get more dropdown options in the "Managed linker script" library selector, but I assume I will need to manually set up my library links.

0 Kudos
1 Reply

Senior Contributor V

To simplify command line options, you are probably going to want to use gcc "specs" files. See

You can find the specs supplied with MCUXpresso in 


I don't think there is a simple way that you can integrate this into the IDE though. 

0 Kudos