This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCUBoot "reading sectors failed" problem with nrf-sdk v1.6.0

Hi all

We are switching to nrf-sdk v1.6.0 in our project and encountered a problem with MCUBoot.

The image builds successfully and can be flashed successfully as well. MCUBoot loads but is then unable to find a bootable image. There's a message which says:

W: Failed reading sectors; BOOT_MAX_IMG_SECTORS=128 - too small?

I tried increasing BOOT_MAX_IMG_SECTORS up to 91216. But there's still the same error message. I can't increase it more otherwise it overlaps SRAM region. I think the problem is somewhere else but I don't know where. Can someone give me a hint where to look for the problem?

I read that BOOT_MAX_IMG_SECTORS configuration is important for swapping the image in the secondary slot to the primary slot after an update.
I thought as a workaround I could configure MCUBoot to work in XIP Mode "execute in place", which does not need swapping and thus my initial problems disappears. Does anyone have a recommendation if it is a good idea to use XIP?

best regards

Parents
  • Hi all

    I found a hotfix for the problem which was actually a problem with the build configuration.

    When applying my own mcuboot.conf to the mcuboot project (via cmake) like this
    list(APPEND mcuboot_OVERLAY_CONFIG ${MY_MCUBOOT_CONF_FILE})

    it is dropping the partition manager configuration "partition_manager_enabled.conf" for some reason which in my eyes is a bug.

    My hotfix for the moment is to manually append the partition_manager config in addition to my "usual" mcuboot.conf. I do it now like this:
    list(APPEND mcuboot_OVERLAY_CONFIG ${MY_MCUBOOT_CONF_FILE})
    list(APPEND mcuboot_OVERLAY_CONFIG "/opt/zephyrproject/nrf/subsys/partition_manager/partition_manager_enabled.conf")

    and it builds a working bootloader.

    I would rather not deal with such a static, absolute path in my project because this is gonna break sooner or later again.

    What is the best practice to build MCUBoot with own configuration flags?

    best regards

Reply
  • Hi all

    I found a hotfix for the problem which was actually a problem with the build configuration.

    When applying my own mcuboot.conf to the mcuboot project (via cmake) like this
    list(APPEND mcuboot_OVERLAY_CONFIG ${MY_MCUBOOT_CONF_FILE})

    it is dropping the partition manager configuration "partition_manager_enabled.conf" for some reason which in my eyes is a bug.

    My hotfix for the moment is to manually append the partition_manager config in addition to my "usual" mcuboot.conf. I do it now like this:
    list(APPEND mcuboot_OVERLAY_CONFIG ${MY_MCUBOOT_CONF_FILE})
    list(APPEND mcuboot_OVERLAY_CONFIG "/opt/zephyrproject/nrf/subsys/partition_manager/partition_manager_enabled.conf")

    and it builds a working bootloader.

    I would rather not deal with such a static, absolute path in my project because this is gonna break sooner or later again.

    What is the best practice to build MCUBoot with own configuration flags?

    best regards

Children
No Data
Related