Ncs 2.2.0 radio.c dts error

Hi,

I am trying to switch my project to NCS v2.2.0. I was able to switch with my nrf52840DK and nrf52840dongle builds, but not with nrf52833 dongle build option. It gives the following error.

C:/ncs/v2.2.0/zephyr/modules/openthread/platform/radio.c
In file included from C:\ncs\v2.2.0\zephyr\include\zephyr\toolchain\gcc.h:88,
                 from C:\ncs\v2.2.0\zephyr\include\zephyr\toolchain.h:50,
                 from C:\ncs\v2.2.0\zephyr\include\zephyr\sys\cbprintf.h:13,
                 from C:\ncs\v2.2.0\zephyr\include\zephyr\logging\log_msg.h:11,
                 from C:\ncs\v2.2.0\zephyr\include\zephyr\logging\log_core.h:9,
                 from C:\ncs\v2.2.0\zephyr\include\zephyr\logging\log.h:11,
                 from C:\ncs\v2.2.0\zephyr\modules\openthread\platform\radio.c:16:
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:83:41: error: '__device_dts_ord_DT_CHOSEN_zephyr_ieee802154_ORD' undeclared here (not in a function)
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\toolchain\common.h:132:26: note: in definition of macro '_DO_CONCAT'
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:83:33: note: in expansion of macro '_CONCAT'
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
  209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\modules\openthread\platform\radio.c:83:9: note: in expansion of macro 'DEVICE_DT_GET'
   83 |         DEVICE_DT_GET(DT_CHOSEN(zephyr_ieee802154));

Same project works on NCS v2.1.2 but I need the border router and NAT64 libraries which available in NCS v2.2.0. How can I fix this error?

# nothing here

CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y

CONFIG_LEGACY_INCLUDE_PATH=y
#L2
CONFIG_NET_L2_OPENTHREAD=y
# Generic networking options
CONFIG_NETWORKING=y

CONFIG_OPENTHREAD_COAP=y


CONFIG_OPENTHREAD_BORDER_ROUTER=y

CONFIG_OPENTHREAD_BORDER_ROUTING_NAT64=y

#Network parameters
CONFIG_OPENTHREAD_MANUAL_START=n
CONFIG_OPENTHREAD_NETWORK_NAME="keremv1"
CONFIG_OPENTHREAD_NETWORKKEY="00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:22:66"
CONFIG_OPENTHREAD_PANID=8466
CONFIG_OPENTHREAD_XPANID="de:ad:00:be:ef:00:ca:fe"
CONFIG_OPENTHREAD_CHANNEL=15

# Enable OpenThread features set

CONFIG_OPENTHREAD_MTD=y
CONFIG_OPENTHREAD_MTD_SED=y


#Network shell
CONFIG_SHELL=y
CONFIG_OPENTHREAD_SHELL=y
CONFIG_SHELL_ARGC_MAX=26
CONFIG_SHELL_CMD_BUFF_SIZE=416

CONFIG_HEAP_MEM_POOL_SIZE=2048
#Additional Parameter
CONFIG_MBEDTLS_SHA1_C=n
CONFIG_FPU=y
CONFIG_GPIO=y



/*
 * Copyright (c) 2020 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

/dts-v1/;
#include <nordic/nrf52833_qiaa.dtsi>

/ {
	model = "Nordic nRF52833 Dongle NRF52833";
	compatible = "nordic,nrf52833-dongle-nrf52833";

	chosen {
		zephyr,console = &uart0;
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,code-partition = &slot0_partition;
	};

	leds {
		compatible = "gpio-leds";
		led0_green: led_0 {
			gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
			label = "Green LED 0";
		};
		led1_red: led_1 {
			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
			label = "Red LED 1";
		};
		led1_green: led_2 {
			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
			label = "Green LED 1";
		};
		led1_blue: led_3 {
			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
			label = "Blue LED 1";
		};
	};

	buttons {
		compatible = "gpio-keys";
		button0: button_0 {
			gpios = <&gpio0 10 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
			label = "Push button switch 0";
		};
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		sw0 = &button0;
		led0 = &led0_green;
		led1 = &led1_red;
		led2 = &led1_green;
		led3 = &led1_blue;
		led0-green = &led0_green;
		led1-red   = &led1_red;
		led1-green = &led1_green;
		led1-blue  = &led1_blue;
		//mcuboot-button0 = &button0;
		mcuboot-led0 = &led1_blue;
	};
};

&gpiote {
	status = "okay";
};

&gpio0 {
	status = "okay";
};

&gpio1 {
	//status = "okay";
};

&uart0 {
	compatible = "nordic,nrf-uart";
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&uart0_default>;
	pinctrl-1 = <&uart0_sleep>;
	pinctrl-names = "default", "sleep";
};

&pinctrl {
	uart0_default: uart0_default {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 11)>,
				<NRF_PSEL(UART_RTS, 0, 4)>,
				<NRF_PSEL(UART_RX, 1, 9)>,
				<NRF_PSEL(UART_CTS, 0, 5)>;
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 11)>,
				<NRF_PSEL(UART_RTS, 0, 4)>,
				<NRF_PSEL(UART_RX, 1, 9)>,
				<NRF_PSEL(UART_CTS, 0, 5)>;
			low-power-enable;
		};
	};
};

&flash0 {
	/*
	 * For more information, see:
	 * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
	 */
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x000000000 0xC000>;
		};
		slot0_partition: partition@c000 {
			label = "image-0";
			reg = <0x0000C000 0x32000>;
		};
		slot1_partition: partition@3e000 {
			label = "image-1";
			reg = <0x0003E000 0x32000>;
		};
		scratch_partition: partition@70000 {
			label = "image-scratch";
			reg = <0x00070000 0xA000>;
		};
		storage_partition: partition@7a000 {
			label = "storage";
			reg = <0x0007A000 0x00006000>;
		};
	};
};

zephyr_udc0: &usbd {
	compatible = "nordic,nrf-usbd";
	status = "okay";
};

These are my prj.conf and 52833dongle.dts configurations.

Related