<?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>Copying Hex(new firmware) from external devices to internal flash slot 1 for FOTA (Zephyr)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106560/copying-hex-new-firmware-from-external-devices-to-internal-flash-slot-1-for-fota-zephyr</link><description>Hi, 
 
 I&amp;#39;m trying to make FOTA system for my project. 
 
 So I&amp;#39;m build my image with MCUBoot. 
 
 As I know, MCUBoot divides internal flash into 3 region. 
 1) MCUBoot itself region 
 2) Slot 0 for main firmware 
 3) Slot 1 for new firmware 
 (Scratch</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Dec 2023 11:10:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106560/copying-hex-new-firmware-from-external-devices-to-internal-flash-slot-1-for-fota-zephyr" /><item><title>RE: Copying Hex(new firmware) from external devices to internal flash slot 1 for FOTA (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/460518?ContentTypeID=1</link><pubDate>Fri, 15 Dec 2023 11:10:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddc66132-1103-4208-ab2c-88cbb8dd0706</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="jswcomkr"]1) Which file should I use for new image after build?[/quote]
&lt;p&gt;The file you use depends on what part of your devices firmware you want to update. This page should explain all of the generated files and what they are used for:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/output_build_files.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/output_build_files.html&lt;/a&gt;&lt;/p&gt;
[quote user="jswcomkr"]2) How can I flash slot 1 image using J-Link even through both MCUBoot and main firmware is operational.[/quote]
&lt;p&gt;This unofficial repo written by a colleague of mine&amp;nbsp;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples&lt;/a&gt;&amp;nbsp;as well as the FOTA update page for developing with nRF52 series devices&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;&amp;nbsp;should give you insight into how to perform DFU&lt;/p&gt;
&lt;p&gt;In general, you will typically have to enter a &amp;quot;bootloader mode&amp;quot; where your device is ready to receive the new firmware and update.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let me know if you&amp;#39;re able to reach your goal by following the samples and documentation proviided or if you have any additional questions&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: Copying Hex(new firmware) from external devices to internal flash slot 1 for FOTA (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/460277?ContentTypeID=1</link><pubDate>Thu, 14 Dec 2023 06:48:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:396b9865-e514-4b2d-9880-97fc5ad690f0</guid><dc:creator>jswcomkr</dc:creator><description>&lt;p&gt;Thank you for kind reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There&amp;#39;s two addictional questions.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1) Which file should I use for new image after build?&lt;/p&gt;
&lt;p&gt;For example, there are lots of output files on build/zephyr folder.&lt;/p&gt;
&lt;p&gt;It is needed to upload new image for FOTA services, but I cannot know which one is new image.&lt;/p&gt;
&lt;p&gt;I think that &amp;quot;app_signed.hex&amp;quot; file is right.&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_12_2D00_14-154143.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2) How can I flash slot 1 image using J-Link even through both MCUBoot and main firmware is operational.&lt;/p&gt;
&lt;p&gt;This is a test for MCUBoot and new firmware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Copying Hex(new firmware) from external devices to internal flash slot 1 for FOTA (Zephyr)</title><link>https://devzone.nordicsemi.com/thread/460150?ContentTypeID=1</link><pubDate>Wed, 13 Dec 2023 13:21:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41894eb8-8ef4-4f43-ba45-0117c52b7128</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]1) If I write hex file from LTE modem through UART into slot 1, is it possible that MCUBoot can recognize new image automatically?[/quote]
&lt;p&gt;Yes, that should be sufficient. You might also need to tag the image with &amp;quot;confirm&amp;quot; so that MCUBoot knows that it should move the image from slot 1 to slot 0 at the next device reboot and run the new firmware from then on. You should also be able to download the image itself through LTE and either place the blob in a storage area and then move it to slot 1 or download it directly to slot 1.&amp;nbsp;&lt;/p&gt;
[quote user=""]2) How can I build new image for FOTA? I want to change address.(From 0xC000 to 0x45000)[/quote]
&lt;p&gt;Using a static partitioning map you can define the addresses for where you want to have slot 0 and slot 1&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#adding-a-static-partition"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#adding-a-static-partition&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></channel></rss>