nRF9160 serial lte modem with custom board

Hello,

I am trying to use the LTE modem serial example on a customized board that communicates an NRF9160 SICA B1 with an external STM32 microcontroller through the UART interface. I'm working with VS Code extensions.

I did the following steps:

1. install toolchain 2.6.1 

2. install SDK v2.6.1

3. Create an application from sample (Serial LTE modem)

4. Create a "build configuration" --> Board = nrf9160dk_nrf9160_ns (there is no SICA B1 option) // Revision = 2  // configuration= use build system default

5. Build (It takes a very long time to finish)

it gives me some warnings, but the build seems to finish: 

      CMakeLists.txt --> No SOURCES given to Zephyr library: drivers__console

      prj.conf --> CONFIG_LOG_BACKEND_UART was assigned the value n, but got the value n. Missing dependencies: UART_CONSOLE

6. Open Devicetree Overlay file and adjust it to my needs:

               disable spi, buttons, leds ... 

               change uart0 pins to the pins assigned in my custom board

7. Edit build configuration to include the overlay modified

8. Build again

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe '-Bc:\nordic\myApps\serial_lte_modem\build_1' -GNinja -DBOARD=nrf9160dk_nrf9160_ns@2 -DNCS_TOOLCHAIN_VERSION=NONE -DEXTRA_DTC_OVERLAY_FILE=overlay-external-mcu.overlay -DBOARD_ROOT=c:/nordic/myapps/serial_lte_modem '-Sc:\nordic\myApps\serial_lte_modem'

 

I'm desperate with this problem; I don't know how I could control the nRF9160 modem from my microcontroller using AT commands through the UART interface.

thanks in advance

best regards

Parents
  • Hey,

    8. Build again

    can you post the entire build log from the last build?

  • -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/nordic/myApps/serial_lte_modem
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 2.0.0 (Active: 0.14.0)
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Found devicetree overlay: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_0_14_0.overlay
    -- Found devicetree overlay: C:/nordic/myApps/serial_lte_modem/boards/nrf9160dk_nrf9160_ns.overlay
    -- Found devicetree overlay: C:/nordic/myApps/serial_lte_modem/boards/nrf9160dk_nrf9160_ns_0_14_0.overlay
    -- Generated zephyr.dts: C:/nordic/myApps/serial_lte_modem/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/nordic/myApps/serial_lte_modem/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/nordic/myApps/serial_lte_modem/build/zephyr/dts.cmake

    warning: Experimental symbol TFTP_LIB is enabled.


    warning: Experimental symbol HTTP_CLIENT is enabled.

    Parsing C:/nordic/myApps/serial_lte_modem/Kconfig
    Loaded configuration 'C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/prj.conf'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/boards/nrf9160dk_nrf9160_ns.conf'
    Configuration saved to 'C:/nordic/myApps/serial_lte_modem/build/zephyr/.config'
    Kconfig header saved to 'C:/nordic/myApps/serial_lte_modem/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found version "3.9.13") found components: Interpreter
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)

    === child image mcuboot - begin ===
    loading initial cache file C:/nordic/myApps/serial_lte_modem/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf9160dk_nrf9160, Revision: 0.14.0
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.overlay
    -- Found devicetree overlay: C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/app.overlay
    -- Generated zephyr.dts: C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/dts.cmake
    Parsing C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
    Merged configuration 'C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/ncs/v2.6.1/nrf/modules/mcuboot/tfm.conf'
    Merged configuration 'C:/ncs/v2.6.1/nrf/modules/mcuboot/fih_low_enable.conf'
    Merged configuration 'C:/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/child_image/mcuboot.conf'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at C:/ncs/v2.6.1/zephyr/CMakeLists.txt:862 (message):
    No SOURCES given to Zephyr library: drivers__console

    Excluding target from build.


    MCUBoot bootloader key file: C:/ncs/v2.6.1/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/nordic/myApps/serial_lte_modem/build/mcuboot
    === child image mcuboot - end ===

    CMake Warning at C:/ncs/v2.6.1/nrf/modules/mcuboot/CMakeLists.txt:382 (message):

    ---------------------------------------------------------
    --- WARNING: Using default MCUBoot key, it should not ---
    --- be used for production. ---
    ---------------------------------------------------------

    CMake Warning at C:/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:79 (message):

    ---------------------------------------------------------------------
    --- WARNING: Using a bootloader without pm_static.yml. ---
    --- There are cases where a deployed product can consist of ---
    --- multiple images, and only a subset of these images can be ---
    --- upgraded through a firmware update mechanism. In such cases, ---
    --- the upgradable images must have partitions that are static ---
    --- and are matching the partition map used by the bootloader ---
    --- programmed onto the device. ---
    ---------------------------------------------------------------------

