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
  • -- Build files have been written to: C:/nordic/myApps/serial_lte_modem/build/tfm
    [168/172] Linking C executable bin\tfm_s.axf
    Memory region Used Size Region Size %age Used
    FLASH: 31592 B 32256 B 97.94%
    RAM: 14392 B 32 KB 43.92%
    [23/406] Performing install step for 'tfm'
    -- Install configuration: "MinSizeRel"
    ----- Installing platform NS -----
    [397/406] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 235684 B 416 KB 55.33%
    RAM: 101568 B 211608 B 48.00%
    IDT_LIST: 0 GB 32 KB 0.00%
    [401/406] Generating ../../zephyr/app_update.bin
    image.py: sign the payload
    [402/406] Generating ../../zephyr/app_signed.hex
    image.py: sign the payload
    [404/406] Generating ../../zephyr/app_test_update.hex
    image.py: sign the payload
    [406/406] Generating zephyr/merged.hex
    * Terminal will be reused by tasks, press any key to close it.

  • Sorry, I meant can you post the build log where the build error occurs?

Reply Children
  • -- 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: nrf9160_sica_b1
    -- 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:/my-nrf-boards/boards/arm/nrf9160_sica_b1/nrf9160_sica_b1.dts
    -- 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: RTT_CONSOLE (defined at drivers/console/Kconfig:115) was assigned the value 'y' but got the
    value 'n'. Check these unsatisfied dependencies: CONSOLE (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up RTT_CONSOLE in
    the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
    Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.


    warning: Experimental symbol TFTP_LIB is enabled.


    warning: Experimental symbol HTTP_CLIENT is enabled.


    warning: NRF_MODEM_LIB (defined at C:/ncs/v2.6.1/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 C:/ncs/v2.6.1/nrf\lib\modem_info/Kconfig:7), with value y, direct dependencies y (value: y)
    Parsing C:/nordic/myApps/serial_lte_modem/Kconfig
    Loaded configuration 'C:/my-nrf-boards/boards/arm/nrf9160_sica_b1/nrf9160_sica_b1_defconfig'
    Merged configuration 'C:/nordic/myApps/serial_lte_modem/prj.conf'
    - MODEM_JWT (defined at C:/ncs/v2.6.1/nrf\lib\modem_jwt/Kconfig:7), with value y, direct dependencies y (value: y)

    error: Aborting due to Kconfig warnings

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


    -- 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' -GNinja -DBOARD=nrf9160_sica_b1 -DNCS_TOOLCHAIN_VERSION=NONE '-DBOARD_ROOT=c:/my-nrf-boards;c:/nordic/myapps/serial_lte_modem' '-Sc:\nordic\myApps\serial_lte_modem'

  • Hi!

    Do you get the same errors for when you built for the nrf9160dk_nrf9160_ns and your custom nrf9160_sica_b1 board?

    What changes did you make in order to get a build error when building for the nrf9160dk_nrf9160_ns ?

  • Hi! thanks for your response.

    Now I can build the SLM without errors. The thing that I did is just build the SLM sample with the  nrf9160dk_nrf9160_ns board option and then just modify the UART0 pins to match with my custom board and let the other interfaces, buttons and leds in the overlay. 

    I can flash my board but I don't have communication with the MCU via UART. What I'm doing wrong?

    The only changes that I did in the overlay were:

    UART 0 TX --> P0.06

    UART 0 RX --> P0.05

    UART CTS --> P0.14

    UART RTS --> P0.15

    I'm totally desperate for not being able to get it to work... is there something that I'm missing in my MCU FW related with the CTS/RTS pins?

    thanks in advance!

Related