Unable to flash new firmware with DFU because of 'invalid address'

Hello, I am reaching out to you because I am trying to implement a DFU OTA in my project in order to be able to update my firmware with Bluetooth. I have been spending some time on it as the implementation is not an easy task. For a long time, I wasn't able to build, then I wasn't able to boot, and it is just recently that I managed to correctly flash and have access to the logs. I was able to connect to my board thanks to the 'Device Manager' app, but when trying to upload a 'dfu_application.zip' file with the firmware update, I had error 10 on the app and had the following logs on my board:


00> [00:01:18.563,446] <err> flash_nrf: invalid address: 0x001bbff0:16
00> [00:01:18.563,446] <inf> mcuboot_util: Secondary image of image pair (0.) is unreachable. Treat it as empty
00> [00:01:18.563,446] <inf> mcuboot_util: Image index: 0, Swap type: none
00> [00:01:18.671,234] <err> flash_nrf: invalid address: 0x001bbff0:16
00> [00:01:18.671,234] <inf> mcuboot_util: Secondary image of image pair (0.) is unreachable. Treat it as empty
00> [00:01:18.671,234] <inf> mcuboot_util: Image index: 0, Swap type: none
00> [00:01:18.671,264] <err> flash_nrf: invalid address: 0x001bbff0:16
00> [00:01:18.671,264] <inf> mcuboot_util: Secondary image of image pair (0.) is unreachable. Treat it as empty
00> [00:01:18.671,264] <inf> mcuboot_util: Image index: 0, Swap type: none
00> [00:01:18.671,417] <err> STREAM_FLASH: Incorrect parameter
00> [00:01:18.671,417] <err> mcumgr_img_grp: Irrecoverable error: flash write failed: 10

As for my configuration it goes as follow:

Here is what our project directory looks like: build/  build-mcuboot/  child_image/  CMakeLists.txt  HC_v4.overlay  Kconfig  prj.conf  README.md  src/  utils/

Here is our child_image/mcuboot.conf:

CONFIG_NORDIC_QSPI_NOR=n
CONFIG_SPI_NOR=n
CONFIG_MULTITHREADING=y
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x32000


CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"

CONFIG_BOOT_MAX_IMG_SECTORS=1024

CONFIG_SERIAL=y
CONFIG_LOG=y
CONFIG_PRINTK=y
CONFIG_USE_SEGGER_RTT=y

Here is what I added to our prj.conf to use the DFU:

CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_NORDIC_QSPI_NOR=n
CONFIG_FLASH_SIZE=1792
CONFIG_FLASH=y
CONFIG_SPI_NOR=n
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_MULTITHREADING=y

Here is the totality of our prj.conf if it is of any help:

7357.prj.conf

What element am I missing ? Please feel free to ask if you need any additional informations. Once again thank you very much for your time and have a great day.

Parents Reply
  • Hello,

    Thank you for your time and the information. After checking the size of our firmware, we realized we were indeed trying to put an application that was too large onto the card. As you recommended, we will try using an external flash for our DFU. Our flash is a NAND Flash (ref: W25N02KVZEIR). Can we use it for the DFU?

    Thank you very much for your time and have a great day.

Children
Related