This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SLM: connect to external MCU using UART2

Hi

I'm using NCS 1.4.0 and SES. If I change the setting in Serial LTE modem to  CONFIG_SLM_CONNECT_UART_2 for external MCU connection, I get an error msg from SES: Cannot configure project. It works fine with UART_1. Everything else is unchanged. Am I missing something? Should I configure something else? anybody else getting the same error?

 

Parents
  • Hi, 

    In prj.conf there are two lines for UART_2, did you configure both?

    "To connect with an external MCU, you must set the configuration options CONFIG_SLM_GPIO_WAKEUP and CONFIG_SLM_CONNECT_UART_2 in the serial LTE modem application configuration."

    Can you provide the output log when building?

    Thanks

    -Øyvind

  • Hi

    I did set both configuration options in SES. Then the configuration failed with the before mentioned error. However, when changing the options in prj.conf instead, I got the following compilation error (same error with west and SES):

    serial_fusion_modem_v140>west build -b nrf9160dk_nrf9160ns
    [0/16] Performing build step for 'spm_subimage'
    ninja: no work to do.
    [1/6] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [2/6] Running utility command for mcuboot_sign_target
    
    C:\Users\bahe\Documents\NCS_Projects\serial_fusion_modem_v140>west build -b nrf9160dk_nrf9160ns
    [0/1] Re-running CMake...
    Including boilerplate (Zephyr base (cached)): C:/NordicSDK/v1.4.0/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140
    -- Using NCS Toolchain 1.4.0 for building. (C:/NordicSDK/v1.4.0/toolchain/cmake)
    -- Zephyr version: 2.4.0 (C:/NordicSDK/v1.4.0/zephyr)
    -- Found west (found suitable version "0.7.2", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160ns
    -- Cache files will be written to: C:/NordicSDK/v1.4.0/zephyr/.cache
    -- Found dtc: C:/NordicSDK/v1.4.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/NordicSDK/v1.4.0/toolchain/opt)
    -- Found BOARD.dts: C:/NordicSDK/v1.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns.dts
    -- Found devicetree overlay: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/nrf9160dk_nrf9160ns.overlay
    -- Generated zephyr.dts: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/zephyr/include/generated/devicetree_unfixed.h
    
    warning: UART_0_NRF_HW_ASYNC_TIMER (defined at drivers/serial/Kconfig.nrfx:78) was assigned the
    value '2' but got the value ''. Check these unsatisfied dependencies: UART_0_NRF_HW_ASYNC (=n). See
    http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_0_NRF_HW_ASYNC_TIMER.html and/or
    look up UART_0_NRF_HW_ASYNC_TIMER 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.
    
    Parsing C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/Kconfig
    Loaded configuration 'C:/NordicSDK/v1.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_defconfig'
    Merged configuration 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/prj.conf'
    Configuration saved to 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/zephyr/.config'
    Kconfig header saved to 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/zephyr/include/generated/autoconf.h'
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)
    
    === child image spm -  begin ===
    Including boilerplate (Zephyr base (cached)): C:/NordicSDK/v1.4.0/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/NordicSDK/v1.4.0/nrf/samples/spm
    -- Using NCS Toolchain 1.4.0 for building. (C:/NordicSDK/v1.4.0/toolchain/cmake)
    -- Zephyr version: 2.4.0 (C:/NordicSDK/v1.4.0/zephyr)
    -- Found west (found suitable version "0.7.2", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160
    -- Cache files will be written to: C:/NordicSDK/v1.4.0/zephyr/.cache
    -- Found dtc: C:/NordicSDK/v1.4.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/NordicSDK/v1.4.0/toolchain/opt)
    -- Found BOARD.dts: C:/NordicSDK/v1.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/NordicSDK/v1.4.0/nrf/samples/spm/nrf9160dk_nrf9160.overlay
    -- Generated zephyr.dts: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/spm/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/spm/zephyr/include/generated/devicetree_unfixed.h
    Parsing C:/NordicSDK/v1.4.0/zephyr/Kconfig
    Loaded configuration 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/spm/zephyr/.config'
    No change to configuration in 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/spm/zephyr/.config'
    No change to Kconfig header in 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/spm/zephyr/include/generated/autoconf.h'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/spm
    === child image spm -  end ===
    
    Changed board to secure nrf9160dk_nrf9160 (NOT NS)
    
    === child image mcuboot -  begin ===
    Including boilerplate (Zephyr base (cached)): C:/NordicSDK/v1.4.0/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/NordicSDK/v1.4.0/bootloader/mcuboot/boot/zephyr
    -- Using NCS Toolchain 1.4.0 for building. (C:/NordicSDK/v1.4.0/toolchain/cmake)
    -- Zephyr version: 2.4.0 (C:/NordicSDK/v1.4.0/zephyr)
    -- Found west (found suitable version "0.7.2", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160
    -- Cache files will be written to: C:/NordicSDK/v1.4.0/zephyr/.cache
    -- Found dtc: C:/NordicSDK/v1.4.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/NordicSDK/v1.4.0/toolchain/opt)
    -- Found BOARD.dts: C:/NordicSDK/v1.4.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
    -- Found devicetree overlay: C:/NordicSDK/v1.4.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Found devicetree overlay: C:/NordicSDK/v1.4.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    Parsing C:/NordicSDK/v1.4.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/mcuboot/zephyr/.config'
    No change to configuration in 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/mcuboot/zephyr/.config'
    No change to Kconfig header in 'C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/mcuboot/zephyr/include/generated/autoconf.h'
    CMake Warning at C:/NordicSDK/v1.4.0/zephyr/kernel/CMakeLists.txt:54 (message):
      Single threaded mode (CONFIG_MULTITHREADING=n) is deprecated
    
    
    MCUBoot bootloader key file: C:/NordicSDK/v1.4.0/bootloader/mcuboot/root-rsa-2048.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at C:/NordicSDK/v1.4.0/nrf/cmake/mcuboot.cmake:120 (message):
    
    
            ---------------------------------------------------------
            --- WARNING: Using default MCUBoot key, it should not ---
            --- be used for production.                           ---
            ---------------------------------------------------------
    
    
    Call Stack (most recent call first):
      C:/NordicSDK/v1.4.0/bootloader/mcuboot/zephyr/CMakeLists.txt:1 (include)
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build
    [0/217] Performing build step for 'spm_subimage'
    [145/149] Linking C executable zephyr\zephyr_prebuilt.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       32256 B        48 KB     65.63%
                SRAM:        5480 B        64 KB      8.36%
            IDT_LIST:          40 B         2 KB      1.95%
    [149/149] Linking C executable zephyr\zephyr.elf
    [2/213] Performing build step for 'mcuboot_subimage'
    [122/126] Linking C executable zephyr\zephyr_prebuilt.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       41796 B        48 KB     85.03%
                SRAM:       25256 B       128 KB     19.27%
            IDT_LIST:          56 B         2 KB      2.73%
    [126/126] Linking C executable zephyr\zephyr.elf
    [32/213] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    FAILED: zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    C:\NordicSDK\v1.4.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DAPP_VERSION=v1.4.0 -DBUILD_VERSION=v2.4.0-ncs1 -DEXT_API_MAGIC=0x281ee6de,0xb845acea,23298 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,23298 -DKERNEL -DNRF9160_XXAA -DNRF_TRUSTZONE_NONSECURE -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/NordicSDK/v1.4.0/zephyr/include -Izephyr/include/generated -IC:/NordicSDK/v1.4.0/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/NordicSDK/v1.4.0/zephyr/lib/libc/newlib/include -IC:/NordicSDK/v1.4.0/zephyr/subsys/net/lib/sockets/. -IC:/NordicSDK/v1.4.0/zephyr/subsys/net/ip -IC:/NordicSDK/v1.4.0/nrf/include -IC:/NordicSDK/v1.4.0/nrf/lib/at_notif/. -IC:/NordicSDK/v1.4.0/nrf/lib/at_cmd_parser/include -IC:/NordicSDK/v1.4.0/nrfxlib/bsdlib/include -IC:/NordicSDK/v1.4.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/NordicSDK/v1.4.0/modules/hal/nordic/nrfx -IC:/NordicSDK/v1.4.0/modules/hal/nordic/nrfx/drivers/include -IC:/NordicSDK/v1.4.0/modules/hal/nordic/nrfx/mdk -IC:/NordicSDK/v1.4.0/modules/hal/nordic/. -IC:/NordicSDK/v1.4.0/modules/debug/segger/rtt -IC:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/src/tcpip_proxy/. -IC:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/src -Os -imacros C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -imacros C:/NordicSDK/v1.4.0/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/bahe/Documents/NCS_Projects/serial_fusion_modem_v140=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/NordicSDK/v1.4.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/NordicSDK/v1.4.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj -MF zephyr\CMakeFiles\zephyr.dir\misc\generated\configs.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj   -c zephyr/misc/generated/configs.c
    In file included from C:/NordicSDK/v1.4.0/zephyr/include/toolchain.h:41,
                     from zephyr/misc/generated/configs.c:7:
    zephyr/misc/generated/configs.c: In function '_ConfigAbsSyms':
    C:/NordicSDK/v1.4.0/zephyr/include/toolchain/gcc.h:408:51: error: expected expression before ')' token
      408 |   "\n\t.type\t" #name ",%%object" :  : "n"(~(value)))
          |                                                   ^
    zephyr/misc/generated/configs.c:376:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
      376 | GEN_ABSOLUTE_SYM(CONFIG_UART_2_NRF_HW_ASYNC_TIMER, );
          | ^~~~~~~~~~~~~~~~
    [40/213] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_backend_rtt.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\NordicSDK\v1.4.0\toolchain\opt\bin\cmake.EXE' --build 'C:\Users\bahe\Documents\NCS_Projects\serial_fusion_modem_v140\build'

    The example above is built using a local copy from the SDK, but doing the same inside the SDK with the original application yields the same result.

  • Ok, I have been able to reproduce this issue.



    Are you getting the same output in SES? (Under the configuration window)?

  • The issue is UART_2_NRF_HW_ASYNC_TIME which is set at the same time as SLM_CONNECT_UART_2, is not configured with a value. I am currently working on a work-around.

  • Please try setting the UART_2_NRF_HW_ASYNC_TIME=2 manually in menuconfig in SES. This worked for me. This is the only work around at the moment.

Reply Children
No Data
Related