FOTA update with external flash

I am trying to set up FOTA support with external flash for mcuboot secondary partition. I have gone through several tickets on the subject, but haven't been able to solve the issue. 

The ncs version I am using is 2.9.1.

The problem seems to be (like in many other cases) secondary flash address etc. is not available:

26 | #define S_IMAGE_SECONDARY_PARTITION_OFFSET (PM_MCUBOOT_SECONDARY_ADDRESS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/nordic/ncs/v2.9.1/nrf/modules/trusted-firmware-m/tfm_boards/partition/region_defs.h:102:36: note: in expansion of macro 'S_IMAGE_SECONDARY_PARTITION_OFFSET'
102 | #define SECONDARY_PARTITION_START (S_IMAGE_SECONDARY_PARTITION_OFFSET)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/nordic/ncs/v2.9.1/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/common/core/target_cfg.c:763:33: note: in expansion of macro 'SECONDARY_PARTITION_START'
763 | .secondary_partition_base = SECONDARY_PARTITION_START,
| ^~~~~~~~~~~~~~~~~~~~~~~~~



I think the problem comes down to this:

warning: PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY (defined at
/opt/nordic/ncs/v2.9.1/nrf/subsys/partition_manager/Kconfig:214) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: (PM_EXTERNAL_FLASH_ENABLED || MCUBOOT) (=n).
See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
and/or look up PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY in the menuconfig/guiconfig interface. The
Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices
sections of the manual might be helpful too.

So, I may be missing some configuration parameters. Those two mentioned in the warning are not user settable. How would I be able to enable this?

Parents Reply
  • Great! Thank you for updating me

    veli-pekka said:
    The application updates fine. I'm not sure about the network core, at least it is been uploaded. There is one error in the logs:

    This specific error for the netcore image is nothing to worry about, as long as the image is uploaded and updated. The reason for this error is specific to the netcore of the nRF5340, since what it's doing here is attempting to read RAM-emulated flash, i.e where the temporary storage for netcore firmware, something which mcumgr can't do.

    This is the short explanation, and the longer explanation will require you to spend some time diving into the mcuboot source code specifically for the bootloader used in combination with the nRF5340 in addition to the bootloader documentation https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/index.html 

    Let me know if this makes sense! 

    Kind regards,
    Andreas

Children
Related