<?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>nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58477/nrf5340---uart-programming-option</link><description>Hello, 
 I&amp;#39;m in the process of developing the HW board for a nRF5340-based product. I need the customer could update the firmware using a serial port (USB or Bluetooth is not acceptable). Is it possible to do that ? Where to found documentation on this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Sep 2020 15:10:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58477/nrf5340---uart-programming-option" /><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/271577?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2020 15:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02d89861-5f07-4bff-b526-d5bbe3d3f570</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Hello Hung&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve solved on this thread&amp;nbsp;&lt;a title="dfu-over-serial-mission-impossible" href="https://devzone.nordicsemi.com/f/nordic-q-a/66242/nrf5340---dfu-over-serial-mission-impossible"&gt;dfu-over-serial-mission-impossible&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you for support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/271575?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2020 15:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecef0f68-3a49-4f08-933c-f874ff7e8b09</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriele,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry that I haven&amp;#39;t got time to look into this yet.&amp;nbsp;&lt;br /&gt;I would suggest you to have a look at the source code of the Thingy 91.&lt;/p&gt;
&lt;p&gt;According to this guide:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/thingy91_2d00_fw_2d00_update_2d00_mcuboot"&gt;https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/thingy91_2d00_fw_2d00_update_2d00_mcuboot&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It will trigger the image swap/confirm after a reset after the DFU. I will try to work on this issue next week.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/270778?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 09:48:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b7bb3a0-d734-4b80-b3e2-cd6b00646348</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Hello Hung. Any news on this ?&lt;br /&gt;I&amp;#39;ve seen a couple of API functions I guess could be of help to call from within application&lt;/p&gt;
&lt;p&gt;int boot_set_pending(int permanent);&lt;br /&gt; int boot_set_confirmed(void);&lt;/p&gt;
&lt;p&gt;Not sure this makes sense.&lt;br /&gt;They are implemented in&lt;br /&gt;ncs/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c&lt;br /&gt;However it is not clear how to link them to the application.&lt;br /&gt;Adding&lt;br /&gt;#include &amp;lt;bootutil/bootutil.h&amp;gt;&lt;br /&gt;doesn&amp;#39;t suffice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269596?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 09:33:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d68d775c-39f1-4cc4-97ba-7de09011a825</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Ok, thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269579?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 08:52:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5f102a4-5296-482c-bd51-8fee4f8a6c99</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriele,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1.I&amp;#39;m sorry I forgot to check the warnings. You need to add&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#include &amp;quot;os_mgmt/os_mgmt.h&amp;quot;&lt;/p&gt;
&lt;p&gt;#include &amp;quot;img_mgmt/img_mgmt.h&amp;quot;&lt;br /&gt;&lt;br /&gt;to you main.c&lt;/p&gt;
&lt;p&gt;A good reference for using the bootloader is to have a look at the smpsvr sample located at&amp;nbsp;\zephyr\samples\subsys\mgmt\mcumgr\smp_svr&lt;/p&gt;
&lt;p&gt;2. Yes you use app_update.bin. If you have a look at the link on FOTA I pointed to earlier you can find that suggestion.&amp;nbsp;&lt;br /&gt;You can sign the image yourself but I haven&amp;#39;t been very successfully managed to do so. The documentation is here:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;https://docs.zephyrproject.org/latest/samples/subsys/mgmt/mcumgr/smp_svr/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to switch between smpsvr and your application, I think it&amp;#39;s the mcumgr handle it. I haven&amp;#39;t looked into how you do it automatically yet. Will get back when I find the way.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269436?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 14:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9c1be20-649d-444e-9bf6-0d340c9183cc</guid><dc:creator>Gabriele</dc:creator><description>&lt;div&gt;Dear Huang&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Thank you for guiding me with lot of patience.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;1) At build time I get a couple of warnings&lt;br /&gt;warning: implicit declaration of function &amp;#39;os_mgmt_register_group&amp;#39;&lt;br /&gt;warning: implicit declaration of function &amp;#39;img_mgmt_register_group&amp;#39;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Is there something I can do about it, or just ignore and go on ?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;2) Are you sure app_update.bin us the correct binary image ?&lt;br /&gt;Indeed we have a variety of choices:&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;- app_update.bin&lt;br /&gt;- app_signed.hex&lt;br /&gt;- app_test_update.hex&lt;br /&gt;- app_moved_test_update.hex&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;My goal is to control from MyApp whether to stay in MyApp or reboot in &amp;quot;SMP Server mode&amp;quot; to upload a new version of MyApp&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269364?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 12:16:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0668de30-f933-4044-88dd-862043135b7b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriele,&amp;nbsp;&lt;br /&gt;You would need to integrate smpsvr into your application.&amp;nbsp;&lt;br /&gt;It&amp;#39;s pretty simple. You can just follow the instruction &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#fota-upgrades"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;The instruction is for BLE , to do UART DFU you use&amp;nbsp;CONFIG_MCUMGR_SMP_UART = y instead of&amp;nbsp;CONFIG_MCUMGR_SMP_BT.&amp;nbsp;&lt;br /&gt;In your main.c you need to call&amp;nbsp;&lt;/p&gt;
&lt;p&gt;os_mgmt_register_group();&lt;br /&gt; img_mgmt_register_group();&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the example, I have prepared the .bin files that you can use to update. Note that after you do :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcumgr -t 20 --conntype serial --connstring=COM37 image upload app_update_new.bin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You still need to confirm the image &amp;quot;image confirm &amp;lt;img_sha&amp;gt;&amp;quot; and then do a reset. I haven&amp;#39;t looked into how you can confirm the image and reset automatically yet.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-ef76a651c74745fd9327f41b64c3b651/peripheral_5F00_lbs_5F00_dfu_5F00_uart.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_lbs_5F00_dfu_5F00_uart.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269215?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 15:44:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fee5fbc-cc9d-4f5d-b58c-b27be69ae668</guid><dc:creator>Gabriele</dc:creator><description>&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Hi,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;The swap mechanism went well! &lt;br /&gt;After a &amp;quot;image confirm&amp;quot; the new image (My App) is the active one, persistently.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;But what ? I cannot upload a brand new image.&lt;br /&gt;How to restore the DFU functionality ?&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269214?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 15:33:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1c24ec5-0bd7-4dee-b2bf-8e2fb7ae74e6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;After you have flashed the smp_svr you can use the mcumgr to&amp;nbsp;DFU your image .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;After you have your image list with 2 images, you need to either test or confirm the image and trigger a reset for your app to run.&amp;nbsp;&lt;br /&gt;Call&amp;nbsp;`Image test &amp;lt;image sha&amp;gt;` or `image confirm &amp;lt;image sha&amp;gt;` and then do a reset. Your application should run after that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269165?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 12:30:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25bceab8-4bf5-4ee3-ab40-8ec96d45a94f</guid><dc:creator>Gabriele</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Thank you for your reply.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;I think the problem was due to flashing non signed binary for smp_srv.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Now I&amp;#39;m able to&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;a) Build and flash mcuboot in bootloadr_partition (using JLink)&lt;br /&gt;b) Build and flash smp_svr in slot0_partition (using JLink)&lt;br /&gt;c) Build and flash MyApp in slot1_partition (using DFU)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;This is the resulting mcumgr image list&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Images:&lt;br /&gt;&amp;nbsp;image=0 slot=0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; version: 0.0.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bootable: true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; flags: active confirmed&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hash: 6645ebafd4a33787a52b5f76c18f9b66038a25b3413238e22d2432e6bba47677&lt;br /&gt;&amp;nbsp;image=0 slot=1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; version: 1.3.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bootable: true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; flags: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hash: 17563829483019977c328c7c89114dcb2f872c65b9b5c8d663011e617b9915ad&lt;br /&gt;Split status: N/A (0)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Now I see a problem.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;On system restart I get out of UART&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&amp;nbsp;*** Booting Zephyr OS build v2.3.0-rc1-ncs1&amp;nbsp; ***&lt;br /&gt;&amp;nbsp;[00:00:00.003,051] &amp;lt;inf&amp;gt; mcuboot: Starting bootloader&lt;br /&gt;&amp;nbsp;[00:00:00.009,246] &amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;&amp;nbsp;[00:00:00.019,348] &amp;lt;inf&amp;gt; mcuboot: Boot source: none&lt;br /&gt;&amp;nbsp;[00:00:00.024,810] &amp;lt;inf&amp;gt; mcuboot: Swap type: none&lt;br /&gt;&amp;nbsp;[00:00:00.138,214] &amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0x10000&lt;br /&gt;&amp;nbsp;[00:00:00.146,026] &amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot&lt;br /&gt;&amp;nbsp;*** Booting Zephyr OS build v2.3.0-rc1-ncs1&amp;nbsp; ***&lt;br /&gt;&amp;nbsp;[00:00:00.004,425] &amp;lt;inf&amp;gt; smp_sample: build time: Sep 11 2020 13:29:22&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;The smp_srv is running, not MyApp !&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;How to switch from smp_srv to MyApp, and viceversa ?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="background-color:#ffffff;"&gt;Thank you&lt;/span&gt;&lt;/div&gt;
&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269114?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 09:27:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e112dea0-8ce0-4f5c-ad3a-adace9ca64d9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriele,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry that it&amp;#39;s been a long time and you still having issue with FOTA on nRF53.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We now have better documentation for nRF53 including FOTA instruction.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Please have a look here:&amp;nbsp;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#fota-upgrades"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#fota-upgrades&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The instruction is for FOTA using BLE. And I think you should test first using this transport. Just to make sure smpsvr is working fine. After that you can change&amp;nbsp;CONFIG_MCUMGR_SMP_BT to&amp;nbsp;CONFIG_MCUMGR_SMP_UART to support UART (and add&amp;nbsp;CONFIG_SERIAL=y)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/269023?ContentTypeID=1</link><pubDate>Thu, 10 Sep 2020 14:10:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c47ed353-db6b-4a0d-a2c4-bfa0355a98e7</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Hi Hung&lt;br /&gt;I&amp;#39;m trying to follow your initial recipe&lt;br /&gt; &lt;br /&gt;a) Build and flash mcuboot&lt;br /&gt;&amp;nbsp; $ cd &amp;lt;ncs&amp;gt;/bootloader/mcuboot/boot/zephyr&lt;br /&gt;&amp;nbsp; $ west build -b qi2m_nrf5340_cpuapp --build-dir buildout&lt;br /&gt;&amp;nbsp; $ nrfjprog -f nrf53 --program buildout/zephyr/zephyr.hex&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I check out reading flash. One image found at&lt;br /&gt;&amp;nbsp; &amp;nbsp; 0x00000000 - 0x0000891f (35104 B)&lt;/p&gt;
&lt;p&gt;b) Build and flash smp_svr&lt;br /&gt;&amp;nbsp; $ cd &amp;lt;ncs&amp;gt;/zephyr/samples/subsys/mgmt/mcumgr/smp_svr&lt;br /&gt;&amp;nbsp; $ vim prj.conf&lt;br /&gt;&amp;nbsp; Add&amp;nbsp;these lines&lt;br /&gt;&amp;nbsp; &amp;nbsp; CONFIG_MCUMGR_SMP_UART=y&lt;br /&gt;&amp;nbsp; &amp;nbsp; CONFIG_NET_BUF_USER_DATA_SIZE=7&lt;br /&gt;&amp;nbsp; $ west build -b qi2m_nrf5340_cpuapp --build-dir buildout&lt;br /&gt;&amp;nbsp; $ nrfjprog -f nrf53 --program buildout/zephyr/zephyr.hex&lt;/p&gt;
&lt;p&gt;&amp;nbsp; I check out reading flash. Two images found at&lt;br /&gt;&amp;nbsp; &amp;nbsp; 0x00000000 - 0x0000891f (35104 B)&lt;br /&gt;&amp;nbsp; &amp;nbsp; 0x00010200 - 0x0001a62b (42028 B)&lt;/p&gt;
&lt;p&gt;On board restart I get out of UART&lt;/p&gt;
&lt;p&gt;&amp;nbsp; *** Booting Zephyr OS build v2.3.0-rc1-ncs1 ***&lt;br /&gt;&amp;nbsp; [00:00:00.003,051] &amp;lt;inf&amp;gt; mcuboot: Starting bootloader&lt;br /&gt;&amp;nbsp; [00:00:00.009,063] &amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&lt;br /&gt;&amp;nbsp; [00:00:00.019,165] &amp;lt;inf&amp;gt; mcuboot: Boot source: none&lt;br /&gt;&amp;nbsp; [00:00:00.024,566] &amp;lt;wrn&amp;gt; mcuboot: Failed reading image headers; Image=0&lt;br /&gt;&amp;nbsp; [00:00:00.032,012] &amp;lt;err&amp;gt; mcuboot: Unable to find bootable image&lt;/p&gt;
&lt;p&gt;Issuing from host the test command&lt;/p&gt;
&lt;p&gt;&amp;nbsp; $ mcumgr -t 20 --conntype serial --connstring=&amp;#39;/dev/ttyUSB0,baud=115200&amp;#39; image list&lt;/p&gt;
&lt;p&gt;I get &amp;quot;Error: NMP timeout&amp;quot;&lt;/p&gt;
&lt;p&gt;What a hell to do ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/268802?ContentTypeID=1</link><pubDate>Wed, 09 Sep 2020 15:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb194b8d-d60f-405b-8fc1-508f7f0e2822</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Solved with&lt;br /&gt; $ sudo pip3 install cbor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/268792?ContentTypeID=1</link><pubDate>Wed, 09 Sep 2020 14:39:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b8ee850-fc4b-4518-a905-a86fc528f055</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Hi Hung&lt;/p&gt;
&lt;p&gt;Let me sum up the state of art as follow-up to this thread.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve a nRF5340 custom board and a working Zephyr application I can build (under NCS v1.2.0), flash (using SWD), and run.&lt;br /&gt;The UART works fine, either as console and generic user data.&lt;br /&gt;Now, I want to perform DFU&amp;nbsp;through the UART.&lt;br /&gt;I need to include MCUBoot with MCUmgr with SMP server and Uart transport.&lt;/p&gt;
&lt;p&gt;Here is what I&amp;#39;ve done&lt;/p&gt;
&lt;p&gt;1. Add Uart support for mcumgr into board file &amp;lt;ncs&amp;gt;/zephyr/boards/arm/qi2m_nrf5340/qi2m_nrf5340_cpuapp_common.dts &lt;br /&gt; chosen {&lt;br /&gt; ...&lt;br /&gt; zephyr,uart-mcumgr = &amp;amp;uart0;&lt;br /&gt; };&lt;/p&gt;
&lt;p&gt;2. Change prj.conf of my application by adding&lt;br /&gt; CONFIG_MCUMGR=y&lt;br /&gt; CONFIG_BOOTLOADER_MCUBOOT=y&lt;br /&gt; CONFIG_NET_BUF=y&lt;br /&gt; CONFIG_MCUMGR_SMP_UART=y&lt;/p&gt;
&lt;p&gt;3. Rebuilding the application with&lt;br /&gt; $ west build -b qi2m-nrf5340_cpuapp --build-dir buildout&lt;/p&gt;
&lt;p&gt;I get the error&lt;/p&gt;
&lt;p&gt;..&lt;br /&gt;FAILED: zephyr/autogen/pubkey.c&lt;br /&gt;ModuleNotFoundError: No module named &amp;#39;cbor&amp;#39;&lt;/p&gt;
&lt;p&gt;Is there anything missed ?&lt;br /&gt;Does it help to move to NCS 1.3.0 ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/237663?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 09:46:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ce73200-c52c-49c7-806c-369c79c1b234</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I don&amp;#39;t think Go is needed for the UART dfu application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However,&amp;nbsp;DFU update is a quite complex application. I would suggest you to get started with testing normal UART application. You will need to have normal SWD programming (not UART DFU) for the development, make sure you have the SWD accessible and has the programmer (can be a nRF53 DK).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/237550?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 18:12:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7582cb4-6e34-4af9-b612-d6882ac1f92e</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Hung,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Thank you, this is a clean step-by-step recipe. I&amp;#39;m sorry I cannot test this in real time. These days&amp;nbsp;much of my effort&amp;nbsp;is&amp;nbsp;on&amp;nbsp;the PCB design. Consider that the DFU must get started from a Windows host, because the product is linked to a Windows PC where the user application runs. Thus, as for the first step, I&amp;nbsp;think I have to install Go for Windows, right ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/237446?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 13:06:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a46ccab-a7f1-4dd3-8d2a-bc891788dd68</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriele,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tried it on the nRF53 but, on the nRF91 what we did was:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;Add uart support for mcumgr into&amp;nbsp;boards/arm/nrf9160_pca10090/nrf9160_pca10090_common.dts&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/osaether/zephyr/commit/fbd3daec22eacd7d2d3b1794bb01d9a263d23868"&gt;https://github.com/osaether/zephyr/commit/fbd3daec22eacd7d2d3b1794bb01d9a263d23868&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;Change prj.conf for nRF91 UART transport for smp_svr:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/osaether/zephyr/commit/ee8e73de279c1cde0cfbe85392c047349f254fc7"&gt;https://github.com/osaether/zephyr/commit/ee8e73de279c1cde0cfbe85392c047349f254fc7&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;- Then build and flash mcuboot&lt;/p&gt;
&lt;p&gt;- Build and flash smp_svr&lt;/p&gt;
&lt;p&gt;- Intall MCUMgr command line tool:&amp;nbsp;&lt;a href="https://github.com/apache/mynewt-mcumgr#command-line-tool" rel="nofollow"&gt;https://github.com/apache/mynewt-mcumgr#command-line-tool&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Use this to list the images in flash, just to test if you can communicate with smp_svr via UART&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo mcumgr -t&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;60&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;--conntype serial --connstring=&lt;/code&gt;&lt;code&gt;&amp;#39;dev=/dev/ttyACM0,baud=115200&amp;#39;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;image list&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;- Test with a helloworld example:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ~/ncs/zephyr/samples/hello_world
echo &amp;quot;# Enable mcumgr.\nCONFIG_MCUMGR=y&amp;quot; &amp;gt;prj.conf
echo &amp;quot;# Ensure an MCUboot-compatible binary is generated.\nCONFIG_BOOTLOADER_MCUBOOT=y&amp;quot; &amp;gt;&amp;gt;prj.conf
echo &amp;quot;# Enable NET BUF\nCONFIG_NET_BUF=y&amp;quot; &amp;gt;&amp;gt;prj.conf
mkdir build
cd build
cmake -GNinja -DBOARD=nrf9160_pca10090 ..
ninja
# Sign the bin-file (the mcumgr cli does only work with bin-files):
~/ncs/mcuboot/scripts/imgtool.py sign --key ~/ncs/mcuboot/root-rsa-2048.pem --header-size 0x200 --align 8 --version 1.0 --slot-size 0x32000 zephyr/zephyr.bin signed.bin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;-Perform DFU:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo mcumgr -t&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;60&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;--conntype serial --connstring=&lt;/code&gt;&lt;code&gt;&amp;#39;dev=/dev/ttyACM0,baud=115200&amp;#39;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;image upload signed.bin&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;- Run the image list above and it should show 2 slots.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/237199?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 15:18:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cebb912b-b399-401c-84eb-7f9a6bb052c1</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Hi Hung,&lt;br /&gt;at first glance this seems a very complicated path. It makes me wonder if it will work in the end.&lt;br /&gt;I&amp;#39;ll try to understand the documents you&amp;#39;ve linked&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/237194?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 14:57:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52ac9008-7d77-4f26-abaf-9c43874e5cf4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriele,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I afraid the nrfutil tool that Igor pointed wouldn&amp;#39;t work with the nRF53 (only support nRF52 and nRF5 SDK).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF53 is not supported by our nRF5SDK (which the nrfutil supports)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For nRF53 you would need to use NRF Connect SDK. To do DFU with UART on nRF Connect SDK you would need to use mcumgr and smpsvr.&amp;nbsp;&lt;br /&gt;Please read about the smpsvr &lt;a href="https://docs.zephyrproject.org/latest/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And mcumgr &lt;a href="https://docs.zephyrproject.org/1.13.0/subsystems/mgmt.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We have an example of using smpsvr and mcumgr via UART for the Thingy91 &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/thingy91_2d00_fw_2d00_update_2d00_mcuboot"&gt;here&lt;/a&gt;. It&amp;#39;s for the nRF9160 but it should be similar syntax for the nRF53.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/237128?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 12:50:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:963fbdfe-23cd-4739-a9f2-af51d0a25826</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Yes, thank you Igor. The document doesn&amp;#39;t make any explicit reference to nRF5340, but I think it will work as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - UART programming option</title><link>https://devzone.nordicsemi.com/thread/237104?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 11:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a61fe566-6890-4e91-a74a-12f5b9e17e87</guid><dc:creator>Igor</dc:creator><description>&lt;p&gt;Do you mean this?&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_dfu_serial.html"&gt;infocenter.nordicsemi.com/.../nrfutil_dfu_serial.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>