Reply
  • -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/nordic/myApps/serial_lte_modem
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 2.0.0 (Active: 0.14.0)
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Found devicetree overlay: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_0_14_0.overlay
    -- Found devicetree overlay: C:/nordic/myApps/serial_lte_modem/boards/nrf9160dk_nrf9160_ns.overlay
    -- Found devicetree overlay: C:/nordic/myApps/serial_lte_modem/boards/nrf9160dk_nrf9160_ns_0_14_0.overlay
    -- Generated zephyr.dts: C:/nordic/myApps/serial_lte_modem/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/nordic/myApps/serial_lte_modem/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/nordic/myApps/serial_lte_modem/build/zephyr/dts.cmake

    warning: Experimental symbol TFTP_LIB is enabled.


    warning: Experimental symbol HTTP_CLIENT is enabled.

    Parsing C:/nordic/myApps/serial_lte_modem/Kconfig
    Loaded configuration 'C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/prj.conf'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/boards/nrf9160dk_nrf9160_ns.conf'
    Configuration saved to 'C:/nordic/myApps/serial_lte_modem/build/zephyr/.config'
    Kconfig header saved to 'C:/nordic/myApps/serial_lte_modem/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found version "3.9.13") found components: Interpreter
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)

    === child image mcuboot - begin ===
    loading initial cache file C:/nordic/myApps/serial_lte_modem/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf9160dk_nrf9160, Revision: 0.14.0
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.overlay
    -- Found devicetree overlay: C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/app.overlay
    -- Generated zephyr.dts: C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/dts.cmake
    Parsing C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
    Merged configuration 'C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/ncs/v2.6.1/nrf/modules/mcuboot/tfm.conf'
    Merged configuration 'C:/ncs/v2.6.1/nrf/modules/mcuboot/fih_low_enable.conf'
    Merged configuration 'C:/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/child_image/mcuboot.conf'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/nordic/myApps/serial_lte_modem/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at C:/ncs/v2.6.1/zephyr/CMakeLists.txt:862 (message):
    No SOURCES given to Zephyr library: drivers__console

    Excluding target from build.


    MCUBoot bootloader key file: C:/ncs/v2.6.1/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/nordic/myApps/serial_lte_modem/build/mcuboot
    === child image mcuboot - end ===

    CMake Warning at C:/ncs/v2.6.1/nrf/modules/mcuboot/CMakeLists.txt:382 (message):

    ---------------------------------------------------------
    --- WARNING: Using default MCUBoot key, it should not ---
    --- be used for production. ---
    ---------------------------------------------------------

    CMake Warning at C:/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:79 (message):

    ---------------------------------------------------------------------
    --- WARNING: Using a bootloader without pm_static.yml. ---
    --- There are cases where a deployed product can consist of ---
    --- multiple images, and only a subset of these images can be ---
    --- upgraded through a firmware update mechanism. In such cases, ---
    --- the upgradable images must have partitions that are static ---
    --- and are matching the partition map used by the bootloader ---
    --- programmed onto the device. ---
    ---------------------------------------------------------------------

Children
No Data
Related