<?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>Sysbuild doesn&amp;#39;t include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119578/sysbuild-doesn-t-include-mcuboot-headers-in-merged-hex-when-using-upgradeable-bootloader</link><description>I am in the process of migrating to NCS 2.7. My project includes NSIB, MCUBoot, TFM, and the application. Everything works fine with multi-image builds. 
 
 However when using sysbuild, MCUBoot (executing out of slot 0) is unable to find the headers for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 May 2025 13:19:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119578/sysbuild-doesn-t-include-mcuboot-headers-in-merged-hex-when-using-upgradeable-bootloader" /><item><title>RE: Sysbuild doesn't include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/thread/536637?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 13:19:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b93d53a0-fffc-47ed-91c9-ff1ec3a88266</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;FYI, relaying the PR&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/22454"&gt;https://github.com/nrfconnect/sdk-nrf/pull/22454&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild doesn't include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/thread/533056?ContentTypeID=1</link><pubDate>Fri, 25 Apr 2025 16:39:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f37ec352-c0ce-4d57-b38b-3c28e053ac39</guid><dc:creator>Nick Ewalt</dc:creator><description>&lt;p&gt;The issue still persists in NCS. I have a local patch to fix it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild doesn't include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/thread/533011?ContentTypeID=1</link><pubDate>Fri, 25 Apr 2025 12:44:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7800cf44-ebe5-4854-9e9f-50b8a9315f34</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Apologies for the long wait.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve picked up the case, could you verify if the issue still persists on your end or if you&amp;#39;ve been able to resolve it since our last reply?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild doesn't include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/thread/527285?ContentTypeID=1</link><pubDate>Thu, 13 Mar 2025 23:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7fdfed8-64c6-47ac-ad1f-572f183baa47</guid><dc:creator>Nick Ewalt</dc:creator><description>&lt;p&gt;The sample will boot as-is, here is the&amp;nbsp;output with&amp;nbsp;CONFIG_MCUBOOT_LOG_LEVEL_INF=y:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
