nxp-mcuxpresso / vscode-for-mcux

Support for NXP Visual Studio Code for MCUXpresso Extension project.
13 stars 0 forks source link

CMake: Some vendor provided library does not exist #3

Closed imi415 closed 11 months ago

imi415 commented 12 months ago

The projects requires the following libraries which relies on the NXP supplied toolchain only: cr_newlib_{semihost, nohost, none} which caused problems on ARM GNU Toolchain or other distribution toolchains.

.../arm-gnu-toolchain-12.2.mpacbti-rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: cannot find -lcr_newlib_nohost: No such file or directory
cristitep-nxp commented 12 months ago

Additional NXP supplied toolchain libs are intended to provide various debugger functionalities (i.e. semihosting, stubs for no hosting, heap monitoring, …). Still, if you need your own ARM GNU toolchain version, the easiest workaround now is to install a toolchain using MCUXpresso Installer. Then go to the downloaded additional supplied pack (i.e. for Windows with latest pack: "C:\Users\user\AppData\Local\Programs\MCUXpressoInstaller\ .cache\AdditionalCLibs-10.3-2021.10-win32-VSC.zip") and unzip it over your desired toolchain (the folder hierarchy from zip is a top ARM GNU toolchain path dir). Of course, this might create some compatibility issues depending on your desired toolchain version.

PS. We plan to make this operation possible in an automated fashion in a next version using the MCUXpresso Installer.