This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Failed to compile non secure boards

This is a follow-up to a previous ticket https://devzone.nordicsemi.com/f/nordic-q-a/83842/error-when-building-configuration-for-non-secure-boards , the problem persists and I think is due to a failed multi image build. I attempted to build a new project with a new vs code reinstallation, nrf connect reinstall with 1.8.0 toolchain and when I build a blinky project for nrf9160dk_nrf9160ns I get the following errors using west build --build-dir /Users/mac/NordicNew/blinky1/build /Users/mac/NordicNew/blinky1 --pristine --board nrf9160dk_nrf9160_ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE":

[{
"resource": "/opt/nordic/ncs/v1.8.0/zephyr/boards/arm/nrf9160dk_nrf9160/Kconfig.defconfig",
"owner": "kconfig0",
"severity": 8,
"message": "boards/arm/nrf9160dk_nrf9160/Kconfig.defconfig:36: error: couldn't parse 'default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))': macro expanded to blank string",
"startLineNumber": 36,
"startColumn": 1,
"endLineNumber": 36,
"endColumn": 100000
}]

[{
"resource": "/opt/nordic/ncs/v1.8.0/nrf/cmake/multi_image.cmake",
"owner": "nrf-connect",
"severity": 8,
"message": "CMake generation for spm failed, aborting. Command: 1",
"source": "cmake",
"startLineNumber": 306,
"startColumn": 1,
"endLineNumber": 306,
"endColumn": 2147483647
}]

[{
"resource": "/opt/nordic/ncs/v1.8.0/zephyr/cmake/kconfig.cmake",
"owner": "nrf-connect",
"severity": 8,
"message": "command failed with return code: 1",
"source": "cmake",
"startLineNumber": 270,
"startColumn": 1,
"endLineNumber": 270,
"endColumn": 2147483647
}]

Parents
  • Hello Snaider,

    does the build fail in VS Code only or do you get the same error on the command line as well?

    Regards,

    Markus

  • Hi, testing during the weekend using 

    west build --build-dir /Users/mac/NordicNew/blinky1/build /Users/mac/NordicNew/blinky1 --pristine --board nrf9160dk_nrf9160_ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE":

    didn't work, however changing the DNCS_TOOLCHAIN_VERSION to 1.8.0 allowed me to build

    west build --build-dir /Users/mac/Documents/pruebasNord/blinky/build /Users/mac/Documents/pruebasNord/blinky --pristine --board nrf9160dk_nrf9160_ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=1.8.0

    After using this command I was able to build from VSCode but any pristine build will have the same error "spm failed"

Reply
  • Hi, testing during the weekend using 

    west build --build-dir /Users/mac/NordicNew/blinky1/build /Users/mac/NordicNew/blinky1 --pristine --board nrf9160dk_nrf9160_ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE":

    didn't work, however changing the DNCS_TOOLCHAIN_VERSION to 1.8.0 allowed me to build

    west build --build-dir /Users/mac/Documents/pruebasNord/blinky/build /Users/mac/Documents/pruebasNord/blinky --pristine --board nrf9160dk_nrf9160_ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=1.8.0

    After using this command I was able to build from VSCode but any pristine build will have the same error "spm failed"

Children
No Data
Related