Hi Eric
I don't think there are any problems with linker switches and such.
What I find is that any project created in the IDEs (eg. MCUXpressor) adds an include linker script to the linker script with a group specifying the libraries to be used.
Eg.
/*
* GENERATED FILE - DO NOT EDIT
* (c) Code Red Technologies Ltd, 2008-2013
* (c) NXP Semiconductors 2013-2018
* Generated linker script file for MK64FN1M0xxx12
* Created from linkscript.ldt by FMCreateLinkLibraries
* Using Freemarker v2.3.23
* MCUXpresso IDE v10.0.0 [Build 344] [2017-03-21] on 28-Aug-2018 03:26:43
*/
INCLUDE "frdmk64f_driver_examples_rtc_Debug_library.ld"
INCLUDE "frdmk64f_driver_examples_rtc_Debug_memory.ld"
ENTRY(ResetISR)
SECTIONS
{
/* MAIN TEXT SECTION */
.text : ALIGN(4)
...
and then in one of the include files there is a list of libraries - eg.
/*
* GENERATED FILE - DO NOT EDIT
* (c) Code Red Technologies Ltd, 2008-2013
* (c) NXP Semiconductors 2013-2018
* Generated linker script file for MK64FN1M0xxx12
* Created from library.ldt by FMCreateLinkLibraries
* Using Freemarker v2.3.23
* MCUXpresso IDE v10.0.0 [Build 344] [2017-03-21] on 28-Aug-2018 03:26:43
*/
GROUP (
libcr_nohost.a
libcr_c.a
libcr_eabihelpers.a
)
It is the libcr_c.a library that is needed (if you delete it from the included linker script file group you will find that projects will fail with non-found symbols).
What I am look for is the method to add this library in a way that it doesn't need special linker scripts and also find the correct version of the library. At the moment I can get it to build by pointing it to the correct version (there are 21 available but I can only find it by trial and error since most directory names don't make much sense to me - however it breaks if the processor type is changed (core type and with/without FPU ).
Using the -l entry (also with -L to give it a path) it always fails because it can find the file (?) whereby I assume that it would then (somehow) take the correct one (?)
Regards
Mark