CROSS_COMPILE error after switching from nRF5340DK to custom board definition (SDK v2.9.0)

Hi,

I'm trying to create a custom board definition for our project. So far, I used the nRF5340DK's board definition, removing unwanted definitions and aliases from the DK via nrf5340dk_nrf5340_cpuapp.overlay. The project was created with SDK v2.5.3 and I am currently in the process of migrating to SDK v2.9.0 with Sysbuild, the project compiles so far with the nRF5340DK's board definition (but I didn't have time to test the software yet).

After switching to a newly created board definition (using VS Code's "Create a new board" feature to create the template)., every try to perform a pristine build fails with the following error message:

CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/FindDeprecated.cmake:40 (if):
  if given arguments:

    "CROSS_COMPILE" "IN_LIST" "Deprecated_FIND_COMPONENTS"

  Unknown arguments specified
Call Stack (most recent call first):
  C:/ncs/v2.9.0/zephyr/cmake/modules/python.cmake:16 (find_package)
  C:/ncs/v2.9.0/zephyr/cmake/modules/user_cache.cmake:30 (include)
  C:/ncs/v2.9.0/zephyr/cmake/modules/extensions.cmake:5 (include)
  C:/ncs/v2.9.0/zephyr/share/sysbuild/cmake/modules/sysbuild_default.cmake:8 (include)
  C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  C:/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  CMakeLists.txt:10 (find_package)

In the "Problems" tab of VS Code, I can see these two error messages (the text seems to be cut at the end):

The first error message cannot be opened (file does not exist), the second error message points to the following code in the mentioned file:

Can anyone help with this? What's happening here?

Best regards,
Michael

Parents Reply Children
  • Hello Kazi,

    I think I found the problem: After I shortened the name of my build directory by 7...10 characters, the build process was successful. It seems like sysbuild builds my project using longer directory names than multi image build, or at least I am close to the directory name length limit because of our project location.

    As I mentioned before, my build targed for the nRF5340DK compiled without errors. My new board definition resides in my project directory, subdirectory boards/myvendor/myboard, which might also increase some path lengths.

    Conclusion: I assume that this is a random error caused by damaged path names or so, and it has nothing to do with any actual CROSS_COMPILE topic.

    Just wanted to give this feedback, in case that anyone else encounters this error message.

    Best regards,
    Michael

Related