1908159_en-US

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

1908159_en-US

1908159_en-US

ld: cannot find -lcr_newlib_nohost

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.

Re: ld: cannot find -lcr_newlib_nohost

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.



回复: ld: cannot find -lcr_newlib_nohost

@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

回复: ld: cannot find -lcr_newlib_nohost

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

回复: ld: cannot find -lcr_newlib_nohost

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

Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 04:42 PM
Updated by: