DFU on nrf52832

Hi, I am having problem making DFU work on nrf52832 using nrf connect sdk 2.6.0.  Below is my mcuboot.conf under child_image and prj.conf. Please guide me where I am wrong. Also when I set CONFIG_SINGLE_APPLICATION_SLOT, it builds fine but when I disables it, it doesn't build due to size issue.

&flash0 {

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0xC000>;
};
slot0_partition: partition@C000 {
label = "image-0";
reg = <0x0000C000 0x2C000>;
};
slot1_partition: partition@38000 {
label = "image-1";
reg = <0x00038000 0x2C000>;
};
storage_partition: partition@64000 {
label = "storage";
reg = <0x00064000 0x4000>;
};
};

};
# Logging
CONFIG_LOG=y
CONFIG_MCUBOOT_LOG_LEVEL_WRN=y
# CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x15000
CONFIG_SINGLE_APPLICATION_SLOT=y

and prj.conf
#
# Copyright (C) 2024 Walk With Path Corp. All Rights Reserved.
# Project Configuration File
#
# This file contains configuration settings for Bluetooth, logging, peripherals,
# memory optimization, DFU support, and other key features for Zephyr-based applications.
#

# ==============================
# General Debugging and Logging
# ==============================

CONFIG_LOG=y # Enable logging framework
CONFIG_LOG_BACKEND_UART=y # Use UART backend for logs
CONFIG_LOG_PRINTK=y # Allow printk for logs
CONFIG_CBPRINTF_FP_SUPPORT=y # Enable floating-point support in logs

# Enable console for debug purposes
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_DEBUG=y # Enable debugging
CONFIG_PRINTK=y # Enable printk debugging

CONFIG_SHELL=n # Enable Zephyr Shell for debugging
CONFIG_SHELL_LOG_BACKEND=y
CONFIG_SHELL_CMD_BUFF_SIZE=128

# Enable RTT (Real-Time Transfer) for logs (alternative to UART)
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=y # Disable UART console if RTT is enabled
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=512
CONFIG_SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL=y

CONFIG_LOG_BLOCK_IN_THREAD=y
CONFIG_LOG_BUFFER_SIZE=256
CONFIG_DEBUG=y # Enable debugging
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_THREAD_INFO=y

# CONFIG_NCS_BOOT_BANNER=y # Enable NCS boot banner
CONFIG_BOOT_BANNER=y
CONFIG_PRINTK=y

# Enable UART support
CONFIG_SERIAL=y

# ==============================
# Peripheral and Sensor Drivers
# ==============================

CONFIG_I2C=y # Enable I2C interface
CONFIG_SPI=y # Enable SPI interface
CONFIG_ADC=y # Enable ADC driver

CONFIG_SENSOR=y # Enable generic sensor support
CONFIG_TMP116=y # Enable TMP116 temperature sensor
CONFIG_BMI270=y # Enable BMI270 accelerometer
CONFIG_BMI270_TRIGGER_GLOBAL_THREAD=y

CONFIG_WATCHDOG=y # Enable watchdog timer
CONFIG_WDT_LOG_LEVEL_DBG=y
CONFIG_WDT_DISABLE_AT_BOOT=n

# Enable LED and regulator drivers
CONFIG_LED=y
CONFIG_REGULATOR=y

# Enable power management IC (NPMX)
# CONFIG_NPMX=y
# CONFIG_NPMX_DEVICE_NPM1300=y

# Enable Nordic Fuel Gauge and BMI270 (Accelerometer and Gyroscope)
CONFIG_NRF_FUEL_GAUGE=y

# Disable SPI NOR flash driver (if not used)
CONFIG_SPI_NOR=n

# ==============================
# Power and Memory Optimizations
# ==============================

# Power management configuration
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y

# ==============================
# Memory Optimizations
# ==============================

# Configure memory pool and stack sizes
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_HEAP_MEM_POOL_SIZE=1024

# ==============================
# Flash Configuration
# ==============================

CONFIG_FLASH=y # Enable flash memory support
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

CONFIG_BT_SETTINGS=y # Enable Bluetooth settings
CONFIG_SETTINGS=y # Enable settings subsystem
CONFIG_NVS=y # Enable Non-Volatile Storage
CONFIG_NVS_LOG_LEVEL_DBG=y

