<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: mcuBoot multi-image in MCUXpresso SDK</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2139875#M5243</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your interest in NXP MIMXRT series!&lt;/P&gt;
&lt;P&gt;To test, you need to program the mcuboot_opensource project first, then, write the signed mcuboot_basic project to 0x60040000, and the second image to 0x60240000. Note that when signing, the two images use different version numbers.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gavin_Jia_0-1753337206833.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349260i989F1C1E3A75A417/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gavin_Jia_0-1753337206833.png" alt="Gavin_Jia_0-1753337206833.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Gavin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jul 2025 06:12:26 GMT</pubDate>
    <dc:creator>Gavin_Jia</dc:creator>
    <dc:date>2025-07-24T06:12:26Z</dc:date>
    <item>
      <title>mcuBoot multi-image</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2139617#M5242</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I am trying to modify the mcuboot_opensource example for RT1020 to support two images.&lt;BR /&gt;I ended up with both mcuboot and ota_mcuboot_basic handling 2 images. However despite being able to get an image written to the secondary slots, then mcuboot never makes the copy to the primary slot.&lt;BR /&gt;Could you tell me what steps I should follow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 20:26:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2139617#M5242</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2025-07-23T20:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: mcuBoot multi-image</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2139875#M5243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your interest in NXP MIMXRT series!&lt;/P&gt;
&lt;P&gt;To test, you need to program the mcuboot_opensource project first, then, write the signed mcuboot_basic project to 0x60040000, and the second image to 0x60240000. Note that when signing, the two images use different version numbers.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gavin_Jia_0-1753337206833.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/349260i989F1C1E3A75A417/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gavin_Jia_0-1753337206833.png" alt="Gavin_Jia_0-1753337206833.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Gavin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 06:12:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2139875#M5243</guid>
      <dc:creator>Gavin_Jia</dc:creator>
      <dc:date>2025-07-24T06:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: mcuBoot multi-image</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2139982#M5244</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203261"&gt;@Gavin_Jia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer. I think there may have been a misunderstanding regarding my setup. Let me clarify my current situation and what I’m experiencing with MCUBoot.&lt;BR /&gt;I want to use MCUBoot on RT1020 to manage &lt;EM&gt;two images&lt;/EM&gt;, each with its own pair of slots (primary/secondary):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I have configured MCUBoot for &lt;STRONG&gt;two images&lt;/STRONG&gt; (standard multi-image, e.g. second-stage-bootloader + main-app), each with its own primary and secondary slot.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;I have programmed secondary slot of&amp;nbsp;second-stage-bootloader image with valid, signed firmware images.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;On boot, MCUBoot &lt;STRONG&gt;does not copy&lt;/STRONG&gt; the images from the secondary to the primary slot, and it does &lt;STRONG&gt;not boot any image&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The boot log seems to recognize the images (see below), but it never completes the swap or boot:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;hello sbl.
Bootloader Version 2.1.0
Non-optimal sector distribution, slot0 has 254 usable sectors (256 assigned) but slot1 has 256 assigned
Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
Secondary image: magic=good, swap_type=0x1, copy_done=0x3, image_ok=0x3
Boot source: none
Image index: 0, Swap type: test
Non-optimal sector distribution, slot0 has 254 usable sectors (256 assigned) but slot1 has 256 assigned
Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
Boot source: none
Unable to find bootable image&lt;/LI-CODE&gt;&lt;P&gt;It looks like MCUBoot detects the images, but &lt;STRONG&gt;fails the image dependency check&lt;/STRONG&gt;, and ends up without a bootable image.&lt;BR /&gt;I am not sure if I have misconfigured some option, or if the images (or image trailers) are missing a required field for the dependencies mechanism.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H3&gt;My questions:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;What could cause MCUBoot to skip the swap/copy phase even when a valid image is present in the secondary slot (with good magic, etc.)?&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Is there something I need to explicitly set in the images or in MCUBoot config to satisfy the dependency checks?&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Can I get some hint on how to debug which dependency check is failing?&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I already confirmed both images are signed, with different version numbers.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The flash layout seems correct and matches the MCUBoot config.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any advice or steps to debug this would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here some details:&lt;BR /&gt;&lt;BR /&gt;in mcux_config.h added:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define CONFIG_UPDATEABLE_IMAGE_NUMBER 2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in flash_partition.h modified:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define BOOT_FLASH_ACT_UPD              0x60040000
#define BOOT_FLASH_CAND_UPD             0x60140000

