I've been wrestling with the NRF9160 toolchain for a couple days now, gotta say it's a complete nightmare compared to your lovely NRF5 toolchain.
Currently stuck here:
~/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple $ west build -b thingy91_nrf9160 -- west build: generating a build systemIncluding boilerplate (Zephyr base): /home/triffid/Projects/NRF/NRF91-SDK/sdk-zephyr/cmake/app/boilerplate.cmake-- Application: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple-- Zephyr version: 2.3.99 (/home/triffid/Projects/NRF/NRF91-SDK/sdk-zephyr)-- Found Python3: /usr/bin/python3.7 (found suitable exact version "3.7.8") found components: Interpreter -- git describe failed: fatal: No names found, cannot describe anything.;BUILD_VERSION is left undefined-- Board: thingy91_nrf9160-- Found toolchain: zephyr (/home/triffid/Projects/NRF/zephyr/sdk-ng)-- Found west: /home/triffid/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")-- Found toolchain: gnuarmemb (/usr)-- Found BOARD.dts: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160.dtsthingy91_nrf9160.dts.pre.tmp:57.42-69.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)thingy91_nrf9160.dts.pre.tmp:306.19-312.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)-- Generated zephyr.dts: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/zephyr/zephyr.dts-- Generated devicetree_unfixed.h: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/zephyr/include/generated/devicetree_unfixed.hParsing /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/KconfigLoaded configuration '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160_defconfig'Merged configuration '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/prj.conf'Configuration saved to '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/zephyr/.config'Kconfig header saved to '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/zephyr/include/generated/autoconf.h'
warning: The choice symbol BOARD_THINGY91_NRF9160 (defined at/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/boards/arm/thingy91_nrf9160/Kconfig.board:9) wasselected (set =y), but BOARD_THINGY91_NRF9160NS (defined at/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/boards/arm/thingy91_nrf9160/Kconfig.board:13) ended upas the choice selection. Seedocs.zephyrproject.org/.../CONFIG_BOARD_THINGY91_NRF9160.html and/orlook up BOARD_THINGY91_NRF9160 in the menuconfig/guiconfig interface. The Application DevelopmentPrimer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manualmight be helpful too.
-- The C compiler identification is GNU 10.2.0-- The CXX compiler identification is GNU 10.2.0-- The ASM compiler identification is GNU-- Found assembler: /usr/bin/arm-none-eabi-gcc-- Cache files will be written to: /home/triffid/.cache/zephyr
=== child image spm - thingy91_nrf9160 begin ===Including boilerplate (Zephyr base): /home/triffid/Projects/NRF/NRF91-SDK/sdk-zephyr/cmake/app/boilerplate.cmake-- Application: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/spm-- Zephyr version: 2.3.99 (/home/triffid/Projects/NRF/NRF91-SDK/sdk-zephyr)-- Found Python3: /usr/bin/python3.7 (found suitable exact version "3.7.8") found components: Interpreter-- git describe failed: fatal: No names found, cannot describe anything.;BUILD_VERSION is left undefined-- Board: thingy91_nrf9160-- Found toolchain: zephyr (/home/triffid/Projects/NRF/zephyr/sdk-ng)-- Found west: /home/triffid/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")-- Found toolchain: gnuarmemb (/usr)-- Found BOARD.dts: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160.dtsthingy91_nrf9160.dts.pre.tmp:57.42-69.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)thingy91_nrf9160.dts.pre.tmp:306.19-312.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)-- Generated zephyr.dts: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/spm/zephyr/zephyr.dts-- Generated devicetree_unfixed.h: /home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/spm/zephyr/include/generated/devicetree_unfixed.hParsing /home/triffid/Projects/NRF/NRF91-SDK/sdk-zephyr/KconfigLoaded configuration '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160_defconfig'Merged configuration '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/spm/prj.conf'Configuration saved to '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/spm/zephyr/.config'Kconfig header saved to '/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/spm/zephyr/include/generated/autoconf.h'-- The C compiler identification is GNU 10.2.0-- The CXX compiler identification is GNU 10.2.0-- The ASM compiler identification is GNU-- Found assembler: /usr/bin/arm-none-eabi-gcc-- Cache files will be written to: /home/triffid/.cache/zephyrCMake Error at /home/triffid/Projects/NRF/NRF91-SDK/bootloader/mcuboot/zephyr/CMakeLists.txt:1 (include):include could not find load file:
/cmake/mcuboot.cmake
-- Configuring incomplete, errors occurred!See also "/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/spm/CMakeFiles/CMakeOutput.log".See also "/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/spm/CMakeFiles/CMakeError.log".CMake Error at ../../../cmake/multi_image.cmake:182 (message):CMake generation for spm failed, aborting. Command: 1Call Stack (most recent call first):../../../cmake/multi_image.cmake:56 (add_child_image_from_source)../../CMakeLists.txt:8 (add_child_image)
-- Configuring incomplete, errors occurred!See also "/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/CMakeFiles/CMakeOutput.log".See also "/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build/CMakeFiles/CMakeError.log".FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/lib/python-exec/python3.7/python3 -B/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple/build -S/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf/samples/nrf9160/mqtt_simple -GNinja -DBOARD=thingy91_nrf9160
That cmake file says include(${ZEPHYR_NRF_MODULE_DIR}/cmake/mcuboot.cmake) but I have export ZEPHYR_NRF_MODULE_DIR=/home/triffid/Projects/NRF/NRF91-SDK/sdk-nrf in my ~/.zephyrrc (and also in my environment), so apparently somewhere in this mess of a toolchain that's being unset for some reason.
Any ideas how to fix this and move on?