# ==============================
# Bluetooth Settings
# ==============================

CONFIG_NCS_SAMPLES_DEFAULTS=y

# Enable Bluetooth and controller settings
CONFIG_BT=y
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_BROADCASTER=n
CONFIG_BT_SMP=y
CONFIG_BT_BONDABLE=y
CONFIG_BT_CTLR_ADV_EXT=n
CONFIG_BT_DEVICE_APPEARANCE=1345
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_GATT_CLIENT=y

# Bluetooth security and bonding settings
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y
CONFIG_BT_ID_UNPAIR_MATCHING_BONDS=y
CONFIG_BT_PRIVACY=n
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_USER_PHY_UPDATE=y

# Bluetooth buffer and connection settings
CONFIG_BT_BUF_ACL_RX_SIZE=247
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_BUF_ACL_TX_SIZE=256
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CTLR_DATA_LENGTH_MAX=247
CONFIG_BT_CTLR_RX_BUFFERS=2
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

CONFIG_BT_GATT_DM=y

# Allow only LESC pairing
# CONFIG_BT_SMP_SC_PAIR_ONLY=y

# Configure Bluetooth connection settings
CONFIG_BT_CTLR_TX_PWR_0=y
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1

# Enable PHY updates
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_USER_DATA_LEN_UPDATE=y

# Enable Bluetooth shell for debugging
CONFIG_BT_SHELL=n

# Enable BT NUS (Nordic UART Service) shell for testing
# CONFIG_SHELL_BT_NUS=y

# Enable Battery Service (BAS) for battery level reporting
CONFIG_BT_BAS=y

# ==============================
# Cryptography
# ==============================

CONFIG_TINYCRYPT=y # Enable TinyCrypt for secure operations
CONFIG_BT_TINYCRYPT_ECC=y

# ==============================
# Reboot and Misc Settings
# ==============================

CONFIG_REBOOT=y # Enable reboot functionality

# ==============================
# DFU Support and Bootloader
# ==============================

# Enable mcumgr.
CONFIG_MCUMGR=y

# Enable MCUboot and FOTA
CONFIG_BOOTLOADER_MCUBOOT=y
# CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="bootloader/mcuboot/root-rsa-2048.pem"
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y

# Enable image management
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

CONFIG_IMG_MANAGER=n
CONFIG_MCUBOOT_IMG_MANAGER=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y

# Enable logging for mcumgr (DFU)
CONFIG_MCUMGR_LOG_LEVEL_DBG=y
CONFIG_MCUMGR_LOG_LEVEL_INF=y

# Enable logging for image management subsystem
CONFIG_IMG_MANAGER_LOG_LEVEL_DBG=y
CONFIG_IMG_MANAGER_LOG_LEVEL_INF=y

# # Enable mcumgr DFU in application
# # Enable MCUMGR

# # Enable MCUMGR management for both OS and Images
# CONFIG_MCUMGR_GRP_OS=y
# CONFIG_MCUMGR_GRP_IMG=y

# Support for taskstat command
CONFIG_MCUMGR_GRP_OS_TASKSTAT=y

# Enable statistics and statistic names.
CONFIG_STATS=y
CONFIG_STATS_NAMES=y

