MCUboot DIRECT_XIP

Hi,

I was able to get the DFU system working by CONFIG_BOOTLOADER_MCUBOOT=y.
I notice that the default mcuboot update methode is using the scratch partition. According to the documentation of MCUboot, an alternative is  direct-xip mode.
The problem of flashing the image into the right (not used) slot is been taken care of.
How do I select the  direct-xip mode? I tried setting 

CONFIG_BOOT_BUILD_DIRECT_XIP_VARIANT in the prj.conf file of my sample application, but with CONFIG_BOOTLOADER_MCUBOOT=y and CONFIG_BOOT_BUILD_DIRECT_XIP_VARIANT=y, the application will not build.
Do I need to re-build the bootloader itself with some setting to use direct-xip mode?

Parents
  • Hi,

    To add configuration overlays to the mcuboot child image, add them to <APP>/child_image/mcuboot.conf.

    See Multi-image builds, specifically this:

    The MCUBoot configurations are not listed in our Kconfig search, but you can find them at ncs/bootloader/mcuboot/zephyr/Kconfig.

    Does this answer your question?

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    I am afraid the answer did not solve my issue yet.

    There is a folder child_image in my blinky_slot1_dfu  project.

    I added mcuboot.conf as you suggested and added CONFIG_BOOT_BUILD_DIRECT_XIP_VARIANT=y in that file.
    This results in errors during the build process.
    warning: BOOT_BUILD_DIRECT_XIP_VARIANT (defined at
    ...\v2.0.0\nrf\modules\mcuboot\Kconfig:26) was assigned the value 'y' but got the
    value 'n'. Check these unsatisfied dependencies: BOOTLOADER_MCUBOOT (=n). See..(dead link..)
    (The same warning is shown when setting this in the ./blinky_slot1_dfu /mcuboot/prj.conf file)

    Then replaced the CONFIG_BOOT_BUILD_DIRECT_XIP_VARIANT=y with the BOOT_DIRECT_XIP=y defined in the link you provided. But that was not recognized (warning: ignoring malformed line 'BOOT_DIRECT_XIP=y').

    Any tips how to build the application for use with dirext_xip mode?

Reply
  • Hi Sigurd,

    I am afraid the answer did not solve my issue yet.

    There is a folder child_image in my blinky_slot1_dfu  project.

    I added mcuboot.conf as you suggested and added CONFIG_BOOT_BUILD_DIRECT_XIP_VARIANT=y in that file.
    This results in errors during the build process.
    warning: BOOT_BUILD_DIRECT_XIP_VARIANT (defined at
    ...\v2.0.0\nrf\modules\mcuboot\Kconfig:26) was assigned the value 'y' but got the
    value 'n'. Check these unsatisfied dependencies: BOOTLOADER_MCUBOOT (=n). See..(dead link..)
    (The same warning is shown when setting this in the ./blinky_slot1_dfu /mcuboot/prj.conf file)

    Then replaced the CONFIG_BOOT_BUILD_DIRECT_XIP_VARIANT=y with the BOOT_DIRECT_XIP=y defined in the link you provided. But that was not recognized (warning: ignoring malformed line 'BOOT_DIRECT_XIP=y').

    Any tips how to build the application for use with dirext_xip mode?

Children
Related