<?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, FOTA with Zephyr and NCS 2.5.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105658/mcuboot-fota-with-zephyr-and-ncs-2-5-0</link><description>Hi. 
 
 I&amp;#39;m still developing FOTA functionality with nRF52832 QFAA, NCS 2.5.0 and zephyr in VS Code environment. 
 
 Everything is going well with the application development process, but there are problems on bootloader for FOTA. 
 
 Here is my design</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Nov 2023 09:30:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105658/mcuboot-fota-with-zephyr-and-ncs-2-5-0" /><item><title>RE: MCUBoot, FOTA with Zephyr and NCS 2.5.0</title><link>https://devzone.nordicsemi.com/thread/455914?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 09:30:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7a43717-4185-44d5-91f5-2c847affda50</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Could you please try this:&amp;nbsp;&lt;br /&gt;1. Clone peripheral_lbs sample.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Add&amp;nbsp;&lt;br /&gt;CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y&lt;br /&gt;CONFIG_BOOTLOADER_MCUBOOT=y&lt;/p&gt;
&lt;p&gt;into prj.conf.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;After that your application will have smp service supported (FOTA) and you can start doing FOTA update via nRF Device Manager or&amp;nbsp; nRF Connect app.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, FOTA with Zephyr and NCS 2.5.0</title><link>https://devzone.nordicsemi.com/thread/455819?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 16:25:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeae3786-7c07-495f-8fde-393fefc4f5bb</guid><dc:creator>jswcomkr</dc:creator><description>&lt;p&gt;Thank you for your kindness.&lt;/p&gt;
&lt;p&gt;I tried to follow DFU Guides, but I cannot set the configuation in prj.conf file.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/_A4C26CD0B0B9F7C0_-2023_2D00_11_2D00_16-012311.png" /&gt;&lt;/p&gt;
&lt;p&gt;In the guide,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;# Enable most core commands.&lt;br /&gt;CONFIG_MCUMGR_CMD_IMG_MGMT=y&lt;br /&gt;CONFIG_MCUMGR_CMD_OS_MGMT=y&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But, I cannot apply these config.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How can I do?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, FOTA with Zephyr and NCS 2.5.0</title><link>https://devzone.nordicsemi.com/thread/455727?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 10:12:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a777e24-7ffa-4a3f-a28a-0c1dadaee52b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s actually quite simple as we has already integrated a lot of what you are uncertain about into the build system so that MCUBoot is build automatically as the child image. MCUBoot hex file will also be merged automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My suggestion is to take a look at this guide:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;Add DFU support to your application&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It was made for older version of NCS and there would be some small change needed when you develop for NCS v2.5.0&lt;/p&gt;
&lt;p&gt;However, the fundamental is the same that you can base on the smp_svr example and then include what inside that example into your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example when you&amp;nbsp;config:&amp;nbsp;CONFIG_BOOTLOADER_MCUBOOT=y&amp;nbsp; it will automatically include MCUBoot as the child image.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can follow the above guide, or you can also follow the FOTA guide here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf52/developing.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf52/developing.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the FOTA guide you will find that you need to add&amp;nbsp;CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y. It&amp;#39;s basically the same as what you find in SMP_SVR example:&amp;nbsp;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After you have MCUBoot included, the build system will generate the dfu_application.zip file in build\zephyr folder. You can then transfer this file to the phone and then use the nRF Device Manager app on the phone to do the FOTA update.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The FOTA update process will take care of swapping Slot 0 and Slot 1. Please try testing with &amp;quot;Confirm only&amp;quot; option in the nRF Device Manager app.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, FOTA with Zephyr and NCS 2.5.0</title><link>https://devzone.nordicsemi.com/thread/455693?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 06:31:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78960af9-f77b-4ca3-84a9-840fb5dd1899</guid><dc:creator>jswcomkr</dc:creator><description>&lt;p&gt;Thank you for replay.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think there is not enough information about MCUboot and tutorials.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I cannot understand entire schemas about relationships with mcu boot, zephyr, and ncs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How can I modify mcuboot(bootloader)? for example, I want to add printk function in bootloader, but I cannot find any source files(c, cpp) that can be modified in my project and SDK folders.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How can I understand this eco system?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Should I build firmware seprately? for example, Should I make projects for each(MCUBoot project, Main Application in Slot 0, Test applications for FOTA in Slot 1) like this?&lt;/p&gt;
&lt;p&gt;1) Bootloader : MCUBoot project(with main.c)&lt;/p&gt;
&lt;p&gt;2) Application with main c&lt;/p&gt;
&lt;p&gt;3) Test application with main c&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And what is the purpose of below codes?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/_A4C26CD0B0B9F7C0_-2023_2D00_11_2D00_15-152221.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As I know, these formats are c code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where can I use this code?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Everything is so confused.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;All I want to do is just swap firmware from slot 1 to slot 0 and I think this is not complex concept or works. But I cannot do it for a week.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please help me.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;P.S : &lt;span&gt;Should I do it like the picture below?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/4380._F8ADBCB9_1.png" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot, FOTA with Zephyr and NCS 2.5.0</title><link>https://devzone.nordicsemi.com/thread/455556?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 14:12:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47c4e702-896a-4e53-aaf9-8ca0534f5905</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think the Direct XIP mode would be the best fit for your need. You can find the documentation of this mode&amp;nbsp; here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#equal-slots-direct-xip"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#equal-slots-direct-xip&lt;/a&gt;&amp;nbsp;. You can find this:&amp;nbsp;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;At boot time the bootloader first looks for images in the slots and then inspects the version numbers in the image headers. It selects the newest image (with the highest version number) and then checks its validity (integrity check, signature verification etc.). If the image is invalid MCUboot erases its memory slot and starts to validate the other image. After a successful validation of the selected image the bootloader chain-loads it.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a new feature that just got supported in our NCS SDK in v2.5.0. You can find how to test it here:&amp;nbsp;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf52/developing.html#build-configuration-additions-for-mcuboot-in-the-direct-xip-mode"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf52/developing.html#build-configuration-additions-for-mcuboot-in-the-direct-xip-mode&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When you do &amp;quot;no revert&amp;quot; the MCUBoot will decide which image should it boot and there is no test or confirm needed. After booting it will erase the image that has lower version number (make sure you build the image with no-rever option and in the app you select the no-revert option ).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you don&amp;#39;t want to do DirectXIP and prefer the original way of FOTA I&amp;#39;m not so sure how you can make the process automatic. As far as I can see you will need to do Test - Confirm manually to choose the slot/application you want to run.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>