NRF9160 Custom board Serial LTE Modem build failed

Hi, 

I created a custom board following the instructions from https://www.youtube.com/watch?v=V_dVKgWKILM . Everything is ok and with the "Hello world" example builds without any problem. Now I'm trying to use this custom board to build the Serial LTE modem example, but it gives me the following error:

-- 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'

Anyone can help me, please?

thanks in advance

Parents Reply Children
  • Thanks!

    My custom board uses a STM32 MCU connected to nrf9160 sica b1 via UART. 

    TX --> P0.06

    RX --> P0.05

    RTS --> P0.14

    CTS --> P0.15

    So, I understand that I only need to activate GPIO and UART2 on .dts file and then add these pins to the pinctrl.dtsi file, right?

    I just created the custom board with these changes and the SLM application from the sample. Then add build configuration and select my custom board --> build configuration

    I didn't modify the rest of parameters of the build configuration or the prj.conf file, should I do that?

    thanks for your help!

  • Hi,

    If you look at UART0 in nrf52840dk, its pin control configuration is in nrf52840dk_nrf52840-pinctrl.dtsi. There you can see configured pins for UART0.


    in nrf52840dk_nrf52840-pinctrl.dtsi:

    uart0_default: uart0_default {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 0, 6)>,
    				<NRF_PSEL(UART_RTS, 0, 5)>;
    		};
    		group2 {
    			psels = <NRF_PSEL(UART_RX, 0, 8)>,
    				<NRF_PSEL(UART_CTS, 0, 7)>;
    			bias-pull-up;
    		};
    	};
    	
    	uart0_sleep: uart0_sleep {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 0, 6)>,
    				<NRF_PSEL(UART_RX, 0, 8)>,
    				<NRF_PSEL(UART_RTS, 0, 5)>,
    				<NRF_PSEL(UART_CTS, 0, 7)>;
    			low-power-enable;
    		};
    	};


    UART0 needs to be enabled using status="okay".

    in nrf52840dk_nrf52840.dts:
    &uart0 {
    	compatible = "nordic,nrf-uarte";
    	status = "okay";
    	current-speed = <115200>;
    	pinctrl-0 = <&uart0_default>;
    	pinctrl-1 = <&uart0_sleep>;
    	pinctrl-names = "default", "sleep";
    };


    VS Code visualization:

    You can find UART configuration options in the documentation.

    GPIOs can be enabled using status="enabled" or disabled using status = "disabled". Disabled status can be seen for example in nrf52840.dtsi.

    in nrf52840.dtsi

    gpio0: gpio@50000000 {
    			compatible = "nordic,nrf-gpio";
    			gpio-controller;
    			reg = <0x50000000 0x200
    			       0x50000500 0x300>;
    			#gpio-cells = <2>;
    			status = "disabled";
    			port = <0>;
    			gpiote-instance = <&gpiote>;
    		};

    You can check zephyr.dts to see compiled devicetree. If zephyr.dts shows that device is disabled, you would need to add devicetree overlay to enable the device.

    overlay example
     &gpio0 {
    	status = "okay";
    };


    In addition to enabling the device, you also need to verify that device driver is included in your project configuration. In case of GPIO, you would need to add CONFIG_GPIO=y to your prj.conf if it is not already there.

    You can read more about debugging devicetree in the NCS intermediate DevAcademy course.

    Best regards,
    Dejan

Related