ld: cannot find -lcr_newlib_nohost

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

ld: cannot find -lcr_newlib_nohost

Jump to solution
334 Views
daniel_fudge
Contributor III

I have an i.MX 1170 EVK and all the projects from the MCUXpresso SDK v2.15 and v2.16 fail to build with the following error. I'm using an Apple M1 Max and VSCode 1.91.1.

> ld: cannot find -lcr_newlib_nohost: No such file or directory

I'm using the ARM GCC tool chain below.

> arm-gnu-toolchain-13.2.Rel1-darwin-x86_64-arm-none-eabi

When I used the MCUXpresso IDE I don't have any issues compiling.

I assume the linked can't find the libcr tool but I can't determine where it should be located or how to install it.

0 Kudos
Reply
1 Solution
250 Views
daniel_fudge
Contributor III

A couple colleagues and I replicated the issue. My guess is it is related to the Mac OS installations for the M1 (ARM not intel).

The tool chain that comes with the VSCode plug-in doesn't work properly. It's located in .mcuxpressotools/arm-gnu-toolchain..... Note is is called the Arm GNU Toolchain 13.2.rel1.

You can get the project to compile by removing the `-lcr_newlib_nohost` flag from `armgcc\debug\build.ninja`.

Or you can install the MCUXpresso IDE and select the toolchain that it installs. It's under /Applications/MCUXpressoIDExxx/ide/tools. Note the two toolchains have identical names and versions right down to the version 13.2.1 20231009. But they behave very differently.

 

 

View solution in original post

0 Kudos
Reply
4 Replies
251 Views
daniel_fudge
Contributor III

A couple colleagues and I replicated the issue. My guess is it is related to the Mac OS installations for the M1 (ARM not intel).

The tool chain that comes with the VSCode plug-in doesn't work properly. It's located in .mcuxpressotools/arm-gnu-toolchain..... Note is is called the Arm GNU Toolchain 13.2.rel1.

You can get the project to compile by removing the `-lcr_newlib_nohost` flag from `armgcc\debug\build.ninja`.

Or you can install the MCUXpresso IDE and select the toolchain that it installs. It's under /Applications/MCUXpressoIDExxx/ide/tools. Note the two toolchains have identical names and versions right down to the version 13.2.1 20231009. But they behave very differently.

 

 

0 Kudos
Reply
309 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @daniel_fudge ,

Thanks for your interest in NXP MIMXRT series!

Have you ever compiled successfully with Vscode? Or never succeeded? Since we don't have a MAC test machine locally, we can't fully reproduce your problem. Just a guess, maybe your Mcuxpresso_for_Vscode development environment didn't get configured successfully. Normally, libcr_newlib_nohost.a should be under the folder where the compiler can find it.

For my Windows test environment, it exists here:

Gavin_Jia_0-1721120958572.pngGavin_Jia_1-1721120974298.png

 

Best regards,
Gavin

0 Kudos
Reply
294 Views
josc
Contributor I

Hi all,

I also got the same error with the new ARM GNU Toolchain. It simply seems like that there is no libcr_newlib_nohost file. It is only available when I use the Toolchain which the MCUXpresso Installer provides.

So, where does this file come from? How can I update to the newest version of the ARM GNU Toolchain? Because, as far as I know, the newest arm-none-eabi version provided by the MCUXpresso Installer is version 12.3 and not 13.3.

Best Regards,

Johannes

0 Kudos
Reply
281 Views
davenadler
Senior Contributor I

@joscLatest version of IDE includes GCC 13.2, according to release notes here:
https://www.nxp.com/docs/en/release-note/MCUXpresso-RN.pdf 
NXP likely does their own build of the toolchain and libraries??
Hope that helps!
Best Regards, Dave