#define BOOT_FLASH_ACT_APP              0x60240000
#define BOOT_FLASH_CAND_APP             0x60340000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in flash_partition.c modified:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const char *boot_image_names[MCUBOOT_IMAGE_NUMBER] = {"UPD", "APP"};

struct flash_area boot_flash_map[MCUBOOT_IMAGE_SLOT_NUMBER] = {
    /* Image 0; slot 0 - Main Application Primary Slot  */
    {.fa_id        = 0,
     .fa_device_id = FLASH_DEVICE_ID,
     .fa_off       = BOOT_FLASH_ACT_UPD - BOOT_FLASH_BASE,
     .fa_size      = BOOT_FLASH_CAND_UPD - BOOT_FLASH_ACT_UPD,
     .fa_name      = "UPD_PRIMARY"},

    /* Image 0; slot 1 - Main Application Secondary Slot  */
    {.fa_id        = 1,
     .fa_device_id = FLASH_DEVICE_ID,
     .fa_off       = BOOT_FLASH_CAND_UPD - BOOT_FLASH_BASE,
     .fa_size      = BOOT_FLASH_CAND_UPD - BOOT_FLASH_ACT_UPD,
     .fa_name      = "UPD_SECONDARY"},
#if 2 == MCUBOOT_IMAGE_NUMBER
	/* Image 1; slot 0 - Main Application Primary Slot  */
	{.fa_id        = 2,
	 .fa_device_id = FLASH_DEVICE_ID,
	 .fa_off       = BOOT_FLASH_ACT_APP - BOOT_FLASH_BASE,
	 .fa_size      = BOOT_FLASH_CAND_APP - BOOT_FLASH_ACT_APP,
	 .fa_name      = "APP_PRIMARY"},

	/* Image 1; slot 1 - Main Application Secondary Slot  */
	{.fa_id        = 3,
	 .fa_device_id = FLASH_DEVICE_ID,
	 .fa_off       = BOOT_FLASH_CAND_APP - BOOT_FLASH_BASE,
	 .fa_size      = BOOT_FLASH_CAND_APP - BOOT_FLASH_ACT_APP,
	 .fa_name      = "APP_SECONDARY"},
#endif
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;modified flash_api.c&lt;/P&gt;&lt;LI-CODE lang="c"&gt;int flash_area_id_from_multi_image_slot(int image_index, int slot)
{
    switch (slot)
    {
		case 0:
		case 2:
            return FLASH_AREA_IMAGE_PRIMARY(image_index);

		case 1:
		case 3:
            return FLASH_AREA_IMAGE_SECONDARY(image_index);

        default:
            return -1; /* flash_area_open will fail on that */
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I couldn't find any tutorials on how to add more images to the flash map, so everything I did I did following what I thought was right.&lt;/P&gt;&lt;P&gt;So what are the steps I should have followed?&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 08:22:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2139982#M5244</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2025-07-24T08:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: mcuBoot multi-image</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2140260#M5245</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203261"&gt;@Gavin_Jia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may have understood the problem.&lt;/P&gt;&lt;P&gt;Version 2.1.0 of mcuboot (bundled in SDK 25.06) has at least one probable bug that plagues my case.&lt;/P&gt;&lt;P&gt;in fact if you see&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/mcu-tools/mcuboot/blob/v2.1.0/boot/bootutil/src/loader.c#L1883C1-L1884C76" target="_blank" rel="noopener"&gt;https://github.com/mcu-tools/mcuboot/blob/v2.1.0/boot/bootutil/src/loader.c#L1883C1-L1884C76&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the image number is checked against the slot number. Very strange.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was corrected in commit &lt;A href="https://github.com/mcu-tools/mcuboot/commit/eb942067989569f9cf319b087d0bb16b16effd86" target="_self"&gt;eb942067989569f9cf319b087d0bb16b16effd86&lt;/A&gt; which is one of 333 commits between version 2.1.0 and 2.2.0 (a lot of fix are included)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to ask you to update mcuboot to the latest version as soon as possible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2025 15:29:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/mcuBoot-multi-image/m-p/2140260#M5245</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2025-07-24T15:29:11Z</dc:date>
    </item>
  </channel>
</rss>

