Add DFU support to custom HCI_RPMSG netcore image

I have separate app core enabled with DFU and secure boot. I added all that support with help from this ticket  nRF5340 Firmware Update from external NOR QSPI flash 

DFU for net core works fine.But it only works with an hci_rpmsg included automatically. How can I include the netcore DFU support in modified hci_rpmsg project. We compile this project but no "net_core_app_update.bin" is generated. How can I generate this DFU binary?

On app core image I have following configs enabled?

prj.conf

CONFIG_NRF53_UPGRADE_NETWORK_CORE=y
CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y
CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
CONFIG_ADD_MCUBOOT_MEDIATE_SIM_FLASH_DTS=y

/child_image/mcuboot/prj.conf

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16

CONFIG_PCD_APP=y
CONFIG_UPDATEABLE_IMAGE_NUMBER=2
CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n
CONFIG_BOOT_UPGRADE_ONLY=y


# Enable flash operations.
# CONFIG_SPI=y
CONFIG_FLASH=y
# This must be increased to accommodate the bigger images.
CONFIG_BOOT_MAX_IMG_SECTORS=256

# Disable netcore image OTA udpate
CONFIG_BOOT_IMAGE_ACCESS_HOOKS=n

Parents Reply Children
  • Apologies for late reply. Got busy with other urgent tasks.

    I created a sample project added the multicore compilation part as per defined in sample hellow world. Used the dynamic partition management.

    I see there is a line in sysbuild.cmake "set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION hci_rpmsg CACHE INTERNAL "")"
    So using this line we should use dynamic partition management.

    Afterall the project compiles with no error but only netcore image is generated. No app core image is found.

    Here is the partitions.yml content generated after build. I do not see any mcuboot_primary, mcuboot_primary_1, mcuboot_secondary, or mcuboot_primary_1.

    app:
      address: 0x0
      end_address: 0x100000
      region: flash_primary
      size: 0x100000
    external_flash:
      address: 0x0
      end_address: 0x800000
      region: external_flash
      size: 0x800000
    otp:
      address: 0xff8100
      end_address: 0xff83fc
      region: otp
      size: 0x2fc
    rpmsg_nrf53_sram:
      address: 0x20070100
      end_address: 0x20080000
      placement:
        before:
        - end
      region: sram_primary
      size: 0xff00
    sram_primary:
      address: 0x20000000
      end_address: 0x20070100
      region: sram_primary
      size: 0x70100
    

    Why the main appcore project fails to compile? I have attached the project files for details as well. Using hci_rpmsg sample this project works fine for app core and net core DFU.

    hrdfu.zip

  • Dilawar Ali said:
    hrdfu.zip

    I will test to build the sample and see if I can see what goes wrong.
    Which version of the SDK should I build for?
    Which board should I build for?
    Should I include any other build options?

  • Please use the sdk version 2.5.1
    I have attached the boards files. I am using ublox evk nora-B10. No other build flags are required.
    ubx_evknorab10_nrf5340.zip

  • sorry, the content in hrdfu.zip should be extracted in a folder "hrdfu". The app core project name is "hrdfu"

  • Dilawar Ali said:
    sorry, the content in hrdfu.zip should be extracted in a folder "hrdfu". The app core project name is "hrdfu"

    Yes, I was able to figure that out yesterday, after adding a comment asking about it. That is why I deleted the comment. Sorry if that was confusing.

    Anyhow. We are moving from Multi-image builds to sysbuild.
    The prior is part of the nRF repos, and automatically generates DFU files for you.

    The latte is part of the Zephyr repos, which has no such functionality. So you will have to generate your own DFU files with "imagetool sign".

    To get an idea on how to use this command, you can build an non-sysbuild project with DFU files with "west -vvv build ..." to see the commands our build system uses to generate the update files.

Related