<?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>bootloader project in nCS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85505/bootloader-project-in-ncs</link><description>Hi, 
 
 1. Is bootloader file and firmware file, different for projects build on nCS..? Or a single executable build file consists both bootloader &amp;amp; firmware..? 
 2. Can you suggest a sample program to build a bootloader project..? 
 
 Thanks,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Mar 2022 20:29:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85505/bootloader-project-in-ncs" /><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/359453?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2022 20:29:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9ff3208-d65c-4f58-82e4-c6ad966d82f5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am afraid I don&amp;#39;t know the immutable bootloader&amp;#39;s in&amp;#39;s and out&amp;#39;s at this point in time, other than pointing at the documentation. In short, the immutable bootloader is a separate bootloader that will have the possiblilty to update the mcuboot bootloader. It is not possible to update the immutable bootloader itself.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding your image, the network core will also have a small portion belonging to the mcuboot bootloader.&amp;nbsp;&lt;/p&gt;
[quote user="Ubaid_M"]&lt;p&gt;&lt;strong&gt;Should I consider another 30kb for immutable bootloader..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;the immutable bootloader should be smaller than the mcuboot botloader.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did you check out the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_bootloader_adding.html#adding-a-bootloader-chain"&gt;documentation for the immutable bootloader&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/359080?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 11:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ae67072-1c61-4967-8f73-443e9de1c53c</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Thanks for the info.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/359024#359024"] You need to use an immutable[/quote]
&lt;p&gt;So I am to understand that, to have an updatable mcuboot bootloader,&amp;nbsp;&lt;br /&gt;&lt;strong&gt;I need to have a nRF Secure immutable bootloader and then I can have&amp;nbsp;updatable mcuboot bootloader..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;1. How will immutable bootloader occupy memory memory as per my design..?&lt;/strong&gt;&lt;br /&gt;That is:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="108934" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/358950#358950"]Now the memory breakdown of my device is as:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3666.Nordic.png" style="cursor:zoom-in;" /&gt;[/quote]
&lt;p&gt;&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Should I consider another 30kb for immutable bootloader..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;strong&gt;3. Can you please suggest a sample program demonstrating&amp;nbsp;nRF Secure immutable bootloader updating upgradable mcuboot bootloader..?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Ubaid&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/359024?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 08:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbbf7242-7908-46f6-8e89-cc83f83c6bbe</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have not tested DFU using external flash before, but perhaps you can try using:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/kconfig/CONFIG_NORDIC_QSPI_NOR.html#std-kconfig-CONFIG_NORDIC_QSPI_NOR"&gt;CONFIG_NORDIC_QSPI_NOR&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Ubaid_M"]1. Please point me or help me with an example mcuboot project with copies from external memory to internal memory as in my requirement above, I need to get an idea on where mcuboot source code needs to be tweaked and how..?! Along with the details on how dts file would look for this.[/quote]
&lt;p&gt;Sorry, but I am no dts expert. Please open a separate ticket on this matter. I am sorry that I can&amp;#39;t help you with that.&lt;/p&gt;
[quote user="Ubaid_M"]2. But what about mcuboot..? How will I update mcuboot in this case..? as the firmware update is happening wirelessly and programmer cannot help here..?[/quote]
&lt;p&gt;If you need to change the key in the bootloader, then you need to update the bootloader (entirely). In order to do so, please study the section:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_bootloader_adding.html#ug-bootloader-adding"&gt;Adding an immutable bootloader&lt;/a&gt;.&lt;/p&gt;
[quote user="Ubaid_M"]3. Crazy idea, if we know where exactly in mcuboot memory the firmware signing key is stored.! can we use DFU app to access the memory and update only the key..? How to&amp;nbsp;know the key address if this is possible..?[/quote]
&lt;p&gt;I see where you are going, but unfortunately, this is not possible. You need to use an immutable bootloader (preferably with a different key, if the original key is already compromized. Even if you knew exactly where the key was located, it is not possible to update a section in flash without deleting the entire flash page where this is located., also erasing a lot of your bootloader. I would also be surprised if the bootloader didn&amp;#39;t protect it&amp;#39;s own flash area before starting the application, so that actually doing this wouldn&amp;#39;t typically be possible without updating the bootloader either way (to turn off the protection).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/358950?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2022 10:49:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39053b36-d113-445c-bbe2-af744f744842</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello &lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I will try to keep my problem definition brief, my device is a nrf528333dk interfaced with a 512kb serial flash memory.&lt;br /&gt;I have a requirement to update the firmware for my device via BLE. which I can work with the dfu app.&lt;br /&gt;Now the memory breakdown of my device is as:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3666.Nordic.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The DFU app will download the updated firmware file via BLE interface into SLOT-1 which is in my external memory. After successful download, the DFU app will initiate a soft reboot which gives the control over to mcuboot.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;mcuboot is now supposed to overwrite SLOT-0 with contents of SLOT-1.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Please point me or help me with an example mcuboot project with copies from external memory to internal memory as in my requirement above, I need to get an idea on where mcuboot source code needs to be tweaked and how..?! Along with the details on how dts file would look for this.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/358780#358780"]You need to program the bootloader using a programmer[/quote]
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Post this, comes my second challenge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If say the signed key of firmware is compromised or i will need to update the key on new firmware. Here I can built firmware on new key and DFU will copy the new firmware via BLE on SLOT-1.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. But what about mcuboot..? How will I update mcuboot in this case..? as the firmware update is happening wirelessly and programmer cannot help here..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Crazy idea, if we know where exactly in mcuboot memory the firmware signing key is stored.! can we use DFU app to access the memory and update only the key..? How to&amp;nbsp;know the key address if this is possible..?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Appreciate your help.&lt;br /&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/358780?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 08:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c803788-aaa9-4a3b-97f0-32cc8338fcc3</guid><dc:creator>Edvin</dc:creator><description>[quote user="Ubaid_M"]Can you please suggest who copies bootloader code from hex file onto memory location 0x000 on the target board..?[/quote]
&lt;p&gt;You need to program the bootloader using a programmer.&lt;/p&gt;
[quote user="Ubaid_M"]what is the size overhead added by enabling MCU_BOOT on the firmware file, by enabling and disabling CONFIG_MCUBOOT I found that 17kb size difference of .bin file was the difference, is this fine..?[/quote]
&lt;p&gt;It says when you compile your project. Both the compiler will give some output on each child image (the mcuboot is a child image) and you can see it in the partitions.yml file in your build folder.&lt;/p&gt;
[quote user="Ubaid_M"]Can I compile mcboot separately..?[/quote]
&lt;p&gt;Yes, but no need to do that. For all practical reasons, you would want to do it with your application.&lt;/p&gt;
[quote user="Ubaid_M"]&lt;p&gt;&lt;strong&gt;4. Can you please refer me to a link wherein I can find sample programs on mcuboot..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Please follow the instructions from &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf52.html#fota-upgrades"&gt;FOTA upgrades for the 52 series&lt;/a&gt;&amp;nbsp;in our documentation, which points to the smp_svr as an example, or you can check &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;this guide, which is a step by step blog post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/358567?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 09:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:731c7d65-3cfe-41d3-a65e-da05a2c7636c</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;blockquote class="quote"&gt;
&lt;div class="quote-user"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/85505/bootloader-project-in-ncs/356831#356831"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/356831#356831"]bootloader is located at address 0x0[/quote]
&lt;p&gt;&lt;strong&gt;1. Can you please suggest who copies bootloader code from hex file onto memory location 0x000 on the target board..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.&amp;nbsp;what is the size overhead added by enabling MCU_BOOT on the firmware file, by enabling and disabling CONFIG_MCUBOOT I found that 17kb size difference of .bin file was the difference, is this fine..?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Can I compile mcboot separately..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Can you please refer me to a link wherein I can find sample programs on mcuboot..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Ubaid&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/358142?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 09:01:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:613f5a37-fe47-4fcc-90bf-925490eb4600</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Thank you Edvin,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/356831#356831"]the bootloader is located at address 0x0[/quote]
&lt;p&gt;&lt;strong&gt;Can you please suggest who copies bootloader code from hex file onto memory location 0x000..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And also what is the size overhead added by enabling MCU_BOOT on the firmware file..?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Can i compile mcboot separately..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Ubaid&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/358125?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 08:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9069f2c-ed82-4c10-925b-fde348f44c2e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please see the v1.9.1\bootloader\mcuboot\boot\zephyr (that is the project folder, containing the main.c for the bootloader. You can see that if you follow the guide from one of the links, it should print something like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
I: Starting bootloader

I: Primary image: magic=bad, swap_type=0x0, copy_done=0x2, image_ok=0x2

I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3

I: Boot source: none

I: Swap type: none

I: Bootloader chainload address offset: 0xc000

I: Jumping to the first image slot
*** Booting Zephyr OS build v2.7.99-ncs1  ***
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The first and last line is coming from that main.c file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/358103?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 07:02:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bdaab97-1c53-471b-8d7f-b5d3d0a79d44</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/357982#357982"]The MCUBOOT bootloader project is located in ncs &amp;lt;vX.Y.Z&amp;gt;\bootloader\mcuboot.[/quote]
&lt;p&gt;Where can i find the mcuboot source code..?&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/357982#357982"]What chip are you using? [/quote]
&lt;p&gt;I am using nrf52833dk_nrf52833 board with an external flash IS25LQ040B.&lt;br /&gt;The interface is SPI single line &amp;amp; not QSPI.&lt;br /&gt;&lt;br /&gt;That is, i need to change&amp;nbsp;&lt;span&gt;mcuboot&amp;nbsp;source code to provide, SPI access to it, so that&amp;nbsp; mcuboot can copy new firmware file from external flash to internal flash.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/357999?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 14:45:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2f5030a-d702-4c7a-8192-cf8c945ff253</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/357982#357982"]The MCUBOOT bootloader project is located in ncs &amp;lt;vX.Y.Z&amp;gt;\bootloader\mcuboot.[/quote]
&lt;p&gt;&lt;strong&gt;1. So i can tweak in the and make changes to mcuboot source code from here right..?&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Another query i had was with copying of mcuboot,&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/356831#356831"]So in this case you can see that the bootloader is located at address 0x0[/quote]
&lt;p&gt;&lt;strong&gt;2. WHO does this copying of mcuboot onto device memory location 0x00..?&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Thanking you,&lt;/p&gt;
&lt;p&gt;Ubaid&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/357982?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 14:14:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79f8a329-caca-4680-85b9-27791f52fd5b</guid><dc:creator>Edvin</dc:creator><description>[quote user="Ubaid_M"]&lt;p&gt;&lt;strong&gt;1. I want to map&amp;nbsp;SLOT-1 &amp;amp; SCRATCH memory locations to external serial flash locations.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. I want to provide&amp;nbsp;mcuboot&amp;nbsp;SPI interface APIs to interact with external flash.&lt;/strong&gt;&lt;/p&gt;[/quote]
&lt;p&gt;What chip are you using? I believe it is possible to offload this to an external QSPI flash chip by using&amp;nbsp;CONFIG_NORDIC_QSPI_NOR=y. Without knowing the details, perhaps you can look into what this does, and try to implement something similar using SPI.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The MCUBOOT bootloader project is located in ncs &amp;lt;vX.Y.Z&amp;gt;\bootloader\mcuboot.&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/357706?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 14:33:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f005f2d-f27e-4c1e-bc5e-fe9144eb6cad</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/357218#357218"]CONFIG_BOOT_SIGNATURE_KEY_FILE[/quote]
&lt;p&gt;Thank you for the suggestion, it helps.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Further, I understand the usual way mcuboot works with SLOT-0, SLOT-1 &amp;amp; SCRATCH memory locations towards swapping of images for firmware update.&lt;/p&gt;
&lt;p&gt;I want to customize a few things here,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. I want to map&amp;nbsp;SLOT-1 &amp;amp; SCRATCH memory locations to external serial flash locations.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. I want to provide&amp;nbsp;mcuboot&amp;nbsp;SPI interface APIs to interact with external flash.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, for the above 2 requirements, kindly suggest how and where I can tweak &amp;amp; build the mcuboot source code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If any sample is available wherein mcuboot source code is modified, it would be great.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ubaid&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/357218?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 14:51:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da05ac0f-04ca-49df-9031-b5a6c99e407b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Please see this link on how to generate new key pairs.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/tfm/docs/technical_references/design_docs/tfm_secure_boot.html#second-stage-bootloader-in-tf-m"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/tfm/docs/technical_references/design_docs/tfm_secure_boot.html#second-stage-bootloader-in-tf-m&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is also a Kconfig definition&lt;/p&gt;
&lt;p&gt;CONFIG_BOOT_SIGNATURE_KEY_FILE (described as &amp;quot;config BOOT_SIGNATURE_KEY_FILE&amp;quot; in NCS\nrf\modules\mcuboot\Kconfig) where you can set the absolute path of the key file that you have generated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/357210?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 14:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cb23bb0-da19-4495-826b-49fdae671d7c</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/357208#357208"]Then there is no bootloader. The application will be located at 0x00.[/quote]
&lt;p&gt;It is clearer now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now if I want to generate a private key and add it into the MCUBOOT, what process do I follow..?&lt;br /&gt;&lt;br /&gt;Please suggest.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/357208?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 14:25:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94ef4590-39b9-4c1d-ab0a-b7f668bdc265</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Ubaid_M"]1. How does how does the image boot if I have not enabled&amp;nbsp;CONFIG_BOOTLOADER_MCUBOOT=y..?[/quote]
&lt;p&gt;Then there is no bootloader. The application will be located at 0x00.&lt;/p&gt;
[quote user="Ubaid_M"]&lt;p&gt;&lt;strong&gt;Some preexisting bootloader does the job or if system does not find anything at the address,&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;no. See 1.&lt;/p&gt;
[quote user="Ubaid_M"]3. Can you please suggest if this &amp;quot;BOOTLOADER_MCUBOOT&amp;quot; checks for firmware file image code signing before booting the image..?[/quote]
&lt;p&gt;Yes it does.&lt;/p&gt;
[quote user="Ubaid_M"]4. If it does, how does it use the key for code signing check on the firmware file..?[/quote]
&lt;p&gt;It uses a default key, which you should see when you compile. Some message saying that this is a default key which should not be used for production, and that you should change it.&lt;/p&gt;
[quote user="Ubaid_M"]5. How can I update this key..?[/quote]
&lt;p&gt;I believe it says in the same warning.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/356847?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 11:22:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2e5b8ff-94e2-4e96-8780-197fd09f788f</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the info,&lt;/p&gt;
&lt;p&gt;Further,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. How does how does the image boot if I have not enabled&amp;nbsp;CONFIG_BOOTLOADER_MCUBOOT=y..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Some preexisting bootloader does the job or if system does not find anything at the address,&lt;/strong&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/356831#356831"] bootloader is located at address 0x0[/quote]
&lt;p&gt;&lt;strong&gt;It will straight away jump to the firmware file address&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/356831#356831"]app is located at 0xc200[/quote]
&lt;p&gt;&lt;strong&gt;..??&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Can you please suggest if this &amp;quot;BOOTLOADER_MCUBOOT&amp;quot; checks for firmware file image code signing before booting the image..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. If it does, how does it use the key for code signing check on the firmware file..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. How can I update this key..?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/356831?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 10:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18d38711-4fec-4d75-93ab-d8ca9d00cf3d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;1: By enabling MCUBOOT the compiler will build the MCUBOOT bootloader for you, and add it to the build folder. This means that when you flash your project, it will flash the bootloader and the application. Also, when you build, it will build the uppdate binary file in build\zephyr\app_update.bin, so if you do any updates, you can use this to update using DFU.&lt;/p&gt;
&lt;p&gt;2: In the beginning. After enabling CONFIG_BOOTLOADER_MCUBOOT=y your build folder will contain a file called partitions.yml, which will list all the partitions in the flash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;part of this file will say something like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xc200
  end_address: 0x80000
  region: flash_primary
  size: 0x73e00
littlefs_storage:
  address: 0xf8000
  end_address: 0xfe000
  placement:
    align:
      start: 0x4000
    before:
    - end
  region: flash_primary
  size: 0x6000
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So in this case you can see that the bootloader is located at address 0x0, while the app is located at 0xc200.&lt;/p&gt;
&lt;p&gt;3: Depending on what chip you are working on. If your chip only have one core, then the build folder will have one .hex file that is called either zephyr.hex or merged.hex. If you have several cores, then there will be a separate file for each core. However, the bootloader will be included in the files if CONFIG_BOOTLOADER_MCUBOOT=y.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/356808?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 09:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccca268d-d97d-4c14-aa5b-6806b1043c57</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85505/bootloader-project-in-ncs/356629#356629"]And there is also a written guide on how to add DFU to your project,[/quote]
&lt;p&gt;Towards DFU, i see that we make the following configuration to the project:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So,&lt;br /&gt;&lt;em&gt;&lt;strong&gt;1. By enabling MCUBOOT what happens..?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;2. Where is the bootloader image file in the device memory..?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;3. Is the boot loader image file different than firmware image file or bootloader code is integrated into the&amp;nbsp;firmware image file..?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/356629?ContentTypeID=1</link><pubDate>Mon, 07 Mar 2022 13:45:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:925b6ddf-c87a-4f21-975c-a40f20afc9c0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;In NCS, the bootloader is enabled through configurations, mostly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest that you check out the documentation of FOTA upgrades:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_nrf52.html#fota-upgrades"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_nrf52.html#fota-upgrades&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And there is also a written guide on how to add DFU to your project, that I can recommend:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you struggle with the implementation, I suggest that you follow the guide first, and add DFU to the smp_svr sample from NCS, so that you know that everything around (uploading via nRF Connect for iOS/Android/mcumgr) is working as it should, before you start looking into potential issues in your custom application.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader project in nCS</title><link>https://devzone.nordicsemi.com/thread/356619?ContentTypeID=1</link><pubDate>Mon, 07 Mar 2022 13:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14bade3d-0c87-43f0-9120-0104931de0d9</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Also,&lt;br /&gt;&lt;br /&gt;3. I would like to know more about &amp;quot;mcuboot&amp;quot; that nCS uses.&lt;br /&gt;Kindly suggest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>