# Enable most core commands.
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS=y
CONFIG_MCUMGR_GRP_STAT=y


  • Hi Andreas, can I store the new image on external flash on nrf52832 using SPI since it doesn't have QSPI? If so, can you share some samples and documentation? Thanks Moh

  • Yes, you can do dual bank DFU with SPI communication to the external flash instead of QSPI. This sample (featuring the nRF52840DK) should showcase how to set it up for 2.6.0: https://github.com/aHaugl/samples_for_NCS/tree/main/bootloader/spi/smp_ble_feat_spi 

    Do note that this is a personal sample that I've created previously and it can be used as is. It is not a part of the official SDK.

    The sample illustrates how to disable the QSPI and set up SPI communication to the external flash as well as set up BLE with smp transfer.

    Let me know if this sample is helpful

    Kind regards,
    Andreas

  • Hi Andreas, Thanks for sharing it. I have tried implemented but getting the following errors on my nrf52832 based board. I have attached app.overlay and build configurations files. FYI I have t25xe321d on my board

    (.rodata.spi_nor_config_0+0x0): undefined reference to `__device_dts_ord_105'
    
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:324:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    324 | NRF_STATIC_INLINE void nrf_qspi_event_clear(NRF_QSPI_Type * p_reg, nrf_qspi_event_t event);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:335:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    335 | NRF_STATIC_INLINE bool nrf_qspi_event_check(NRF_QSPI_Type const * p_reg, nrf_qspi_event_t event);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:345:55: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    345 | NRF_STATIC_INLINE uint32_t nrf_qspi_event_address_get(NRF_QSPI_Type const * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:355:44: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    355 | NRF_STATIC_INLINE void nrf_qspi_int_enable(NRF_QSPI_Type * p_reg, uint32_t mask);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:364:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    364 | NRF_STATIC_INLINE void nrf_qspi_int_disable(NRF_QSPI_Type * p_reg, uint32_t mask);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:375:54: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    375 | NRF_STATIC_INLINE uint32_t nrf_qspi_int_enable_check(NRF_QSPI_Type const * p_reg, uint32_t mask);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:382:40: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    382 | NRF_STATIC_INLINE void nrf_qspi_enable(NRF_QSPI_Type * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:389:41: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    389 | NRF_STATIC_INLINE void nrf_qspi_disable(NRF_QSPI_Type * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:400:42: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    400 | NRF_STATIC_INLINE void nrf_qspi_pins_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:409:42: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    409 | NRF_STATIC_INLINE void nrf_qspi_pins_get(NRF_QSPI_Type const * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:418:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    418 | NRF_STATIC_INLINE void nrf_qspi_xip_offset_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:428:47: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    428 | NRF_STATIC_INLINE void nrf_qspi_ifconfig0_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:437:51: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    437 | NRF_STATIC_INLINE void nrf_qspi_ifconfig0_raw_set(NRF_QSPI_Type * p_reg, uint32_t regval);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:446:55: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    446 | NRF_STATIC_INLINE uint32_t nrf_qspi_ifconfig0_raw_get(NRF_QSPI_Type const * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:455:47: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    455 | NRF_STATIC_INLINE void nrf_qspi_ifconfig1_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:473:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    473 | NRF_STATIC_INLINE void nrf_qspi_addrconfig_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:484:50: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    484 | NRF_STATIC_INLINE void nrf_qspi_write_buffer_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:497:49: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    497 | NRF_STATIC_INLINE void nrf_qspi_read_buffer_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:509:47: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    509 | NRF_STATIC_INLINE void nrf_qspi_erase_ptr_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:520:51: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    520 | NRF_STATIC_INLINE uint32_t nrf_qspi_erase_ptr_get(NRF_QSPI_Type const * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:529:63: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    529 | NRF_STATIC_INLINE nrf_qspi_erase_len_t nrf_qspi_erase_len_get(NRF_QSPI_Type const * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:538:52: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    538 | NRF_STATIC_INLINE uint32_t nrf_qspi_status_reg_get(NRF_QSPI_Type const * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:547:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    547 | NRF_STATIC_INLINE uint8_t nrf_qspi_sreg_get(NRF_QSPI_Type const * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:557:44: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    557 | NRF_STATIC_INLINE bool nrf_qspi_busy_check(NRF_QSPI_Type const * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:569:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    569 | NRF_STATIC_INLINE void nrf_qspi_cinstrdata_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:580:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    580 | NRF_STATIC_INLINE void nrf_qspi_cinstrdata_get(NRF_QSPI_Type const * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:591:55: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    591 | NRF_STATIC_INLINE void nrf_qspi_cinstr_transfer_start(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:601:60: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    601 | NRF_STATIC_INLINE void nrf_qspi_cinstr_long_transfer_start(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:612:65: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    612 | NRF_STATIC_INLINE bool nrf_qspi_cinstr_long_transfer_is_ongoing(NRF_QSPI_Type const * p_reg);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:622:63: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    622 | NRF_STATIC_INLINE void nrf_qspi_cinstr_long_transfer_continue(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:683:46: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    683 | NRF_STATIC_INLINE void nrf_qspi_iftiming_set(NRF_QSPI_Type * p_reg, uint8_t rxdelay);
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:687:46: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    687 | NRF_STATIC_INLINE void nrf_qspi_task_trigger(NRF_QSPI_Type * p_reg, nrf_qspi_task_t task)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:692:54: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    692 | NRF_STATIC_INLINE uint32_t nrf_qspi_task_address_get(NRF_QSPI_Type const * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:698:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    698 | NRF_STATIC_INLINE void nrf_qspi_event_clear(NRF_QSPI_Type * p_reg, nrf_qspi_event_t event)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:703:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    703 | NRF_STATIC_INLINE bool nrf_qspi_event_check(NRF_QSPI_Type const * p_reg, nrf_qspi_event_t event)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:708:55: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    708 | NRF_STATIC_INLINE uint32_t nrf_qspi_event_address_get(NRF_QSPI_Type const * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:714:44: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    714 | NRF_STATIC_INLINE void nrf_qspi_int_enable(NRF_QSPI_Type * p_reg, uint32_t mask)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:719:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    719 | NRF_STATIC_INLINE void nrf_qspi_int_disable(NRF_QSPI_Type * p_reg, uint32_t mask)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:724:54: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    724 | NRF_STATIC_INLINE uint32_t nrf_qspi_int_enable_check(NRF_QSPI_Type const * p_reg, uint32_t mask)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:729:40: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    729 | NRF_STATIC_INLINE void nrf_qspi_enable(NRF_QSPI_Type * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:734:41: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    734 | NRF_STATIC_INLINE void nrf_qspi_disable(NRF_QSPI_Type * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:744:42: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    744 | NRF_STATIC_INLINE void nrf_qspi_pins_set(NRF_QSPI_Type * p_reg, nrf_qspi_pins_t const * p_pins)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:754:42: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    754 | NRF_STATIC_INLINE void nrf_qspi_pins_get(NRF_QSPI_Type const * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:765:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    765 | NRF_STATIC_INLINE void nrf_qspi_xip_offset_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:771:47: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    771 | NRF_STATIC_INLINE void nrf_qspi_ifconfig0_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:782:51: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    782 | NRF_STATIC_INLINE void nrf_qspi_ifconfig0_raw_set(NRF_QSPI_Type * p_reg, uint32_t regval)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:787:55: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    787 | NRF_STATIC_INLINE uint32_t nrf_qspi_ifconfig0_raw_get(NRF_QSPI_Type const * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:792:47: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    792 | NRF_STATIC_INLINE void nrf_qspi_ifconfig1_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:805:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    805 | NRF_STATIC_INLINE void nrf_qspi_addrconfig_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:818:50: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    818 | NRF_STATIC_INLINE void nrf_qspi_write_buffer_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:828:49: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    828 | NRF_STATIC_INLINE void nrf_qspi_read_buffer_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:838:47: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    838 | NRF_STATIC_INLINE void nrf_qspi_erase_ptr_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:846:51: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    846 | NRF_STATIC_INLINE uint32_t nrf_qspi_erase_ptr_get(NRF_QSPI_Type const * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:851:63: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    851 | NRF_STATIC_INLINE nrf_qspi_erase_len_t nrf_qspi_erase_len_get(NRF_QSPI_Type const * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:856:52: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    856 | NRF_STATIC_INLINE uint32_t nrf_qspi_status_reg_get(NRF_QSPI_Type const * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:861:45: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    861 | NRF_STATIC_INLINE uint8_t nrf_qspi_sreg_get(NRF_QSPI_Type const * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:866:44: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    866 | NRF_STATIC_INLINE bool nrf_qspi_busy_check(NRF_QSPI_Type const * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:872:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    872 | NRF_STATIC_INLINE void nrf_qspi_cinstrdata_set(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:917:48: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    917 | NRF_STATIC_INLINE void nrf_qspi_cinstrdata_get(NRF_QSPI_Type const * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:959:55: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    959 | NRF_STATIC_INLINE void nrf_qspi_cinstr_transfer_start(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:970:60: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    970 | NRF_STATIC_INLINE void nrf_qspi_cinstr_long_transfer_start(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:982:65: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    982 | NRF_STATIC_INLINE bool nrf_qspi_cinstr_long_transfer_is_ongoing(NRF_QSPI_Type const * p_reg)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:988:63: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    988 | NRF_STATIC_INLINE void nrf_qspi_cinstr_long_transfer_continue(NRF_QSPI_Type * p_reg,
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/modules/hal/nordic/nrfx/hal/nrf_qspi.h:1048:46: error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
    1048 | NRF_STATIC_INLINE void nrf_qspi_iftiming_set(NRF_QSPI_Type * p_reg, uint8_t rxdelay)
    | ^~~~~~~~~~~~~
    | NRF_SPI_Type
    /opt/nordic/ncs/v2.6.0/zephyr/drivers/flash/nrf_qspi_nor.c:69:2: error: #error "No size specified. 'size' or 'size-in-bytes' must be set"
    69 | #error "No size specified. 'size' or 'size-in-bytes' must be set"
    | ^~~~~
    In file included from /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/toolchain.h:50,
    from /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/sys/util.h:18,
    from /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:26,
    from /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/device.h:12,
    from /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/drivers/flash.h:28,
    from /opt/nordic/ncs/v2.6.0/zephyr/drivers/flash/nrf_qspi_nor.c:10:
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:334:40: error: expected ')' before 'DT_N_INST_0_nordic_qspi_nor_PATH'
    334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:87:60: note: in definition of macro 'BUILD_ASSERT'
    87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:496:31: note: in expansion of macro 'DT_CAT'
    496 | #define DT_NODE_PATH(node_id) DT_CAT(node_id, _PATH)
    | ^~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/drivers/flash/nrf_qspi_nor.c:73:22: note: in expansion of macro 'DT_NODE_PATH'
    73 | "Node " DT_NODE_PATH(DT_DRV_INST(0)) " has both size and size-in-bytes "
    | ^~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/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__)
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
    334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
    | ^~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
    3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/drivers/flash/nrf_qspi_nor.c:73:35: note: in expansion of macro 'DT_DRV_INST'
    73 | "Node " DT_NODE_PATH(DT_DRV_INST(0)) " has both size and size-in-bytes "
    | ^~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:87:50: note: to match this '('
    87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^
    /opt/nordic/ncs/v2.6.0/zephyr/drivers/flash/nrf_qspi_nor.c:72:1: note: in expansion of macro 'BUILD_ASSERT'
    72 | BUILD_ASSERT(!(DT_INST_NODE_HAS_PROP(0, size_in_bytes) && DT_INST_NODE_HAS_PROP(0, size)),
    | ^~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:334:40: error: 'DT_N_INST_0_nordic_qspi_nor_P_sck_frequency' undeclared here (not in a function)
    334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:87:51: note: in definition of macro 'BUILD_ASSERT'
    87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:615:32: note: in expansion of macro 'DT_CAT3'
    615 | #define DT_PROP(node_id, prop) DT_CAT3(node_id, _P_, prop)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:3521:34: note: in expansion of macro 'DT_PROP'
    3521 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.0/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__)
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
    334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
    | ^~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
    3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:3521:42: note: in expansion of macro 'DT_DRV_INST'
    3521 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
    | ^~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/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)
    | ^~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/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),
    | ^~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:334:40: error: expression in static assertion is not an integer
    334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:87:51: note: in definition of macro 'BUILD_ASSERT'
    87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:615:32: note: in expansion of macro 'DT_CAT3'
    615 | #define DT_PROP(node_id, prop) DT_CAT3(node_id, _P_, prop)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:3521:34: note: in expansion of macro 'DT_PROP'
    3521 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)


    7701.mcuboot.conf3582.mcuboot.overlay0820.app.overlay

    2086.board_dev.dts

  • Hi, 

    I will look closer at the logs and files and get back to you. (PS I edited the reply to use a code block instead for readability. You can do the same by using insert -> code when adding logs)

    Kind regards,
    Andreas

  • Hi Andreas, sure . Just checking if you have any updates as I have been struggling to build it. 
    let me know if it is possible to have live chat to walkthrough my project as unfortunately I can’t share it here. Thanks Moh

Related