cannot find -lrt

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

cannot find -lrt

3,710 Views
smachell
Contributor II

I'm getting this message: cannot find -lrt

 

context:

"C:\\Freescale\\CW MCU v10.5\\gnu\\bin\\mingw32-make" -j8 all

'Building target: Step1.elf'

'Executing target #22 Step1.elf'

'Invoking: ARM Ltd Windows GCC C Linker'

"C:/Freescale/CW MCU v10.5/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc"    @"Step1.args" -o"Step1.elf"

c:/freescale/cw mcu v10.5/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lrt

collect2.exe: error: ld returned 1 exit status

mingw32-make: *** [Step1.elf] Error 1

 

 

It seems to have started after I loaded updates to 10.5 (which also broke CTL-X, CTL-C etc).

 

I did setup my project for no IO since I use my own tiny printf. I did check and the library selected is: ewl_noio

 

Any other ideas?

Labels (1)
2 Replies

1,471 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Simon:

This might be caused by a missing library search path. Please check this:

Go to Project -> Properties -> C/C++ Build -> Settings -> ARM Ltd Windows GCC C Linker -> Libraries, and make sure that you have the path to arm libraries.

You don't say but if using Kinetis K device the path ends with armv7e-m, but if using Kinetis L, the path ends with armv6-m.

Library.png

Hope this solves the issue!


Regards,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,471 Views
JimDon
Senior Contributor III

This does solve the problem, but why do the lib paths suddenly disappear? I did not import or change version, I just started getting this error.

It's hard to make progress with  disruptions.

This is a bug in 10.6:

"Lib paths get cleared for no apparent reason"

For a K64 project you will need:

"${MCUToolsBaseDir}/ARM_GCC_Support/ewl/lib/armv6e-m"

"${MCUToolsBaseDir}/ARM_GCC_Support/ewl/lib/armv7e-m"

"${MCUToolsBaseDir}/ARM_GCC_Support/ewl/lib/armv7e-m/fpu"

If you have a RAM version of the project, you can copy from there or create a new project and copy them over if these are not right for you.