Device: nRF5340
SDK: nRF Connect SDK v2.2.0
IDE: nRF Connect for VS Code v2023.6.345, Running on Windows 10
------------
We are working on a new project for the nRF5340, and I get a lot of errors such as the one below when I try to build:
The object file directory
C:/git/embedded3/embedded/Nordic123nd45/app/bf755/ncs/extra01234567890/extra01234567890/extra01234567890/extra01234567890/di675_Xb001/build/hci_rpmsg/zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/./
has 245 characters. The maximum full path to an object file is 250
characters (see CMAKE_OBJECT_PATH_MAX). Object file
reset.S.obj
cannot be safely placed under this directory. The build may not work
correctly.
In the above you'll notice that the working directory has a very long path (I obfuscated some of the directory names). I have seen a few other posts in the forum with similar issues, and the main advice seems to be to "make the path shorter". Unfortunately this is not an option for us because of the current structure of our code base.
I did try the following:
1. I followed the link from this post and modified my Windows registry settings. I updated the setting using an admin account and rebooted after making the modification.
2. I added "set(CMAKE_OBJECT_PATH_MAX 512)" to my CMakeLists.txt.
Even after making the above changes, I still see this error.
I do notice that the error is referencing other CMakeLists.txt files from NCS and from Zephyr, and those may not increased max path length. Is there any way that I can make my "set(CMAKE_OBJECT_PATH_MAX 512)" apply globally to all the different CMakeLists.txt?
Is there anything else that I can do here?
Thanks!
Below is the entire build log output (with some directory and files names obfuscated for confidentiality):