<?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>Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72445/zephyr-with-mcuboot-and-simple-management-protocol-smp</link><description>Dear community, 
 i&amp;#39;m working on an application for the nRF52832. I would like to use MCUboot as Bootloader and Zephyr for the main application . The current situation is that i&amp;#39;m using the west tool for buildung and flashing the software. Not sure if</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Mar 2021 08:46:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72445/zephyr-with-mcuboot-and-simple-management-protocol-smp" /><item><title>RE: Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/thread/299175?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 08:46:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0081e304-f15a-401e-9b96-9b2c3126e904</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Great to hear! It&amp;#39;s my pleasure to help!&lt;br /&gt;&lt;br /&gt;Please reach out if you face any other issues.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/thread/299169?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 08:27:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce72a6ed-acc3-4dd0-971a-828be706d59e</guid><dc:creator>drgoogles</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;many thanks for your help. After following some How-To&amp;#39;s i have messed up my NRF Connect SDK folder - cleaning everything up was the solution. Your proposed solution works with&lt;strong&gt; NRF Connect SDK v1.4.0&lt;/strong&gt; and &lt;strong&gt;NRF Connect SDK v1.5.0&lt;/strong&gt;. The smg_svr example works fine.&lt;/p&gt;
&lt;p&gt;The prj.conf is set up as necessary for mcumgr:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable mcumgr.
CONFIG_MCUMGR=y

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

# Enable flash operations.
CONFIG_FLASH=y

# Required by the `taskstat` command.
CONFIG_THREAD_MONITOR=y

# Enable statistics and statistic names.
CONFIG_STATS=y
CONFIG_STATS_NAMES=y

# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_MCUMGR_CMD_STAT_MGMT=y

# Enable logging
CONFIG_LOG=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My build command is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52dk_nrf52832 -s . --pristine -d build\app -- -DOVERLAY_CONFIG=&amp;#39;overlay-serial.conf;overlay-fs.conf&amp;#39;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My build output &amp;lt;project_folder&amp;gt;/&amp;lt;build_folder&amp;gt;/zephyr/ looks like follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-a----        11.03.2021     08:06         633702 app_moved_test_update.hex
-a----        11.03.2021     08:06         186842 app_signed.hex
-a----        11.03.2021     08:06         191314 app_test_update.hex
-a----        11.03.2021     08:06          65568 app_to_sign.bin
-a----        11.03.2021     08:06          66416 app_update.bin
-a----        11.03.2021     08:05           5258 cmake_install.cmake
-a----        11.03.2021     08:06          67040 dfu_application.zip&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m getting an echo response with the following command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcumgr.exe --conntype=serial --connstring=&amp;#39;COM6,baud=115200&amp;#39; echo hello&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With the following list command i&amp;#39;m getting the flashed images:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcumgr.exe --conntype=serial --connstring=&amp;#39;COM6,baud=115200&amp;#39; image list

# Output

Images:
 image=0 slot=0
    version: 0.0.0
    bootable: true
    flags: active confirmed
    hash: 22870947a1db8e9d0ead516a71868b01d04ad6d25823373d327ad6dc5099579c
 image=0 slot=1
    version: 0.0.0
    bootable: true
    flags:
    hash: ec5c943d376968638609abfa20737644e1e6f10ea8a2fc50fa83efa14ffc3c45
Split status: N/A (0)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The updating works with the following command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; mcumgr.exe --conntype=serial --connstring=&amp;#39;COM6,baud=115200&amp;#39; image upload .\build\app\zephyr\app_update.bin
 
 # Output
 
  mcumgr.exe --conntype=serial --connstring=&amp;#39;COM6,baud=115200&amp;#39; image upload .\build\app\zephyr\app_update.bin
 22.20 KiB / 61.84 KiB [========================&amp;gt;-------------------------------------------]  35.90% 2.10 KiB/s 00m18s&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/thread/298719?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 13:22:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b59c9ed8-b32b-4e20-bbfd-64e6b71bfd7c</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi, Michael!&lt;br /&gt;&lt;br /&gt;I understand. With NCS the bootloader is built automatically and added in the build folder, so there should not be any need to build it separately. Could you have a look at the contents in your build/app folder? It should contain something like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;d-----        09.03.2021     14:19                app
