<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>migrating app using mcuboot to NCS 3.2.3 - issue with MCUboot image IDs automatically assigned?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127216/migrating-app-using-mcuboot-to-ncs-3-2-3---issue-with-mcuboot-image-ids-automatically-assigned</link><description>I migrate an app from NCS 3.1.0 to NCS 3.2.3. 
 Using mcuboot with a Thingy:91 or Thingy:91X fails. 
 flash_img_init results in a flash_img_context, which uses ID 2, the application_slot0, where the app runs from. That obviously crashes on executing an</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Mar 2026 13:04:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127216/migrating-app-using-mcuboot-to-ncs-3-2-3---issue-with-mcuboot-image-ids-automatically-assigned" /><item><title>RE: migrating app using mcuboot to NCS 3.2.3 - issue with MCUboot image IDs automatically assigned?</title><link>https://devzone.nordicsemi.com/thread/562545?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2026 13:04:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4586d32-584a-4a2c-9a92-6c3dd55f535b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The board files should be updated before the next SDK release.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: migrating app using mcuboot to NCS 3.2.3 - issue with MCUboot image IDs automatically assigned?</title><link>https://devzone.nordicsemi.com/thread/562480?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2026 19:37:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82cc985f-47a3-4e30-b5cd-78e5cae6a33d</guid><dc:creator>Achim Kraus</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/127216/migrating-app-using-mcuboot-to-ncs-3-2-3---issue-with-mcuboot-image-ids-automatically-assigned/562417"]Setting&amp;nbsp;zephyr,code-partition seems like the best workaround for now. I will report this internally.[/quote]
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;(-: EDIT: :-) anyway, I&amp;#39;m looking forward to see the official Nordic support files for both devices being fixed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: migrating app using mcuboot to NCS 3.2.3 - issue with MCUboot image IDs automatically assigned?</title><link>https://devzone.nordicsemi.com/thread/562417?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2026 11:41:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61d322b0-bbd3-4c6b-8e32-d18f78688b4e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. This looks to be an unintended side effect of the commit I found here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/commit/87b1bb8916c913e492e1d37156cb8b846481bb1f"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/87b1bb8916c913e492e1d37156cb8b846481bb1f&lt;/a&gt;. You can see the&amp;nbsp;FIXED_PARTITION_IS_RUNNING_APP_PARTITION() macro depends on the&amp;nbsp;&lt;span&gt;&lt;span style="text-decoration:line-through;"&gt;zephyr,code-partition&lt;/span&gt; FLASH_LOAD_OFFSET property to determine if the app is running from slot0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Setting&amp;nbsp;zephyr,code-partition seems like the best workaround for now. I will report this internally.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EDIT: I was a bit too quick when reviewing the code and what you said. I assumed the issue was that zephyr,code-partition was not defined in the devicetree for these boards. But see now that the issue is really that the&amp;nbsp;&lt;/span&gt;FLASH_LOAD_OFFSET symbol is being set to&amp;nbsp;&amp;quot;0&amp;quot; because these boards are missing the &amp;quot;&lt;span&gt;DT_CHOSEN_Z_CODE_PARTITION&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; zephyr,code-partition&amp;quot; line as you already pointed out. Without this line,&amp;nbsp;Kconfig can&amp;#39;t &amp;quot;see&amp;quot; the code partition&amp;nbsp;defined in the devicetree.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: migrating app using mcuboot to NCS 3.2.3 - issue with MCUboot image IDs automatically assigned?</title><link>https://devzone.nordicsemi.com/thread/562347?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2026 16:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dba223b-7539-427f-8db9-d674bd64a43b</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Thanks for you answer.&lt;/p&gt;
&lt;p&gt;In the end it&amp;#39;s not easy to understand and analyze what happens, especially, if it breaks on an update.&lt;/p&gt;
&lt;p&gt;Sometimes even with the migration guide it&amp;#39;s not obvious, what needs to be changed to get it working again.&lt;/p&gt;
&lt;p&gt;I mainly wrote about that &amp;quot;image IDs&amp;quot;, because this was the only change mention in&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v3.2.3/doc/nrf/releases_and_maturity/migration/migration_guide_3.2.rst#mcuboot"&gt;migration guide 3.2&lt;/a&gt;&amp;nbsp;, where I see a relation to the partitions.&lt;/p&gt;
&lt;p&gt;Building my app for a Thingy:91, using the pm_static.yml of that, results in:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6378_2E00_pm_2E00_config"&gt;devzone.nordicsemi.com/.../6378_2E00_pm_2E00_config&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/thingy_2D00_3_2E00_2_2E00_3_2E00_config"&gt;devzone.nordicsemi.com/.../thingy_2D00_3_2E00_2_2E00_3_2E00_config&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Calling &amp;quot;flash_img_init&amp;quot; results then in a context with:&lt;/p&gt;
&lt;p&gt;Update area 2 0xc000 size 0x69000 on flash-controller@39000.&lt;/p&gt;
&lt;p&gt;LOG_INF(&amp;quot;Update area %d 0x%lx size 0x%x on %s.&amp;quot;, dfu_context.flash_area-&amp;gt;fa_id,&lt;br /&gt;&amp;nbsp; &amp;nbsp;dfu_context.flash_area-&amp;gt;fa_off, dfu_context.flash_area-&amp;gt;fa_size,&lt;br /&gt;&amp;nbsp; &amp;nbsp;dfu_context.flash_area-&amp;gt;fa_dev-&amp;gt;name);&lt;/p&gt;
&lt;p&gt;And calling &amp;quot;boot_erase_img_bank&amp;quot;&amp;nbsp;then crashes (because that&amp;#39;s the part of the active application and not the secondary slot).&lt;/p&gt;
&lt;p&gt;Is there a sample for the nRF9160/51, which doesn&amp;#39;t use an additional external flash and uses mcuboot? Perfect would be one, which has been retested with NCS 3.2.3.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And did you check the&amp;nbsp;nrf/boards/nordic/thingy91x/Kconfig.defconfig.nrf9151 and the&amp;nbsp;nrf/boards/nordic/thingy91/Kconfig.defconfig about the maybe missing definition of&amp;nbsp;DT_CHOSEN_Z_CODE_PARTITION?&lt;/p&gt;
&lt;p&gt;Because, when I add that to those configs, the update works again. So this is either missing in the Nordic files, or there is an alternative way to do so, but then I guess these lines using&amp;nbsp;DT_CHOSEN_Z_CODE_PARTITION are some leftovers and would better be removed not to mix up the users. At least without&amp;nbsp;definition of&amp;nbsp;DT_CHOSEN_Z_CODE_PARTITION I don&amp;#39;t see, how that works.&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: migrating app using mcuboot to NCS 3.2.3 - issue with MCUboot image IDs automatically assigned?</title><link>https://devzone.nordicsemi.com/thread/562345?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2026 15:42:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:325dde18-76ef-4b0b-8507-d5b3e369450e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The assigned image ID number is not the same as the IDs used for the flash partitions. The image ID does not directly control what mcuboot slot to use. Please check the pm_config.h file in your build/&amp;lt;your project name&amp;gt;/zephyr/include/generated/ to see which partition ID 2 maps to.&lt;/p&gt;
&lt;p&gt;Setting flash load offset is not necessary when using the partition manager. You can confirm the start address in flash from the zephyr.map output.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1772465967149v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Note: you can search your&amp;nbsp;build folder for&amp;nbsp;CONFIG_MCUBOOT_APPLICATION_IMAGE_NUMBER to see what the assigned number is.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: migrating app using mcuboot to NCS 3.2.3 - issue with MCUboot image IDs automatically assigned?</title><link>https://devzone.nordicsemi.com/thread/562262?ContentTypeID=1</link><pubDate>Sun, 01 Mar 2026 09:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:875ba4df-4bc0-4183-9a84-02568836a098</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Hmmmm, adding&amp;nbsp;&lt;/p&gt;
&lt;p&gt;DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition&lt;/p&gt;
&lt;p&gt;to&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/boards/nordic/thingy91x/Kconfig.defconfig.nrf9151"&gt;boards/nordic/thingy91x/Kconfig.defconfig.nrf9151&lt;/a&gt;&amp;nbsp;, as in&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/boards/nordic/thingy91x/Kconfig.defconfig.nrf5340#L51-L52"&gt;boards/nordic/thingy91x/Kconfig.defconfig.nrf5340&lt;/a&gt;&amp;nbsp;, seems to be one possibility to fix it ;-(. The zephyr board definition for the nRF9151-DK seems to use an different approach.&lt;/p&gt;
&lt;p&gt;Not sure, which approach would be the preferred by Nordic, but it would help, if the stuff would be more aligned.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>