BLE OTA DFU using external flash

I'm using the NCS 2.5.2 sdk and nrf 5340 with 7002, and I want to do BLE OTA DFU using external flash.

I've found this guide Add DFU support to your application - Software - nRF Connect SDK guides - Nordic DevZone (nordicsemi.com), and successfully  done BLE OTA DFU using internal flash, just add the commands below,

#Enable MCUBOOT bootloader build in the application
CONFIG_BOOTLOADER_MCUBOOT=y
#Include MCUMGR and the dependencies in the build
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

but I don't know how to do with external flash, I've tried looking at main.c in mcuboot, and I didn't find where to modify the code.

Parents
  • Hi, when I add the config to the prj.conf and set the devicetree of the external flash, it has few error occur.

    prj.conf

    #config RTT
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    # CONFIG_LOG_MODE_DEFERRED=y
    CONFIG_UART_CONSOLE=n
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    
    CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096
    CONFIG_LOG_BUFFER_SIZE=4096
    
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="test 0422"
    CONFIG_BT_DEVICE_APPEARANCE=833
    CONFIG_BT_MAX_CONN=1
    CONFIG_BT_MAX_PAIRED=1
    CONFIG_HW_ID_LIBRARY=y
    CONFIG_HW_ID_LIBRARY_SOURCE_BLE_MAC=y
    
    
    # # Enable the NUS service
    # CONFIG_BT_NUS=y
    
    # # Enable bonding
    # CONFIG_BT_SETTINGS=y
    # CONFIG_FLASH=y
    # CONFIG_FLASH_PAGE_LAYOUT=y
    # CONFIG_FLASH_MAP=y
    # CONFIG_NVS=y
    # CONFIG_SETTINGS=y
    
    #ota
    #Enable MCUBOOT bootloader build in the application
    CONFIG_BOOTLOADER_MCUBOOT=y
    #Include MCUMGR and the dependencies in the build
    CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
    
    
    CONFIG_NORDIC_QSPI_NOR=n
    CONFIG_SPI=y
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    
    # If you don't add this when setting CONFIG_SPI=y, you'll get a lot of undefined references from the nrfx spim driver
    # E.G. "undefined reference to `z_impl_k_sleep'"
    CONFIG_MULTITHREADING=y
    CONFIG_SPI_NOR_SFDP_DEVICETREE=y
    CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
    CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
    
    # Disable internal DCDC
    CONFIG_BOARD_ENABLE_DCDC_APP=n
    CONFIG_BOARD_ENABLE_DCDC_NET=n
    CONFIG_BOARD_ENABLE_DCDC_HV=n
    
    # Use internal capacitor for 32M xtal and set capacitor value to 8.5pF 
    # (ranging from 7.0 pF to 20.0 pF in 0.5 pF steps
    # can be enabled on pins XC1 and XC2. This option specifies doubled
    # capacitance value for the two capacitors. Set it to 14 to get 7.0 pF
    # for each capacitor, 15 to get 7.5 pF, and so on.
    # )
    CONFIG_SOC_HFXO_CAP_INTERNAL=y
    CONFIG_SOC_HFXO_CAP_INT_VALUE_X2=17
     
    #  Use internal capacitor for 32k xtal and set capacitor value to 7pF 
    # (only 4 options of internal capacitor value settings for 32k xtal
    #   -INT_6PF
    #   -INT_7PF
    #   -INT_9PF
    #   - USE external capacitor)
    CONFIG_SOC_ENABLE_LFXO=y
    CONFIG_SOC_LFXO_CAP_INT_7PF=y
    device tree
        chosen {
            zephyr,sram = &sram0_image;
            zephyr,flash = &flash0;
            zephyr,code-partition = &slot0_partition;
            zephyr,sram-secure-partition = &sram0_s;
            zephyr,sram-non-secure-partition = &sram0_ns;
            nordic,pm-ext-flash = &mx25l3233;
        };
    &spi3 {
        compatible = "nordic,nrf-spim";
        status = "okay";
        pinctrl-0 = <&spi3_default>;
        pinctrl-1 = <&spi3_sleep>;
        pinctrl-names = "default", "sleep";
        cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
        mx25l3233: mx25l3233@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <8000000>;
                label = "extflash";
                jedec-id = [ C2 20 16  ];
                sfdp-bfp = [ E5 20 F1 FF FF FF FF 01 44 EB 08 6B 08 3B 04 BB EE FF 00 00 FF 00 00 FF FF 00 00 FF 0C 20 0F 52 10 D8 00 FF 00 36 50 26 9E F9 77 64 FE CF FF FF FF FF FF FF  ];
                size = <33554432>;
                // has-dpd;
                // t-enter-dpd = <10000>;
                // t-exit-dpd = <35000>;
        };
    };
    error message
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:77:30: note: in expansion of macro 'DT_INST_PROP'
       77 | #define INST_0_SCK_FREQUENCY DT_INST_PROP(0, sck_frequency)
          |                              ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:82:14: note: in expansion of macro 'INST_0_SCK_FREQUENCY'
       82 | BUILD_ASSERT(INST_0_SCK_FREQUENCY >= (NRF_QSPI_BASE_CLOCK_FREQ / 16),
          |              ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: expression in static assertion is not an integer
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:614:32: note: in expansion of macro 'DT_CAT3'
      614 | #define DT_PROP(node_id, prop) DT_CAT3(node_id, _P_, prop)
          |                                ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:34: note: in expansion of macro 'DT_PROP'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:77:30: note: in expansion of macro 'DT_INST_PROP'
       77 | #define INST_0_SCK_FREQUENCY DT_INST_PROP(0, sck_frequency)
          |                              ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:82:14: note: in expansion of macro 'INST_0_SCK_FREQUENCY'
       82 | BUILD_ASSERT(INST_0_SCK_FREQUENCY >= (NRF_QSPI_BASE_CLOCK_FREQ / 16),
          |              ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_P_cpol' undeclared here (not in a function); did you mean 'DT_N_INST_0_nordic_mbox_nrf_ipc'?
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:614:32: note: in expansion of macro 'DT_CAT3'
      614 | #define DT_PROP(node_id, prop) DT_CAT3(node_id, _P_, prop)
          |                                ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:34: note: in expansion of macro 'DT_PROP'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:136:14: note: in expansion of macro 'DT_INST_PROP'
      136 | BUILD_ASSERT(DT_INST_PROP(0, cpol) == DT_INST_PROP(0, cpha),
          |              ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_P_cpha' undeclared here (not in a function); did you mean 'DT_N_INST_0_nordic_mbox_nrf_ipc'?
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:614:32: note: in expansion of macro 'DT_CAT3'
      614 | #define DT_PROP(node_id, prop) DT_CAT3(node_id, _P_, prop)
          |                                ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:34: note: in expansion of macro 'DT_PROP'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:136:39: note: in expansion of macro 'DT_INST_PROP'
      136 | BUILD_ASSERT(DT_INST_PROP(0, cpol) == DT_INST_PROP(0, cpha),
          |                                       ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: expression in static assertion is not an integer
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:614:32: note: in expansion of macro 'DT_CAT3'
      614 | #define DT_PROP(node_id, prop) DT_CAT3(node_id, _P_, prop)
          |                                ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:34: note: in expansion of macro 'DT_PROP'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:136:14: note: in expansion of macro 'DT_INST_PROP'
      136 | BUILD_ASSERT(DT_INST_PROP(0, cpol) == DT_INST_PROP(0, cpha),
          |              ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:144:28: error: 'JESD216_DW15_QER_VAL_DT_N_INST_0_nordic_qspi_nor_P_quad_enable_requirements_STRING_TOKEN' undeclared here (not in a function)
      144 | #define INST_0_QER _CONCAT(JESD216_DW15_QER_VAL_, \
          |                            ^~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:160:15: note: in expansion of macro 'IS_EQUAL'
      160 | BUILD_ASSERT((IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)
          |               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/common.h:133:23: note: in expansion of macro '_DO_CONCAT'
      133 | #define _CONCAT(x, y) _DO_CONCAT(x, y)
          |                       ^~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:144:20: note: in expansion of macro '_CONCAT'
      144 | #define INST_0_QER _CONCAT(JESD216_DW15_QER_VAL_, \
          |                    ^~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:160:24: note: in expansion of macro 'INST_0_QER'
      160 | BUILD_ASSERT((IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)
          |                        ^~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:160:14: error: expression in static assertion is not an integer
      160 | BUILD_ASSERT((IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)
          |              ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c: In function 'qspi_nor_init':
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_BUS_IRQ_IDX_0_VAL_priority' undeclared (first use in this function)
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/arch/arm/aarch32/irq.h:128:9: note: in expansion of macro '_CHECK_PRIO'
      128 |         _CHECK_PRIO(priority_p, flags_p) \
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT'
       49 |         ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
          |         ^~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:9: note: in expansion of macro 'IRQ_CONNECT'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:2383:9: note: in expansion of macro 'DT_CAT5'
     2383 |         DT_CAT5(node_id, _IRQ_IDX_, idx, _VAL_, cell)
          |         ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:2410:31: note: in expansion of macro 'DT_IRQ_BY_IDX'
     2410 | #define DT_IRQ(node_id, cell) DT_IRQ_BY_IDX(node_id, 0, cell)
          |                               ^~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:41: note: in expansion of macro 'DT_IRQ'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |                                         ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3190:25: note: in expansion of macro 'DT_CAT'
     3190 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS)
          |                         ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:27: note: in expansion of macro 'DT_BUS'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                           ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:34: note: in expansion of macro 'DT_DRV_INST'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                                  ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:140:19: note: in expansion of macro 'DT_INST_BUS'
      140 | #define QSPI_NODE DT_INST_BUS(0)
          |                   ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:48: note: in expansion of macro 'QSPI_NODE'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |                                                ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: note: each undeclared identifier is reported only once for each function it appears in
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/arch/arm/aarch32/irq.h:128:9: note: in expansion of macro '_CHECK_PRIO'
      128 |         _CHECK_PRIO(priority_p, flags_p) \
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT'
       49 |         ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
          |         ^~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:9: note: in expansion of macro 'IRQ_CONNECT'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:2383:9: note: in expansion of macro 'DT_CAT5'
     2383 |         DT_CAT5(node_id, _IRQ_IDX_, idx, _VAL_, cell)
          |         ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:2410:31: note: in expansion of macro 'DT_IRQ_BY_IDX'
     2410 | #define DT_IRQ(node_id, cell) DT_IRQ_BY_IDX(node_id, 0, cell)
          |                               ^~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:41: note: in expansion of macro 'DT_IRQ'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |                                         ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3190:25: note: in expansion of macro 'DT_CAT'
     3190 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS)
          |                         ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:27: note: in expansion of macro 'DT_BUS'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                           ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:34: note: in expansion of macro 'DT_DRV_INST'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                                  ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:140:19: note: in expansion of macro 'DT_INST_BUS'
      140 | #define QSPI_NODE DT_INST_BUS(0)
          |                   ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:48: note: in expansion of macro 'QSPI_NODE'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |                                                ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/arch/arm/aarch32/irq.h:105:22: error: expression in static assertion is not an integer
      105 |         BUILD_ASSERT(((flags_p & IRQ_ZERO_LATENCY) && \
          |                      ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/arch/arm/aarch32/irq.h:128:9: note: in expansion of macro '_CHECK_PRIO'
      128 |         _CHECK_PRIO(priority_p, flags_p) \
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT'
       49 |         ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
          |         ^~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:9: note: in expansion of macro 'IRQ_CONNECT'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |         ^~~~~~~~~~~
    In file included from C:/ncs/v2.5.2/zephyr/include/zephyr/arch/arm/aarch32/irq.h:19,
                     from C:/ncs/v2.5.2/zephyr/include/zephyr/arch/arm/aarch32/arch.h:27,
                     from C:/ncs/v2.5.2/zephyr/include/zephyr/arch/cpu.h:19,
                     from C:/ncs/v2.5.2/zephyr/include/zephyr/kernel_includes.h:33,
                     from C:/ncs/v2.5.2/zephyr/include/zephyr/kernel.h:17,
                     from C:/ncs/v2.5.2/zephyr/include/zephyr/pm/device.h:11,
                     from C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:12:
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_BUS_IRQ_IDX_0_VAL_irq' undeclared (first use in this function)
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sw_isr_table.h:77:26: note: in definition of macro 'Z_ISR_DECLARE'
       77 |                         {irq, flags, (void *)&func, (const void *)param}
          |                          ^~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT'
       49 |         ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
          |         ^~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:9: note: in expansion of macro 'IRQ_CONNECT'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:2383:9: note: in expansion of macro 'DT_CAT5'
     2383 |         DT_CAT5(node_id, _IRQ_IDX_, idx, _VAL_, cell)
          |         ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:2410:31: note: in expansion of macro 'DT_IRQ_BY_IDX'
     2410 | #define DT_IRQ(node_id, cell) DT_IRQ_BY_IDX(node_id, 0, cell)
          |                               ^~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:2422:26: note: in expansion of macro 'DT_IRQ'
     2422 | #define DT_IRQN(node_id) DT_IRQ(node_id, irq)
          |                          ^~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:21: note: in expansion of macro 'DT_IRQN'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |                     ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3190:25: note: in expansion of macro 'DT_CAT'
     3190 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS)
          |                         ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:27: note: in expansion of macro 'DT_BUS'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                           ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:34: note: in expansion of macro 'DT_DRV_INST'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                                  ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:140:19: note: in expansion of macro 'DT_INST_BUS'
      140 | #define QSPI_NODE DT_INST_BUS(0)
          |                   ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1242:29: note: in expansion of macro 'QSPI_NODE'
     1242 |         IRQ_CONNECT(DT_IRQN(QSPI_NODE), DT_IRQ(QSPI_NODE, priority),
          |                             ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c: At top level:
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1262:29: error: 'INST_0_BYTES' undeclared here (not in a function); did you mean 'INST_0_QER'?
     1262 | #define LAYOUT_PAGES_COUNT (INST_0_BYTES / \
          |                             ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1266:15: note: in expansion of macro 'LAYOUT_PAGES_COUNT'
     1266 |               LAYOUT_PAGES_COUNT)
          |               ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1265:14: error: expression in static assertion is not an integer
     1265 | BUILD_ASSERT((CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE *
          |              ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: expected ')' before 'DT_N_INST_0_nordic_qspi_nor_BUS_PATH'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:60: note: in definition of macro 'BUILD_ASSERT'
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                            ^~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:495:31: note: in expansion of macro 'DT_CAT'
      495 | #define DT_NODE_PATH(node_id) DT_CAT(node_id, _PATH)
          |                               ^~~~~~
    c:\ncs\v2.5.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:191:22: note: in expansion of macro 'DT_NODE_PATH'
      191 |                      DT_NODE_PATH(node_id) " defined without sleep state")
          |                      ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1492:1: note: in expansion of macro 'NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP'
     1492 | NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3190:25: note: in expansion of macro 'DT_CAT'
     3190 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS)
          |                         ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:27: note: in expansion of macro 'DT_BUS'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                           ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:34: note: in expansion of macro 'DT_DRV_INST'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                                  ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:140:19: note: in expansion of macro 'DT_INST_BUS'
      140 | #define QSPI_NODE DT_INST_BUS(0)
          |                   ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1492:37: note: in expansion of macro 'QSPI_NODE'
     1492 | NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP(QSPI_NODE);
          |                                     ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:81:50: note: to match this '('
       81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                  ^
    c:\ncs\v2.5.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:189:9: note: in expansion of macro 'BUILD_ASSERT'
      189 |         BUILD_ASSERT(!IS_ENABLED(CONFIG_PM_DEVICE) ||                          \
          |         ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1492:1: note: in expansion of macro 'NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP'
     1492 | NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util.h:17:
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:241:51: error: expected ')' before '(' token
      241 |                      Z_PINCTRL_STATE_PINS_DEFINE, (;), node_id);               \
          |                                                   ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:418:69: note: in definition of macro 'LISTIFY'
      418 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
          |                                                                     ^~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:1: note: in expansion of macro 'PINCTRL_DT_DEFINE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~
    In file included from C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:34:
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:418:44: warning: implicit declaration of function 'Z_UTIL_LISTIFY_DT_N_INST_0_nordic_qspi_nor_BUS_PINCTRL_NUM' [-Wimplicit-function-declaration]
      418 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
          |                                            ^~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:418:35: note: in expansion of macro 'UTIL_CAT'
      418 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
          |                                   ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:172:17: note: in expansion of macro 'LISTIFY'
      172 |                 LISTIFY(DT_NUM_PINCTRL_STATES(node_id),                        \
          |                 ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:242:9: note: in expansion of macro 'Z_PINCTRL_STATES_DEFINE'
      242 |         Z_PINCTRL_STATES_DEFINE(node_id)                                       \
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:1: note: in expansion of macro 'PINCTRL_DT_DEFINE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:173:30: error: 'Z_PINCTRL_STATE_INIT' undeclared here (not in a function)
      173 |                              Z_PINCTRL_STATE_INIT, (,), node_id)               \
          |                              ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:418:66: note: in definition of macro 'LISTIFY'
      418 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
          |                                                                  ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:242:9: note: in expansion of macro 'Z_PINCTRL_STATES_DEFINE'
      242 |         Z_PINCTRL_STATES_DEFINE(node_id)                                       \
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:1: note: in expansion of macro 'PINCTRL_DT_DEFINE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:173:53: error: expected expression before ',' token
      173 |                              Z_PINCTRL_STATE_INIT, (,), node_id)               \
          |                                                     ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:418:69: note: in definition of macro 'LISTIFY'
      418 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
          |                                                                     ^~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:242:9: note: in expansion of macro 'Z_PINCTRL_STATES_DEFINE'
      242 |         Z_PINCTRL_STATES_DEFINE(node_id)                                       \
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:1: note: in expansion of macro 'PINCTRL_DT_DEFINE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:173:53: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      173 |                              Z_PINCTRL_STATE_INIT, (,), node_id)               \
          |                                                     ^
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:418:69: note: in definition of macro 'LISTIFY'
      418 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
          |                                                                     ^~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:242:9: note: in expansion of macro 'Z_PINCTRL_STATES_DEFINE'
      242 |         Z_PINCTRL_STATES_DEFINE(node_id)                                       \
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:1: note: in expansion of macro 'PINCTRL_DT_DEFINE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_BUS' undeclared here (not in a function); did you mean 'DT_N_INST_0_nordic_mbox_nrf_ipc'?
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:418:74: note: in definition of macro 'LISTIFY'
      418 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
          |                                                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:242:9: note: in expansion of macro 'Z_PINCTRL_STATES_DEFINE'
      242 |         Z_PINCTRL_STATES_DEFINE(node_id)                                       \
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:1: note: in expansion of macro 'PINCTRL_DT_DEFINE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3190:25: note: in expansion of macro 'DT_CAT'
     3190 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS)
          |                         ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:27: note: in expansion of macro 'DT_BUS'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                           ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3836:34: note: in expansion of macro 'DT_DRV_INST'
     3836 | #define DT_INST_BUS(inst) DT_BUS(DT_DRV_INST(inst))
          |                                  ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:140:19: note: in expansion of macro 'DT_INST_BUS'
      140 | #define QSPI_NODE DT_INST_BUS(0)
          |                   ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:19: note: in expansion of macro 'QSPI_NODE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          |                   ^~~~~~~~~
    In file included from C:/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:92:
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:101:17: error: '__pinctrl_dev_config__device_dts_ord_DT_N_INST_0_nordic_qspi_nor_BUS_ORD' undeclared here (not in a function); did you mean '__pinctrl_states__device_dts_ord_DT_N_INST_0_nordic_qspi_nor_BUS_ORD'?
      101 |         _CONCAT(__pinctrl_dev_config, DEVICE_DT_NAME_GET(node_id))
          |                 ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/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.5.2/zephyr/include/zephyr/drivers/pinctrl.h:101:9: note: in expansion of macro '_CONCAT'
      101 |         _CONCAT(__pinctrl_dev_config, DEVICE_DT_NAME_GET(node_id))
          |         ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:262:45: note: in expansion of macro 'Z_PINCTRL_DEV_CONFIG_NAME'
      262 | #define PINCTRL_DT_DEV_CONFIG_GET(node_id) &Z_PINCTRL_DEV_CONFIG_NAME(node_id)
          |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1499:17: note: in expansion of macro 'PINCTRL_DT_DEV_CONFIG_GET'
     1499 |         .pcfg = PINCTRL_DT_DEV_CONFIG_GET(QSPI_NODE),
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_P_address_size_32' undeclared here (not in a function)
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:4231:29: note: in definition of macro 'DT_CAT3'
     4231 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
          |                             ^~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:34: note: in expansion of macro 'DT_PROP'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1511:29: note: in expansion of macro 'DT_INST_PROP'
     1511 |                 .addrmode = DT_INST_PROP(0, address_size_32)
          |                             ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_P_sck_delay' undeclared here (not in a function)
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:4231:29: note: in definition of macro 'DT_CAT3'
     4231 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
          |                             ^~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:34: note: in expansion of macro 'DT_PROP'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1517:30: note: in expansion of macro 'DT_INST_PROP'
     1517 |                 .sck_delay = DT_INST_PROP(0, sck_delay),
          |                              ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_P_jedec_id' undeclared here (not in a function); did you mean 'DT_N_INST_0_nordic_nrf_qdec'?
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:4231:29: note: in definition of macro 'DT_CAT3'
     4231 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
          |                             ^~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:34: note: in expansion of macro 'DT_PROP'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3450:42: note: in expansion of macro 'DT_DRV_INST'
     3450 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1522:15: note: in expansion of macro 'DT_INST_PROP'
     1522 |         .id = DT_INST_PROP(0, jedec_id),
          |               ^~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:40: error: 'DT_N_INST_0_nordic_qspi_nor_FULL_NAME' undeclared here (not in a function)
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                                        ^~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:892:25: note: in definition of macro 'Z_DEVICE_INIT'
      892 |                 .name = name_,                                                 \
          |                         ^~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:981:9: note: in expansion of macro 'Z_DEVICE_BASE_DEFINE'
      981 |         Z_DEVICE_BASE_DEFINE(node_id, dev_id, name, pm, data, config, level,   \
          |         ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:180:9: note: in expansion of macro 'Z_DEVICE_DEFINE'
      180 |         Z_DEVICE_DEFINE(node_id, Z_DEVICE_DT_DEV_ID(node_id),                  \
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:69:53: note: in expansion of macro '__DEBRACKET'
       69 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
          |                                                     ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
       64 |         __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
          |         ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
       59 |         __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
      180 |         Z_COND_CODE_1(_flag, _if_1_code, _else_code)
          |         ^~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:777:9: note: in expansion of macro 'COND_CODE_1'
      777 |         COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
          |         ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:146:9: note: in expansion of macro 'DT_PROP_OR'
      146 |         DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
          |         ^~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:521:36: note: in expansion of macro 'DT_CAT'
      521 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME)
          |                                    ^~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:146:36: note: in expansion of macro 'DT_NODE_FULL_NAME'
      146 |         DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
          |                                    ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:181:25: note: in expansion of macro 'DEVICE_DT_NAME'
      181 |                         DEVICE_DT_NAME(node_id), init_fn, pm, data, config,    \
          |                         ^~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:195:9: note: in expansion of macro 'DEVICE_DT_DEFINE'
      195 |         DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
          |         ^~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:333:31: note: in expansion of macro 'UTIL_CAT'
      333 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/devicetree.h:3248:27: note: in expansion of macro 'DT_INST'
     3248 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/device.h:195:26: note: in expansion of macro 'DT_DRV_INST'
      195 |         DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
          |                          ^~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1527:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE'
     1527 | DEVICE_DT_INST_DEFINE(0, qspi_nor_init, PM_DEVICE_DT_INST_GET(0),
          | ^~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:110:17: warning: '__pinctrl_states__device_dts_ord_DT_N_INST_0_nordic_qspi_nor_BUS_ORD' defined but not used [-Wunused-const-variable=]
      110 |         _CONCAT(__pinctrl_states, DEVICE_DT_NAME_GET(node_id))
          |                 ^~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/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.5.2/zephyr/include/zephyr/drivers/pinctrl.h:110:9: note: in expansion of macro '_CONCAT'
      110 |         _CONCAT(__pinctrl_states, DEVICE_DT_NAME_GET(node_id))
          |         ^~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:171:9: note: in expansion of macro 'Z_PINCTRL_STATES_NAME'
      171 |         Z_PINCTRL_STATES_NAME(node_id)[] = {                                   \
          |         ^~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/include/zephyr/drivers/pinctrl.h:242:9: note: in expansion of macro 'Z_PINCTRL_STATES_DEFINE'
      242 |         Z_PINCTRL_STATES_DEFINE(node_id)                                       \
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.2/zephyr/drivers/flash/nrf_qspi_nor.c:1494:1: note: in expansion of macro 'PINCTRL_DT_DEFINE'
     1494 | PINCTRL_DT_DEFINE(QSPI_NODE);
          | ^~~~~~~~~~~~~~~~~
    [179/281] Linking C static library zephyr\libzephyr.a
    FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf 

  • No, the state always stuck in  “sending the request failed.” after “uploading” state.

           And after this, I,ve rebooted the board, and checked the log,

           but it’s still the old application, it didn’t Ota successfully.

  • What were the differences in your app between the old and new firmware?

  •        I've added this line in the code,
    "printk("build time: " __DATE__ " " __TIME__ "\n")" to check the build time.
          and add  "printk("test\n")" to make the differences easy to see.
  • Hmm,

    Let us take a step back then:
    Can you test this sample for the nRF5340DK and see if that works?

  • "Can you test this sample for the nRF5340DK and see if that works?"

    Yes, it works and can see the change after ota.

    I think I know what's the problem, last time I said it is failed and stuck in  "sending the request failed", the reason is I'm doing spi transmit simultaneously in my application , so I commented out the line,

    but after this, it has other problems,

    it sometimes uploaded completely but when I checked the log it's still old application.

    and sometimes the state said "There is no free slot to place the image." "  

Reply
  • "Can you test this sample for the nRF5340DK and see if that works?"

    Yes, it works and can see the change after ota.

    I think I know what's the problem, last time I said it is failed and stuck in  "sending the request failed", the reason is I'm doing spi transmit simultaneously in my application , so I commented out the line,

    but after this, it has other problems,

    it sometimes uploaded completely but when I checked the log it's still old application.

    and sometimes the state said "There is no free slot to place the image." "  

Children
  • allenyang said:
    and sometimes the state said "There is no free slot to place the image."

    Could you use the nRF Logger app to see what more logs come before this error?

    allenyang said:
    it sometimes uploaded completely but when I checked the log it's still old application.

    If you enable advanced settings in the Device Manager App, you can use an "image list" command. What does that show when you still load the old app?

  • I have new observations.

    After the application flash to the board, do the first build of the image and do ota to the board, it always run normally on Device Manager App and it states Upload Complete but it's still a old app. And use the same file to OTA again, it still states Upload Complete but it still get nothing change. 

    After that, when do the second or third ...build of the image, and do ota, it  will state "There is no free slot to place the image."

    It seems it has something wrong when doing first OTA.

    "If you enable advanced settings in the Device Manager App, you can use an "image list" command. What does that show when you still load the old app?"

    "Could you use the nRF Logger app to see what more logs come before this error?"

    Does it have an IOS version?

  • Hi, the problem above is resolved when I commented out this line  

    "k_sem_take(&ble_init_ok, K_FOREVER);" in my application.
    I think the ota program is locked by semaphore.
    so it is be sure to ota successfully(it is dynamic partition, without pm_static.yml),
    but when I add the pm_static.yml, the OTA  App always states "There is no free slot to place the image."  
    and I've checked the partition.yml, it's changed correctly what I added the pm_static. 
    I'm not sure whether the use of partition is correct.
    (external flash total size is 0x400000) 
    partition.yml 
    EMPTY_0:
      address: 0xfe000
      end_address: 0x100000
      placement:
        after:
        - settings_storage
      region: flash_primary
      size: 0x2000
    app:
      address: 0x10200
      end_address: 0xfc000
      region: flash_primary
      size: 0xebe00
    external_flash:
      address: 0x400000
      end_address: 0x400000
      region: external_flash
      size: 0x0
    mcuboot:
      address: 0x0
      end_address: 0x10000
      placement:
        before:
        - mcuboot_primary
      region: flash_primary
      size: 0x10000
    mcuboot_pad:
      address: 0x10000
      end_address: 0x10200
      placement:
        align:
          start: 0x4000
        before:
        - mcuboot_primary_app
      region: flash_primary
      size: 0x200
    mcuboot_primary:
      address: 0x10000
      end_address: 0xfc000
      orig_span: &id001
      - mcuboot_pad
      - app
      region: flash_primary
      size: 0xec000
      span: *id001
    mcuboot_primary_1:
      address: 0x0
      device: nordic_ram_flash_controller
      end_address: 0x40000
      region: ram_flash
      size: 0x40000
    mcuboot_primary_app:
      address: 0x10200
      end_address: 0xfc000
      orig_span: &id002
      - app
      region: flash_primary
      size: 0xebe00
      span: *id002
    mcuboot_secondary:
      address: 0x310000
      device: DT_CHOSEN(nordic_pm_ext_flash)
      end_address: 0x3c0000
      placement:
        align:
          start: 0x4
      region: external_flash
      share_size:
      - mcuboot_primary
      size: 0xb0000
    mcuboot_secondary_1:
      address: 0x3c0000
      device: DT_CHOSEN(nordic_pm_ext_flash)
      end_address: 0x400000
      region: external_flash
      size: 0x40000
    otp:
      address: 0xff8100
      end_address: 0xff83fc
      region: otp
      size: 0x2fc
    pcd_sram:
      address: 0x20000000
      end_address: 0x20002000
      placement:
        after:
        - start
      region: sram_primary
      size: 0x2000
    ram_flash:
      address: 0x40000
      end_address: 0x40000
      region: ram_flash
      size: 0x0
    reserved_custom_partition:
      address: 0x0
      end_address: 0x310000
      region: external_flash
      size: 0x310000
    rpmsg_nrf53_sram:
      address: 0x20070000
      end_address: 0x20080000
      placement:
        before:
        - end
      region: sram_primary
      size: 0x10000
    settings_storage:
      address: 0xfc000
      end_address: 0xfe000
      placement:
        align:
          start: 0x4000
        before:
        - end
      region: flash_primary
      size: 0x2000
    sram_primary:
      address: 0x20002000
      end_address: 0x20070000
      region: sram_primary
      size: 0x6e000
    
    and I've checked the Nrf Logger App when it states "There is no free slot to place the image" came out
  • allenyang said:

    the problem above is resolved when I commented out this line  

    "k_sem_take(&ble_init_ok, K_FOREVER);" in my application.

    Do you ever give back that semaphore?

  • "Do you ever give back that semaphore?" 

    Maybe not. 

    However, I've resolved the partition problem, so now everything works fine. 

    Last time I only set the mcuboot secondary partition,

    but the mcuboot primary also must be set to the pm_static.yml,  

    because mcuboot primary and mcuboot secondary must be partition to the same size.

    Thanks for the help for a long time.

    Regards,

    Allen

     

Related