Newlib Nano libraries missing in LPCXpresso 7.6?

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

Newlib Nano libraries missing in LPCXpresso 7.6?

2,735 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by philippschrader on Fri Jan 30 20:00:15 MST 2015
I just upgraded to LPCXpresso 7.6 and I can't seem to build my project anymore.

The "libc_s.a" and "libstdc++_s.a" files are no longer there.

Even creating a new project through the GUI wizard results in a linker error where those libs are missing.

Building target: trial_m4.axf
Invoking: MCU C++ Linker
arm-none-eabi-c++ -nostdlib -L"/home/user/LPCXpresso/workspace/CMSIS_LPC43xx_DriverLib/Debug" -Xlinker -Map="trial_m4.map" -Xlinker --gc-sections -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -T "trial_m4_Debug.ld" -o "trial_m4.axf"  ./src/cr_cpp_config.o ./src/cr_startup_lpc43xx.o ./src/crp.o ./src/trial_m4.o   -lCMSIS_LPC43xx_DriverLib
/usr/local/lpcxpresso_7.6.0_321/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find libc_s.a
/usr/local/lpcxpresso_7.6.0_321/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find libstdc++_s.a
collect2: error: ld returned 1 exit status
make: *** [trial_m4.axf] Error 1
0 Kudos
Reply
8 Replies

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Sep 11 08:13:00 MST 2015
Building a project configured to build Newlib-Nano seems to work fine here.

First of all, check that linking with the wrong library variant isn't the cause of your problems:

[list]
  [*]https://www.lpcware.com/content/faq/lpcxpresso/switching-selected-c-library
  [*]https://www.lpcware.com/content/faq/lpcxpresso/linker-undefined-reference
[/list]

And if not please post your build log showing your compiler and link lines, plus error messages:

[list]
  [*]https://www.lpcware.com/content/faq/lpcxpresso/build-console
[/list]

plus either a buildable test project that shows up the problem:

[list]
  [*]https://www.lpcware.com/content/faq/lpcxpresso/how-importexport-projects
[/list]

or else all confirm which MCU you are targeting and attach a ZIP file containing all of the ld files generated in the Debug (or Release) folder within your project when you trigger a build plus the linker map file.
.
Regards,
LPCXpresso Support
0 Kudos
Reply

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by henryengenharia on Fri Sep 11 04:42:11 MST 2015
Hi,

I installed the v7.9.0 version and presents the same problem of 7.6.0.

Regards,

Marcio
0 Kudos
Reply

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Feb 02 12:42:22 MST 2015
LPCXpresso 7.6.2 is now available which fixes the issues with the managed linker scripts for NewlibNano.

Regards,
LPCXpresso Support
0 Kudos
Reply

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Sun Feb 01 04:46:00 MST 2015
Yes, this issue is caused by an undocumented change in the names of the NewlibNano library files in ARM's GCC 4.9 release (as used in LPCXpresso 7.6).  This was unfortunately not spotted before the 7.6.0 release, which means that the filenames of these libraries no longer match the names generated by the LPCXpresso managed linker script mechanism.

Note - this issue will not affect you if your project(s) are configured to use Redlib or Newlib, only if you use NewlibNano.

In the short term, copying the *_nano.a files to *_s.a found in {install_dir}\lpcxpresso\tools\arm-none-eabi\lib ([u]and[/u] its subdirectories) will work around the problem in the short term.

We will release an update in the near future which will modify the LPCXpresso managed linker script mechanism to use the GCC 4.9 style NewlibNano filenames. We will post again when this is available.

Regards,
LPCXpresso Support
0 Kudos
Reply

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by magnetronus on Sun Feb 01 00:57:32 MST 2015
Thank you for WORKAROUND!!!

I recommend, make copy of libc_nano.a and rename a copied file to libc_s.a in order to support featured patch by NXP.
0 Kudos
Reply

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by klatecki on Sat Jan 31 13:07:16 MST 2015
I found temporary solution.

When I changed file name from libc_nano.a to libc_s.a in C:\nxp\LPCXpresso_7.6.0_321\lpcxpresso\tools\arm-none-eabi\lib\armv7e-m\softfp directory there is no linker errors
0 Kudos
Reply

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by klatecki on Sat Jan 31 06:29:23 MST 2015
Same problem with me...
0 Kudos
Reply

2,564 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Sat Jan 31 04:29:59 MST 2015
Under investigation...

Regards,
LPCXpresso Support
0 Kudos
Reply