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.