Fail to build in VS new SDK 2.2

Hi,

We moving to new SDK and I'm failing on building with VS, previously I was with 1.9.1 and Segger so had no problem

"
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'c:\nrf\toolchains\v2.2.0\opt\bin\cmake.EXE' --build 'c:\nrf\v2.2.0\nrf\applications\serial_lte_modem\SLM'
"

Any idea how to fix it?

Parents
  • Hello

    __device_dts_ord_xx undeclared probably means you have an ill-defined node in your devicetre.

    Have you customized any part of the devicetree yourself?

    It could also be helpful to see how you're initializing your device in your code.

    Best regards,

    Einar

  • Hi Einar,

    Thanks for the very fast reply

    I only changed the CONF file to use UART 2 and not 0

    here is the defines

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #
    # Copyright (c) 2021 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    # Configuration file for nRF9160DK.
    # This file is merged with prj.conf in the application folder, and options
    # set here will take precedence if they are present in both files.
    # Use UART_0 (when working with PC terminal)
    # unmask the following config
    #CONFIG_SLM_CONNECT_UART_0=y
    #CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
    #CONFIG_UART_0_NRF_HW_ASYNC=y
    #CONFIG_SLM_WAKEUP_PIN=6
    #CONFIG_SLM_INDICATE_PIN=2
    # Use UART_2 (when working with external MCU)
    # unmask the following config
    CONFIG_SLM_CONNECT_UART_2=y
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Here is the full log of the build

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Building serial_lte_modem
    west build --build-dir c:\nrf\v2.2.0\nrf\applications\serial_lte_modem\SLM c:\nrf\v2.2.0\nrf\applications\serial_lte_modem --pristine --board nrf9160dk_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="c:/nrf/v2.2.0/nrf/applications/serial_lte_modem"
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/nrf/v2.2.0/nrf/applications/serial_lte_modem
    -- Found Python3: C:/nrf/toolchains/v2.2.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: C:/nrf/v2.2.0/zephyr/.cache
    -- Zephyr version: 3.2.99 (C:/nrf/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
    -- Found host-tools: zephyr 0.15.1 (C:/nrf/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (C:/nrf/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: C:/nrf/toolchains/v2.2.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/nrf/v2.2.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Found devicetree overlay: C:/nrf/v2.2.0/nrf/applications/serial_lte_modem/boards/nrf9160dk_nrf9160_ns.overlay
    -- Generated zephyr.dts: C:/nrf/v2.2.0/nrf/applications/serial_lte_modem/SLM/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/nrf/v2.2.0/nrf/applications/serial_lte_modem/SLM/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/nrf/v2.2.0/nrf/applications/serial_lte_modem/SLM/zephyr/dts.cmake
    warning: UART_2_NRF_HW_ASYNC (defined at drivers/serial/Kconfig.nrfx:267) was assigned the value 'y'
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Right, then I would suspect you'll need to enable UART 2 for that to work.

    Can you share your UART nodes found in build/zephyr/zephyr.dts?

    -Einar

  • talking about this?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    uart0: uart@8000 {
    compatible = "nordic,nrf-uarte";
    reg = < 0x8000 0x1000 >;
    interrupts = < 0x8 0x1 >;
    status = "okay";
    current-speed = < 0x1c200 >;
    pinctrl-0 = < &uart0_default >;
    pinctrl-1 = < &uart0_sleep >;
    pinctrl-names = "default", "sleep";
    };
    uart1: arduino_serial: uart@9000 {
    compatible = "nordic,nrf-uarte";
    reg = < 0x9000 0x1000 >;
    interrupts = < 0x9 0x1 >;
    status = "disabled";
    current-speed = < 0x1c200 >;
    pinctrl-0 = < &uart1_default >;
    pinctrl-1 = < &uart1_sleep >;
    pinctrl-names = "default", "sleep";
    };
    uart2: uart@a000 {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    you'll need to enable UART 2 for that to work

    where is the config for that?

  • You should add a devicetree overlay file to your project:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/howtos.html#set-devicetree-overlays

    Under "Use devicetree overlays" there is an example that sets status = "okay", this is what you should do for UART 2.

    If you're not using UART 0 anymore you could also set its status to "disabled".

    -Einar

  • Hi Einarh,

    Thanks Slight smile

    Succeeded building the application

    You can close this ticket

    If I encounter more problems with the VS I will open new ticket

Reply
  • Hi Einarh,

    Thanks Slight smile

    Succeeded building the application

    You can close this ticket

    If I encounter more problems with the VS I will open new ticket

Children
No Data