custom build of newlib-nano in MCUXpresso

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

custom build of newlib-nano in MCUXpresso

755 Views
awseiger
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

747 Views
converse
Senior Contributor V

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

https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html

You can find the specs supplied with MCUXpresso in 

C:\nxp\MCUXpressoIDE\ide\tools\arm-none-eabi\lib

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

0 Kudos