Attempting to boot slot 0.
Attempting to boot from address 0x8200.
I: Trying to get Firmware version
I: Verifying signature against key 0.
I: Hash: 0x41...4a
I: Firmware signature verified.
Firmware version 1
I: Setting monotonic counter (version: 1, slot: 0)
*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 1, Swap type: none
I: Bootloader chainload address offset: 0x28000
�*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
Address of sample 0x30000
Hello sysbuild with mcuboot! nrf9160dk&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However that doesn&amp;#39;t mean it&amp;nbsp;is working correctly.&amp;nbsp;Without the headers it won&amp;#39;t be able to swap or revert updates. Additionally&amp;nbsp;it will fail to boot with&amp;nbsp;CONFIG_BOOT_VALIDATE_SLOT0=n (which is how I noticed this originally in my application). Here are the logs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
Attempting to boot slot 0.
Attempting to boot from address 0x8200.
I: Trying to get Firmware version
I: Verifying signature against key 0.
I: Hash: 0x41...4a
I: Firmware signature verified.
Firmware version 1
I: Setting monotonic counter (version: 1, slot: 0)
*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 1, Swap type: none
E:   bad image magic 0xffffffff; Image=1
E: Unable to find bootable image&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This&amp;nbsp;happens because&amp;nbsp;this code path is missing the&amp;nbsp;conditional on image_validated_by_nsib as seen &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v2.1.0-ncs3-1/boot/bootutil/src/loader.c#L2860"&gt;here&lt;/a&gt;. Note that the comment immediately above that code is wrong:&amp;nbsp;image 1 primary is certainly not the currently executing&amp;nbsp;mcuboot image, and therefore has not been validated by NSIB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild doesn't include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/thread/527204?ContentTypeID=1</link><pubDate>Thu, 13 Mar 2025 14:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03181d81-38b7-43bb-a34e-1db01cf48ad4</guid><dc:creator>Edvin</dc:creator><description>[quote user="Nick Ewalt"]&lt;ul&gt;&lt;li&gt;BUILD/signed_by_b0_mcuboot.hex (&amp;lt;--&amp;nbsp;&lt;span&gt;wrong as described above&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;BUILD/signed_by_b0_s1_image.hex&lt;span&gt;&amp;nbsp;(&amp;lt;-- wrong as described above)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;[/quote]
&lt;p&gt;I am sure you have described it, but can we simplify this issue. What are the symptoms that you are seeing with this approach? When flashing it with the FW built in v2.9.0. Does it work? Do you see any logs that are saying that something is wrong?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild doesn't include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/thread/527051?ContentTypeID=1</link><pubDate>Wed, 12 Mar 2025 21:38:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24686b0f-5c5a-42ec-aba7-4652bfe41f1f</guid><dc:creator>Nick Ewalt</dc:creator><description>&lt;p&gt;No, my application is fine. I confirmed that I can reproduce the issue on a pristine NCS 2.9.0 using&amp;nbsp;the Zephyr sample applications and the nrf9160dk board.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s use&amp;nbsp;zephyr/samples/sysbuild/with_mcuboot as an example. If I add just SB_CONFIG_SECURE_BOOT_APPCORE=y to its sysbuild.conf I get the exact same behavior as described above.&lt;/p&gt;
&lt;p&gt;This is my build command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build . -b nrf9160dk/nrf9160/ns --sysbuild -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=$PREBUILT_PATH/gcc-arm-none-eabi-13.2.rel1/linux/&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is the partition manager report.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  flash_primary (0x100000 - 1024kB):
+--------------------------------------------------+
+---0x0: b0_container (0x8000 - 32kB)--------------+
| 0x0: b0 (0x8000 - 32kB)                          |
+---0x8000: s0 (0xc000 - 48kB)---------------------+
| 0x8000: s0_pad (0x200 - 512B)                    |
+---0x8200: s0_image (0xbe00 - 47kB)---------------+
| 0x8200: mcuboot (0xbe00 - 47kB)                  |
+--------------------------------------------------+
| 0x14000: EMPTY_0 (0x4000 - 16kB)                 |
+---0x18000: s1 (0xc000 - 48kB)--------------------+
| 0x18000: s1_pad (0x200 - 512B)                   |
| 0x18200: s1_image (0xbe00 - 47kB)                |
+--------------------------------------------------+
| 0x24000: EMPTY_1 (0x4000 - 16kB)                 |
+---0x28000: mcuboot_primary (0x68000 - 416kB)-----+
+---0x28000: tfm_secure (0x8000 - 32kB)------------+
| 0x28000: mcuboot_pad (0x200 - 512B)              |
+---0x28200: app_image (0x67e00 - 415kB)-----------+
+---0x28200: mcuboot_primary_app (0x67e00 - 415kB)-+
| 0x28200: tfm (0x7e00 - 31kB)                     |
+---0x30000: tfm_nonsecure (0x60000 - 384kB)-------+
| 0x30000: app (0x60000 - 384kB)                   |
+--------------------------------------------------+
| 0x90000: mcuboot_secondary (0x68000 - 416kB)     |
| 0xf8000: EMPTY_2 (0x8000 - 32kB)                 |
+--------------------------------------------------+&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The merged.hex consists of the following files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;BUILD/app_provision.hex&lt;/li&gt;
&lt;li&gt;BUILD/b0_container.hex&lt;/li&gt;
&lt;li&gt;BUILD/s0_image.hex&lt;/li&gt;
&lt;li&gt;BUILD/s0.hex&lt;/li&gt;
&lt;li&gt;BUILD/s1.hex&lt;/li&gt;
&lt;li&gt;BUILD/b0/zephyr/zephyr.hex&lt;/li&gt;
&lt;li&gt;BUILD/signed_by_b0_mcuboot.hex (&amp;lt;--&amp;nbsp;&lt;span&gt;wrong as described above&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;BUILD/signed_by_b0_s1_image.hex&lt;span&gt;&amp;nbsp;(&amp;lt;-- wrong as described above)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;BUILD/with_mcuboot/zephyr/zephyr.signed.hex&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The missing mcuboot headers&amp;nbsp;(and trailers) can also clearly be seen in the merged.hex hex dump:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ srec_info BUILD/merged.hex -Intel
Format: Intel Hexadecimal (MCS-86)
Data:   000000 - 0002EB
        0002F0 - 0050C7
        0050D0 - 005CB5
        008200 - 00E097
        00E0A0 - 00EA9D
        00EAA0 - 00EB4F
        018200 - 01E097
        01E0A0 - 01EA9D
        01EAA0 - 01EB4F
        028000 - 03822D
        FF8130 - FF817F

$ srec_info BUILD/signed_by_b0_mcuboot.hex -Intel
Format: Intel Hexadecimal (MCS-86)
Data:   8200 - E097
        E0A0 - EA9D
        EAA0 - EB4F

$ srec_info BUILD/signed_by_mcuboot_and_b0_mcuboot.hex -Intel
Format: Intel Hexadecimal (MCS-86)
Data:   8000 - EBE6&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild doesn't include MCUBoot headers in merged.hex when using upgradeable bootloader</title><link>https://devzone.nordicsemi.com/thread/526682?ContentTypeID=1</link><pubDate>Tue, 11 Mar 2025 08:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:016081c4-5724-439e-85ed-a558a7a87c2f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To me this sounds like the application is not properly ported for sysbuild, and that the bootloader is not properly included.&lt;/p&gt;
&lt;p&gt;Please have a look at the migration notes for NCS v2.7.0:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/releases_and_maturity/migration_guides.html"&gt;https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/releases_and_maturity/migration_guides.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, as an introduction to the sysbuild, I really recommend going through the nRF Connect SDK Intermediate course on DevAcademy. Particularly Lesson 8 is focused on Sysbuild and multi-image builds:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>