Hello,
I'm trying to follow this example (Serial DFU), on a nRF52840 custom board, but I'm getting the following error:
[32/350] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj
C:\ncs\toolchains\b620d30767\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=512 -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=1 -DZCBOR_ASSERTS -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.9.0/zephyr/kernel/include -IC:/ncs/v2.9.0/zephyr/arch/arm/include -IC:/ProgramData/Repositories/fft-microwave-sensor/build/fft-microwave-sensor/zephyr/include/generated/zephyr -IC:/ncs/v2.9.0/zephyr/include -IC:/ProgramData/Repositories/fft-microwave-sensor/build/fft-microwave-sensor/zephyr/include/generated -IC:/ncs/v2.9.0/zephyr/soc/nordic -IC:/ncs/v2.9.0/zephyr/lib/libc/newlib/include -IC:/ncs/v2.9.0/zephyr/soc/nordic/nrf52/. -IC:/ncs/v2.9.0/zephyr/soc/nordic/common/. -IC:/ncs/v2.9.0/zephyr/subsys/mgmt/mcumgr/util/include -IC:/ncs/v2.9.0/zephyr/subsys/mgmt/mcumgr/transport/include -IC:/ncs/v2.9.0/zephyr/subsys/usb/device -IC:/ncs/v2.9.0/zephyr/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/nrfx_glue -IC:/ncs/v2.9.0/zephyr/subsys/bluetooth -IC:/ncs/v2.9.0/zephyr/subsys/settings/include -IC:/ncs/v2.9.0/zephyr/drivers/usb/common/nrf_usbd_common/. -IC:/ncs/v2.9.0/nrf/include -IC:/ncs/v2.9.0/nrf/tests/include -IC:/ncs/v2.9.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.9.0/zephyr/modules/cmsis/. -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.9.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.9.0/modules/debug/segger/SEGGER -IC:/ncs/v2.9.0/modules/debug/segger/Config -IC:/ncs/v2.9.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.9.0/modules/lib/zcbor/include -IC:/ncs/v2.9.0/nrfxlib/nfc/include -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.9.0/zephyr/lib/libc/common/include -isystem C:/ncs/v2.9.0/nrfxlib/crypto/nrf_cc310_platform/include -Os -DNDEBUG -fno-strict-aliasing -Os -imacros C:/ProgramData/Repositories/fft-microwave-sensor/build/fft-microwave-sensor/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.9.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ProgramData/Repositories/fft-microwave-sensor=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.9.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.9.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj -MF zephyr\CMakeFiles\zephyr.dir\subsys\dfu\img_util\flash_img.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj -c C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c
In file included from C:/ncs/v2.9.0/zephyr/include/zephyr/storage/flash_map.h:300,
from C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:13:
C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c: In function 'flash_img_init':
C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:47:22: error: 'PM_mcuboot_primary_ID' undeclared (first use in this function)
47 | #define PM_ID(label) PM_##label##_ID
| ^~~
C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:52:35: note: in expansion of macro 'PM_ID'
52 | #define FIXED_PARTITION_ID(label) PM_ID(label)
| ^~~~~
C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:33:30: note: in expansion of macro 'FIXED_PARTITION_ID'
33 | #define UPLOAD_FLASH_AREA_ID FIXED_PARTITION_ID(UPLOAD_FLASH_AREA_LABEL)
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:150:39: note: in expansion of macro 'UPLOAD_FLASH_AREA_ID'
150 | return flash_img_init_id(ctx, UPLOAD_FLASH_AREA_ID);
| ^~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:47:22: note: each undeclared identifier is reported only once for each function it appears in
47 | #define PM_ID(label) PM_##label##_ID
| ^~~
C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:52:35: note: in expansion of macro 'PM_ID'
52 | #define FIXED_PARTITION_ID(label) PM_ID(label)
| ^~~~~
C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:33:30: note: in expansion of macro 'FIXED_PARTITION_ID'
33 | #define UPLOAD_FLASH_AREA_ID FIXED_PARTITION_ID(UPLOAD_FLASH_AREA_LABEL)
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:150:39: note: in expansion of macro 'UPLOAD_FLASH_AREA_ID'
150 | return flash_img_init_id(ctx, UPLOAD_FLASH_AREA_ID);
| ^~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:151:1: warning: control reaches end of non-void function [-Wreturn-type]
151 | }
| ^
[43/350] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/class/dfu/usb_dfu.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/class/dfu/usb_dfu.c.obj
C:\ncs\toolchains\b620d30767\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=512 -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=1 -DZCBOR_ASSERTS -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.9.0/zephyr/kernel/include -IC:/ncs/v2.9.0/zephyr/arch/arm/include -IC:/ProgramData/Repositories/fft-microwave-sensor/build/fft-microwave-sensor/zephyr/include/generated/zephyr -IC:/ncs/v2.9.0/zephyr/include -IC:/ProgramData/Repositories/fft-microwave-sensor/build/fft-microwave-sensor/zephyr/include/generated -IC:/ncs/v2.9.0/zephyr/soc/nordic -IC:/ncs/v2.9.0/zephyr/lib/libc/newlib/include -IC:/ncs/v2.9.0/zephyr/soc/nordic/nrf52/. -IC:/ncs/v2.9.0/zephyr/soc/nordic/common/. -IC:/ncs/v2.9.0/zephyr/subsys/mgmt/mcumgr/util/include -IC:/ncs/v2.9.0/zephyr/subsys/mgmt/mcumgr/transport/include -IC:/ncs/v2.9.0/zephyr/subsys/usb/device -IC:/ncs/v2.9.0/zephyr/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/nrfx_glue -IC:/ncs/v2.9.0/zephyr/subsys/bluetooth -IC:/ncs/v2.9.0/zephyr/subsys/settings/include -IC:/ncs/v2.9.0/zephyr/drivers/usb/common/nrf_usbd_common/. -IC:/ncs/v2.9.0/nrf/include -IC:/ncs/v2.9.0/nrf/tests/include -IC:/ncs/v2.9.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.9.0/zephyr/modules/cmsis/. -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.9.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.9.0/modules/debug/segger/SEGGER -IC:/ncs/v2.9.0/modules/debug/segger/Config -IC:/ncs/v2.9.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.9.0/modules/lib/zcbor/include -IC:/ncs/v2.9.0/nrfxlib/nfc/include -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.9.0/zephyr/lib/libc/common/include -isystem C:/ncs/v2.9.0/nrfxlib/crypto/nrf_cc310_platform/include -Os -DNDEBUG -fno-strict-aliasing -Os -imacros C:/ProgramData/Repositories/fft-microwave-sensor/build/fft-microwave-sensor/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.9.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ProgramData/Repositories/fft-microwave-sensor=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.9.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.9.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/class/dfu/usb_dfu.c.obj -MF zephyr\CMakeFiles\zephyr.dir\subsys\usb\device\class\dfu\usb_dfu.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/class/dfu/usb_dfu.c.obj -c C:/ncs/v2.9.0/zephyr/subsys/usb/device/class/dfu/usb_dfu.c
In file included from C:/ncs/v2.9.0/zephyr/include/zephyr/storage/flash_map.h:300,
from C:/ncs/v2.9.0/zephyr/subsys/usb/device/class/dfu/usb_dfu.c:46:
C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:47:22: error: 'PM_mcuboot_primary_ID' undeclared here (not in a function)
47 | #define PM_ID(label) PM_##label##_ID
| ^~~
C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:52:35: note: in expansion of macro 'PM_ID'
52 | #define FIXED_PARTITION_ID(label) PM_ID(label)
| ^~~~~
C:/ncs/v2.9.0/zephyr/subsys/usb/device/class/dfu/usb_dfu.c:333:40: note: in expansion of macro 'FIXED_PARTITION_ID'
333 | #define DOWNLOAD_FLASH_AREA_ID FIXED_PARTITION_ID(SLOT0_PARTITION)
| ^~~~~~~~~~~~~~~~~~
C:/ncs/v2.9.0/zephyr/subsys/usb/device/class/dfu/usb_dfu.c:340:26: note: in expansion of macro 'DOWNLOAD_FLASH_AREA_ID'
340 | .flash_area_id = DOWNLOAD_FLASH_AREA_ID,
I couldn't find any relevant information and also, the Exercise 2 of the nRF SDK Connect Intermediate Course is not available for SDK v2.7.0+. That might be a problem, since I'm using v2.9.0 right now.
With that, my question is, how do I implement DFU over USB now?
I'm attaching the proj.conf file just as reference, if needed:
CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y # Enable GPIO and SPI CONFIG_GPIO=y CONFIG_SPI=y CONFIG_SPI_NRFX=y CONFIG_SPI_NOR=y CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 CONFIG_SPI_NOR_SFDP_RUNTIME=y # Enable Flash support CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_MULTITHREADING=y CONFIG_FLASH_PAGE_LAYOUT=y # Enable I²C support CONFIG_I2C=y # Enable RTC support CONFIG_RTC=y CONFIG_RTC_RV8263=y # Enable ADC CONFIG_ADC=y # Enable RTT and console support CONFIG_CONSOLE=y # Increase RTT buffer sizes for better performance CONFIG_SEGGER_RTT_MAX_NUM_UP_BUFFERS=3 CONFIG_SEGGER_RTT_MAX_NUM_DOWN_BUFFERS=3 CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=28000 CONFIG_SEGGER_RTT_BUFFER_SIZE_DOWN=16 CONFIG_SEGGER_RTT_PRINTF_BUFFER_SIZE=14000 CONFIG_SEGGER_RTT_MODE_NO_BLOCK_SKIP=y # Enable printk and STDOUT for RTT CONFIG_PRINTK=y CONFIG_STDOUT_CONSOLE=y CONFIG_LOG=y CONFIG_LOG_MODE_DEFERRED=y # Enable USB stack CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="FFT Gen IV" # Enable CDC ACM class CONFIG_USB_CDC_ACM=y CONFIG_SERIAL=y # Enable NFC CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_NFC_T4T_NRFXLIB=y CONFIG_NFC_NDEF=y CONFIG_NFC_NDEF_MSG=y CONFIG_NFC_NDEF_RECORD=y CONFIG_NFC_NDEF_LE_OOB_REC=y CONFIG_NFC_NDEF_CH_MSG=y CONFIG_NFC_NDEF_TNEP_RECORD=y CONFIG_NFC_TNEP_TAG=y CONFIG_NFC_NDEF_PARSER=y CONFIG_NFC_NDEF_CH_PARSER=y CONFIG_NFC_NDEF_LE_OOB_REC_PARSER=y CONFIG_NFC_TNEP_CH=y # Enable Bluetooth CONFIG_BT=y CONFIG_BT_SMP=y CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="FFT Gen IV" CONFIG_BT_DIS=y CONFIG_BT_DIS_PNP=y CONFIG_BT_DIS_MANUF="Fringe Field Technologies" CONFIG_BT_DIS_PNP_VID_SRC=2 CONFIG_BT_DIS_PNP_VID=0x1915 CONFIG_BT_DIS_PNP_PID=0xEEEB CONFIG_BT_DIS_PNP_VER=0x0100 CONFIG_MAIN_STACK_SIZE=3072 CONFIG_BT_SETTINGS=y CONFIG_POLL=y CONFIG_NVS=y CONFIG_SETTINGS=y CONFIG_USB_DFU_CLASS=y CONFIG_USB_DFU_ENABLE_UPLOAD=y CONFIG_STREAM_FLASH=y CONFIG_IMG_MANAGER=y CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n # Enable MCUmgr and dependencies. CONFIG_MCUMGR=y CONFIG_NET_BUF=y CONFIG_ZCBOR=y CONFIG_CRC=y # Enable most core commands. CONFIG_MCUMGR_GRP_IMG=y CONFIG_MCUMGR_GRP_OS=y # Enable the serial mcumgr transport. CONFIG_MCUMGR_TRANSPORT_UART=y CONFIG_BASE64=y # Disable UART Console and enable the RTT console CONFIG_UART_CONSOLE=n CONFIG_RTT_CONSOLE=y CONFIG_USE_SEGGER_RTT=y # Some command handlers require a large stack. CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
My .dts file is here as well:
/dts-v1/;
#include <mem.h>
#include <nordic/nrf52840.dtsi>
#include "FFTv03-NRF52840-pinctrl.dtsi"
/ {
model = "Custom Board auto generated by nRF Connect for VS Code";
compatible = "SMART-Labs,custom-board-name";
chosen {
zephyr,console = &cdc_acm_uart;
zephyr,shell-uart = &cdc_acm_uart;
zephyr,uart-mcumgr = &cdc_acm_uart;
zephyr,bt-mon-uart = &cdc_acm_uart;
zephyr,bt-c2h-uart = &cdc_acm_uart;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
soc {
compatible = "nordic,nrf52840", "nordic,nrf52", "simple-bus";
};
leds {
compatible = "gpio-leds";
red_led: led_0 {
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
label = "RED LED";
};
green_led: led_1 {
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
label = "GREEN LED";
};
blue_led: led_2 {
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
label = "BLUE LED";
};
};
crystal_oscilator {
compatible = "gpio-keys";
crystal_oscilator_enable: crystal-oscilator-enable {
gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
label = "CRYSTAL_OSCILATOR_ENABLE";
};
};
adf4350_pins {
compatible = "gpio-keys";
muxout: muxout {
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
label = "ADF4350_MUXOUT";
};
ld: ld {
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
label = "ADF4350_LD";
};
ce: ce {
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
label = "ADF4350_CE";
};
pdbrf: pdbrf {
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
label = "ADF4350_PDBRF";
};
};
lmh2110_pins {
compatible = "gpio-keys";
pwr_det_en: pwr-det-en {
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
label = "Plmh2110_EN";
};
};
lmh2110_out {
pwr_det_out: pwr-det-out {
io-channels = <&adc 4>;
label = "lmh2110_OUT";
};
};
vbatt {
compatible = "voltage-divider";
io-channels = <&adc 1>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 2000000)>;
power-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
};
aliases {
red-led = &red_led;
green-led = &green_led;
blue-led = &blue_led;
crystal-enable = &crystal_oscilator_enable;
adf4350-muxout = &muxout;
adf4350-ld = &ld;
adf4350-ce = &ce;
adf4350-pdbrf = &pdbrf;
lmh2110-en = &pwr_det_en;
lmh2110-out = &pwr_det_out;
rtc = &rv8263;
};
};
&adc {
status = "okay";
compatible = "nordic,nrf-saadc";
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1_6";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 3)>;
zephyr,input-positive = <NRF_SAADC_AIN2>;
zephyr,resolution = <12>;
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpiote {
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twim";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
zephyr,concat-buf-size = <512>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
rv8263: rv8263@51 {
compatible = "microcrystal,rv-8263-c8";
reg = <0x51>;
int-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
};
};
&spi1 {
status = "okay";
cs-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
adf4350: adf4350@0 {
compatible = "vnd,spi-device";
reg = <0>;
spi-max-frequency = <8000000>;
label = "ADF4350";
};
};
&spi2 {
status = "okay";
cs-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&spi2_default>;
pinctrl-1 = <&spi2_sleep>;
pinctrl-names = "default", "sleep";
ext_flash: ext_flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <8000000>;
jedec-id = [ C2 25 37 ];
hold-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
wp-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
size = <0x800000>;
// sfdp-bfp = [00 FF C2 00 01 04 10 01 00 FF 84 00 01 02 C0 00
// FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF];
};
};
zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};
&flash0 {
reg = <0x00000000 DT_SIZE_K(1024)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(48)>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000c000 DT_SIZE_K(472)>;
};
slot1_partition: partition@82000 {
label = "image-1";
reg = <0x00082000 DT_SIZE_K(472)>;
};
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 DT_SIZE_K(32)>;
};
};
};
&sram0 {
reg = <0x20000000 DT_SIZE_K(256)>;
};
Thanks in advance.