Can't build any nrf9160 application example

I just installed the toolchain (2.6.1) and SDK (main) from scratch, and I'm not able to build the Serial LTE Modem and Asset Tracker application. I receive an error during CMAKE phase for both of them:

   **************************************
   * Running CMake for serial_lte_modem *
   **************************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/peta/prace/ncs/nrf/applications/serial_lte_modem
-- CMake version: 3.28.3
-- Found Python3: /usr/bin/python3 (found suitable version "3.12.3", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /home/peta/.cache/zephyr
-- Zephyr version: 3.6.99 (/home/peta/prace/ncs/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf9160dk, Revision: 0.14.0, qualifiers: nrf9160
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.8 (/home/peta/prace/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/peta/prace/zephyr-sdk-0.16.8)
-- Found Dtc: /home/peta/prace/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6") 
-- Found BOARD.dts: /home/peta/prace/ncs/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160.dts
-- Found devicetree overlay: /home/peta/prace/ncs/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_0_14_0.overlay
-- Generated zephyr.dts: /home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/dts.cmake

warning: Experimental symbol TFTP_LIB is enabled.


warning: NRF_MODEM_LIB (defined at /home/peta/prace/ncs/nrf/lib/nrf_modem_lib/Kconfig:6) has direct dependencies SOC_SERIES_NRF91X && TRUSTED_EXECUTION_NONSECURE with value n, but is currently being y-selected by the following symbols:
 - MODEM_INFO (defined at /home/peta/prace/ncs/nrf/lib/modem_info/Kconfig:7), with value y, direct dependencies y (value: y)
 - MODEM_JWT (defined at /home/peta/prace/ncs/nrf/lib/modem_jwt/Kconfig:7), with value y, direct dependencies y (value: y)
Parsing /home/peta/prace/ncs/nrf/applications/serial_lte_modem/Kconfig
Loaded configuration '/home/peta/prace/ncs/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_defconfig'
Merged configuration '/home/peta/prace/ncs/nrf/applications/serial_lte_modem/prj.conf'
Merged configuration '/home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/.config.sysbuild'

error: Aborting due to Kconfig warnings

CMake Error at /home/peta/prace/ncs/zephyr/cmake/modules/kconfig.cmake:392 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/peta/prace/ncs/nrf/cmake/modules/kconfig.cmake:29 (include)
  /home/peta/prace/ncs/zephyr/cmake/modules/zephyr_default.cmake:132 (include)
  /home/peta/prace/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/peta/prace/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at cmake/modules/sysbuild_extensions.cmake:496 (message):
  CMake configure failed for Zephyr project: serial_lte_modem

  Location: /home/peta/prace/ncs/nrf/applications/serial_lte_modem
Call Stack (most recent call first):
  cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
  cmake/modules/sysbuild_default.cmake:19 (include)
  /home/peta/prace/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  /home/peta/prace/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  /home/peta/prace/ncs/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)

I used this command:

west build -b nrf9160dk_nrf9160 applications/serial_lte_modem

This problem could be related to the recent change in the SDK, as I ran into it after I updated the SDK to the latest one.

It's also possible that I'm missing something or doing something wrong, I would appreciate any help.

Thanks,

Petr

Parents
  • Hi Petr

    It should build out of the box. I do however see that you are running the main branch, is there any reason for this? It is not something I would recommend as it will not have the same level of testing as our tagged releases. Any changes done is the SDK will also have a lower level of documentation. 

    I also see that you are not running our toolchain in the build log. Do you see the same result if you use our toolchain?

    Regards

    Runar

Reply
  • Hi Petr

    It should build out of the box. I do however see that you are running the main branch, is there any reason for this? It is not something I would recommend as it will not have the same level of testing as our tagged releases. Any changes done is the SDK will also have a lower level of documentation. 

    I also see that you are not running our toolchain in the build log. Do you see the same result if you use our toolchain?

    Regards

    Runar

Children
  • Hi, 

    I included the logs from the build with different toolchain by mistake, but the result is the same when I use your toolchain, see the logs. I'm using main branch because of some changes / updates / fixes in Serial LTE application. Main branch should contain SDK 2.7.0 rc3 which should be pretty stable.

       **************************************
       * Running CMake for serial_lte_modem *
       **************************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/peta/prace/ncs/nrf/applications/serial_lte_modem
    -- CMake version: 3.28.3
    -- Found Python3: /usr/bin/python3 (found suitable version "3.12.3", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: /home/peta/.cache/zephyr
    -- Zephyr version: 3.6.99 (/home/peta/prace/ncs/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf9160dk, Revision: 0.14.0, qualifiers: nrf9160
    -- Found host-tools: zephyr 0.16.5 (/home/peta/prace/ncs/toolchains/2be090971e/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/home/peta/prace/ncs/toolchains/2be090971e/opt/zephyr-sdk)
    -- Found Dtc: /usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/peta/prace/ncs/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: /home/peta/prace/ncs/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_0_14_0.overlay
    -- Generated zephyr.dts: /home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/dts.cmake
    
    warning: Experimental symbol TFTP_LIB is enabled.
    
    
    warning: NRF_MODEM_LIB (defined at /home/peta/prace/ncs/nrf/lib/nrf_modem_lib/Kconfig:6) has direct dependencies SOC_SERIES_NRF91X && TRUSTED_EXECUTION_NONSECURE with value n, but is currently being y-selected by the following symbols:
     - MODEM_INFO (defined at /home/peta/prace/ncs/nrf/lib/modem_info/Kconfig:7), with value y, direct dependencies y (value: y)
     - MODEM_JWT (defined at /home/peta/prace/ncs/nrf/lib/modem_jwt/Kconfig:7), with value y, direct dependencies y (value: y)
    Parsing /home/peta/prace/ncs/nrf/applications/serial_lte_modem/Kconfig
    Loaded configuration '/home/peta/prace/ncs/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_defconfig'
    Merged configuration '/home/peta/prace/ncs/nrf/applications/serial_lte_modem/prj.conf'
    Merged configuration '/home/peta/prace/ncs/nrf/build/serial_lte_modem/zephyr/.config.sysbuild'
    
    error: Aborting due to Kconfig warnings
    

  • Thanks

    You need to change build target to _ns and it should work

    Regards

    Runar

Related