<?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>Mcuboot failing to load SMP SVR application on nRF5340 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89263/mcuboot-failing-to-load-smp-svr-application-on-nrf5340-dk</link><description>Hi, 
 
 I&amp;#39;m trying to follow the MCUBoot + SMP SVR example on this page: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#smp-svr-sample 
 
 MCUBoot flashes just fine, but when I try to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Jun 2022 15:21:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89263/mcuboot-failing-to-load-smp-svr-application-on-nrf5340-dk" /><item><title>RE: Mcuboot failing to load SMP SVR application on nRF5340 DK</title><link>https://devzone.nordicsemi.com/thread/374383?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 15:21:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd91e740-a56e-4614-9fee-6194c0f24d00</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;It is good to hear that the issue has been resolved.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot failing to load SMP SVR application on nRF5340 DK</title><link>https://devzone.nordicsemi.com/thread/374230?ContentTypeID=1</link><pubDate>Sat, 25 Jun 2022 19:18:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:446cf45f-6567-401c-a193-bb3c05e2c8e9</guid><dc:creator>mablabs</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I believe I have figured out my issue. It looks like my environment wasn&amp;#39;t configured correctly, and instead of using the nRF Connect SDK, VS Code was using a separate Zephyr installation. When I started from scratch on another PC using nRF Connect SDK, everything works as expected and the SMP Server app works (and I can see the bootloader logs indicating it&amp;#39;s successfully loading).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot failing to load SMP SVR application on nRF5340 DK</title><link>https://devzone.nordicsemi.com/thread/374229?ContentTypeID=1</link><pubDate>Sat, 25 Jun 2022 15:24:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc462c5c-1d25-4c99-af1e-7c20d0347b0e</guid><dc:creator>mablabs</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thanks for the clarification. However, when I try to run the following commands:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf5340dk_nrf5340_cpuapp  zephyr/samples/subsys/mgmt/mcumgr/smp_svr/ -- -DOVERLAY_CONFIG=&amp;#39;overlay-serial.conf;overlay-fs.conf;overlay-shell-mgmt.conf&amp;#39;

west flash&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I still get the following error from the bootloader, when it goes to boot:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build zephyr-v3.1.0-678-gd0a788669e15  ***
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
W: Failed reading image headers; Image=0
E: MAB boot_is_header_valid -- header magic (0x00000000) doesn&amp;#39;t match (0x96f3b83d)
E: MAB boot_is_header_valid -- header magic (0x00000000) doesn&amp;#39;t match (0x96f3b83d)
E: MAB boot_validate_slot -- boot_is_header_valid result = 0
E: MAB boot_validate_slot -- fih_not_eq result = 1
E: Image in the primary slot is not valid!
E: Unable to find bootable image
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please advise on what could be happening. Very much appreciate your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot failing to load SMP SVR application on nRF5340 DK</title><link>https://devzone.nordicsemi.com/thread/374063?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 07:55:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:784b9597-89a0-4568-802f-34dac5809cfe</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="mablabs"]&lt;p&gt;Will the first command that you posted:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;west build -p -b nrf5340dk_nrf5340_cpuapp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;build both MCUBoot and the SMP Server application into a single binary&lt;/p&gt;[/quote]
&lt;p&gt;Yes, MCUBoot will be build as a &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrf/ug_multi_image.html"&gt;child image&lt;/a&gt; to your application. See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrf/app_bootloaders.html"&gt;Bootloaders and Device Firmware Updates&lt;/a&gt; for a good explanation of bootloaders.&lt;/p&gt;
&lt;p&gt;When you program your board with the debugger, hex files are usually used.&lt;br /&gt;The binary files used for MCUBoot is for use for the DFU tools: typically sent over UART or Bluetooth Low Energy.&lt;br /&gt;For more information about our build system and which files are generated, see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_build_system.html#output-build-files"&gt;Build and configuration system&lt;/a&gt;.&lt;/p&gt;
[quote user="mablabs"]Don&amp;#39;t I have to specify the actual project to build in the west invocation:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;west build -p -b &amp;lt;board_name&amp;gt; &amp;lt;path to project&amp;gt;&lt;/code&gt;?[/quote]
&lt;p&gt;By default, `west build` will build for the current folder.(path is &amp;quot;./&amp;quot;) Meaning that you only need the path if you build from another location.&lt;br /&gt;It is up to you where you want to build from really.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot failing to load SMP SVR application on nRF5340 DK</title><link>https://devzone.nordicsemi.com/thread/374035?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2022 22:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed7d08e9-c805-4229-a0ac-3a9f83ed2eed</guid><dc:creator>mablabs</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your response. Will the first command that you posted:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;west build -p -b nrf5340dk_nrf5340_cpuapp&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;build both MCUBoot and the SMP Server application into a single binary? Don&amp;#39;t I have to specify the actual project to build in the west invocation:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;west build -p -b &amp;lt;board_name&amp;gt; &amp;lt;path to project&amp;gt;&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot failing to load SMP SVR application on nRF5340 DK</title><link>https://devzone.nordicsemi.com/thread/373879?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2022 09:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21b91bce-bc0e-4403-92d8-331c8ecbfb10</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;When flashing the application first time to the nRF5340, use:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -p -b nrf5340dk_nrf5340_cpuapp
west flash&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will flash the merged file.&lt;/p&gt;
&lt;p&gt;When performing DFU to SMP Server over serial, I recommend using mcumgr as explained in the SMP Server sample, but with app_update.bin, as mentioned in &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/mcuboot/readme-ncs.html"&gt;Using MCUboot in nRF Connect SDK&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo mcumgr &amp;lt;connection string&amp;gt; image upload build/zephyr/app_update.bin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Des it work when you do this?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>