d-----        09.03.2021     14:19                CMakeFiles
d-----        09.03.2021     14:19                Kconfig
d-----        09.03.2021     14:19                mcuboot
d-----        09.03.2021     14:19                modules
d-----        09.03.2021     14:19                zephyr
-a----        09.03.2021     14:19         103504 .ninja_deps
-a----        09.03.2021     14:19          24897 .ninja_log
-a----        09.03.2021     14:19         925615 build.ninja
-a----        09.03.2021     14:19          21613 CMakeCache.txt
-a----        09.03.2021     14:19           1839 cmake_install.cmake
-a----        09.03.2021     10:37          17920 libapp.a
-a----        09.03.2021     14:19           1221 partitions.yml
-a----        09.03.2021     14:19           2136 pm.config
-a----        09.03.2021     14:19            327 regions.yml
-a----        09.03.2021     14:19           1877 zephyr_modules.txt
-a----        09.03.2021     14:19             84 zephyr_settings.txt&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/thread/298636?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 10:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:489a804b-5d21-4f60-8994-a74c5ad10e77</guid><dc:creator>drgoogles</dc:creator><description>&lt;p&gt;I&amp;#39;m working with the nRF Connect SDK. The path in my previous reply was relative. My fault... i&amp;#39;m building the software over command line like follows:&lt;/p&gt;
&lt;p&gt;smp_svr:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52dk_nrf52832 -s app --pristine -d build\app -- -DOVERLAY_CONFIG=&amp;#39;overlay-serial.conf;overlay-fs.conf&amp;#39;&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;mcuboot:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52dk_nrf52832 -s ..\ncs\bootloader\mcuboot\boot\zephyr\ --pristine -d build\bootloader&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;The smp_svr project was copied to &lt;strong&gt;&amp;lt;project-name&amp;gt;/&amp;lt;app&amp;gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;Kind regards,&lt;/div&gt;
&lt;div&gt;Michael&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/thread/298615?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 09:57:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1a7bfae-a28d-4cb7-b0a9-d93b768949cd</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;You do not need MCUBoot with mcumgr. As explained in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/device_mgmt/dfu.html"&gt;Zephyr DFU documentation&lt;/a&gt;&amp;nbsp;MCUBoot should be flashed initially, and then the application image can be upgraded using mcumgr. It&amp;#39;s the DFU subsystem in the that interacts with MCUBoot, not mcumgr directly.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Are you using Zephyr standalone or the nRF Connect SDK? Below is some of the images that should be present in the zephyr folder after building with NCS:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;app_signed.hex
app_test_update.hex
app_to_sign.bin
app_update.bin&lt;/pre&gt;&lt;br /&gt;I&amp;#39;m not sure if Zephyr standalone does this signing process. If not you must sign the image as described in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html?highlight=smp%20svr#signing-the-sample-image"&gt;SMP Server documentation&lt;/a&gt;. Make sure that you build with serial support as well:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52dk_nrf52832 -p -- -DOVERLAY_CONFIG=&amp;#39;overlay-serial.conf;&amp;#39;&lt;/pre&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/thread/298570?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 07:54:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3f74e06-9c7b-48e9-a082-8929d20d3aa8</guid><dc:creator>drgoogles</dc:creator><description>&lt;p&gt;Hello Carl,&lt;/p&gt;
&lt;p&gt;thanks for your reply. Do i need MCUBoot with mcumgr? What&amp;#39;s the common way to use MCUBoot with Zephyr? &lt;br /&gt;&lt;br /&gt;I have built the smp_svr (&lt;strong&gt;zephyr\samples\subsys\mgmt\mcumgr\smp_svr&lt;/strong&gt;) example within the ncs folder and after building there weren&amp;#39;t no signed files in the &amp;lt;project_folder&amp;gt;/&amp;lt;build_folder&amp;gt;/zephyr/.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable mcumgr.
CONFIG_MCUMGR=y

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_ROM_START_OFFSET=0xc000 &amp;lt;-- That&amp;#39;s the only flag i add, because imgtool was complaining about the offset

# Enable flash operations.
CONFIG_FLASH=y

# Required by the `taskstat` command.
CONFIG_THREAD_MONITOR=y

# Enable statistics and statistic names.
CONFIG_STATS=y
CONFIG_STATS_NAMES=y

# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_MCUMGR_CMD_STAT_MGMT=y

# Enable logging
CONFIG_LOG=y
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;smp_svr&lt;/strong&gt; software was built with the command &amp;nbsp;&lt;strong&gt;west build -b nrf52dk_nrf52832. &lt;/strong&gt;The MCUboot was built with the same command without any changes in the prj.conf.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr with MCUboot and Simple Management Protocol (SMP)</title><link>https://devzone.nordicsemi.com/thread/298388?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 13:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb3a3ac-b6a1-401b-9485-a235a09e7de0</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello!&lt;br /&gt;&lt;br /&gt;Good to hear that you have progress. As for your questions:&lt;br /&gt;&lt;br /&gt;- Which file are you trying to upload? When building using NCS an image called &lt;span style="text-decoration:line-through;"&gt;app_signed.bin&lt;/span&gt;&amp;nbsp;app_update.bin is created and signed automatically. You should use this. The file is located in &amp;lt;project_folder&amp;gt;/&amp;lt;build_folder&amp;gt;/zephyr/.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- MCUBoot is not setup with mcumgr out of the box, you will have to enable it. Though be aware that the img_mgmt features most likely won&amp;#39;t work for the MCUBoot image, as they rely on MCUBoot themselves.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>