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
  • Thanks a lot for the input, Snaider!

    SnaiderBG said:
    Any idea why this error appears only when using the VSCode plugin? Can I change the settings of VSCode to run the simple command? or is your recommendation to build from the command line? 

    First of all, the nRF Connect Extension in VS Code is depended on a correct configured nRF Connect SDK toolchain. However, it uses slightly modified build commands to access it from within VS Code.

    It is a good starting point that you can build the application via the command line. But of course, you should be able to do so in VS Code as well. The point with the extension is to make both programming and building as smooth as possible :-)

    My recommendation now would be that you go through the points described in this tutorial and check if your nRF Connect Extension is set-up correctly. Please let me know if that doesn’t solve the issue.

    Regards,

    Markus

  • Hi Markus I reinstalled everything (have done in already) but didn't work, later I found this post https://devzone.nordicsemi.com/f/nordic-q-a/82145/severe-crashing-bug-in-nrf-connect-for-vs-code-on-macos-monterey/349370#349370 and decide to downgrade VSCode, it didn't help either until I updated Python to 3.10.2, previously working with 3.9.6. I don't know if updating Python was the solution or the mix of both actions but now I can build non secure boards. However this error appears in any build for nrf9160dk_nr9160_ns

    [{
    "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
    }]

    This error doesn't break the build

Reply Children
No Data
Related