<?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>nRF91: questions related to merged image (App , smp &amp;amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58854/nrf91-questions-related-to-merged-image-app-smp-mcuboot</link><description>Hi, 
 Sorry for putting so many questions in to single thread :) 
 ---- 
 I am looking for information on what all images been integrated to zephyr/merged.hex, can you point to the scripts which does this? 
 Whenever i choose board = nrf9160_pca10090ns</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Mar 2020 14:58:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58854/nrf91-questions-related-to-merged-image-app-smp-mcuboot" /><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/241906?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 14:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ba2aaad-09da-4d70-9ae9-6539120f6a03</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;MCUBOOT is the mcuboot image. MCUBOOT_SCRATCH is the space dedicated for image swapping. MCUBOOT_STORAGE is for storing images. MCUBOOT_PAD is an optional trailer on the image that indicates that the image should be considered an upgrade. Writing this image in the secondary slot will then cause the bootloader to upgrade to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/241663?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 17:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4b3f317-3e43-49a6-83a2-938168fd1a1a</guid><dc:creator>kk2mkk</dc:creator><description>&lt;p&gt;Thanks, I think the is no documentation available for whatever we discussed above, it would be great you can add some.&lt;/p&gt;
&lt;p&gt;rom_report when mcuboot is enabled&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1585158408050v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;More options can be learnt from build.ninja file located in the build folder.&lt;/p&gt;
&lt;p&gt;MCUboot regions can be altered from mcuboot&amp;#39;s menuconfig&lt;/p&gt;
&lt;p&gt;&amp;lt;builld dir&amp;gt;\mcuboot&amp;gt;ninja menuconfig&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1585159227912v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Can you please help me understand what each of the macros above (highlighted in yellow) stands for?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;KK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/241595?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 12:30:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25a9ff2e-673b-486e-81bc-691dc3136ff3</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;The .dts file you&amp;#39;re referring to does not show the correct memory placement. You can run &amp;quot;ninja rom_report&amp;quot; from build folder to get the memory layout, or you can look at the linker script.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/241208?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 16:01:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa678e7e-f6be-49eb-a68a-d7312813d394</guid><dc:creator>kk2mkk</dc:creator><description>[quote userid="73166" url="~/f/nordic-q-a/58854/nrf91-questions-related-to-merged-image-app-smp-mcuboot/241188"]can you help me understand what going on there?[/quote]
&lt;p&gt;My questions is why my application starting form @0x0001c200, as per the .dts the unsecured application image should start form &lt;strong&gt;@0x00040000???&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/241188?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 14:55:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7af49a6-9cb4-45c6-881c-2b3f10493abc</guid><dc:creator>Hakon</dc:creator><description>[quote user="kk2mkk"]can you help me understand what going on there?[/quote]
&lt;p&gt;&amp;nbsp;There might be some overlap between the files, but that should be taken care of by the mergehex script with the --overlap=replace flag included if I&amp;#39;m not mistaken.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/240575?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 09:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b77e6640-e348-4207-afa6-b90f0e83c526</guid><dc:creator>kk2mkk</dc:creator><description>&lt;table width="335"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="64"&gt;Image&lt;/td&gt;
&lt;td width="79"&gt;Address&lt;/td&gt;
&lt;td width="192"&gt;Location&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;1&lt;/td&gt;
&lt;td&gt;0x00000000&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0x00008960&lt;/td&gt;
&lt;td&gt;mcuboot/zephyr/zephyr.hex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;2&lt;/td&gt;
&lt;td&gt;0x00010200&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0x00017ff0&lt;/td&gt;
&lt;td&gt;spm/zephyr/zephyr.hex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;3&lt;/td&gt;
&lt;td&gt;0x00010200&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0x0002a77a&lt;/td&gt;
&lt;td&gt;zephyr/mcuboot_primary.hex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;4&lt;/td&gt;
&lt;td&gt;0x0001c200&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0x0002a770&lt;/td&gt;
&lt;td&gt;zephyr/zephyr.hex&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td rowspan="2"&gt;5&lt;/td&gt;
&lt;td&gt;0x00010000&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0x0002a8c0&lt;/td&gt;
&lt;td&gt;zephyr/app_signed.hex&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I did some analysis on where the individual images address are mapped in the flash and i found that only 1&amp;amp; 5 images are sufficient for your application to get up and running.&lt;/p&gt;
&lt;p&gt;Image 5 is combination of images 2,3 &amp;amp; 4.&lt;/p&gt;
&lt;p&gt;As per the&lt;strong&gt;&amp;nbsp;nrf9160_pca10090_common.dts&lt;/strong&gt; file the &lt;strong&gt;SPM&lt;/strong&gt; should be places &lt;strong&gt;@0x00010000&lt;/strong&gt; and user &lt;strong&gt;app&lt;/strong&gt; &lt;strong&gt;@0x00040000&lt;/strong&gt; but here its starting @0x0001c200, can you help me understand what going on there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/240501?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2020 16:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e42c2ef-dc02-4844-8376-fbf96a80e098</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;One more update. I was able to flash the images separately by running&lt;/p&gt;
&lt;p&gt;nrfjprog -f nrf91 --program mcuboot/zephyr/zephyr.hex --sectorerase&lt;br /&gt;nrfjprog -f nrf91 --program spm/zephyr/zephyr.hex --sectorerase&lt;br /&gt;nrfjprog -f nrf91 --program zephyr/mcuboot_primary.hex --sectorerase&lt;br /&gt;nrfjprog -f nrf91 --program zephyr/zephyr.hex --sectorerase&lt;br /&gt;nrfjprog -f nrf91 --program zephyr/app_signed.hex --sectorerase&lt;/p&gt;
&lt;p&gt;in this specific order. Then after that the application would boot properly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/240118?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 17:22:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5c4d79a-74cd-428b-b8a8-2c3525737624</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;You probably need to sign the application image before flashing it. You can sign it with &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/imgtool.html"&gt;imgtool&lt;/a&gt;. I&amp;#39;m testing this right now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/239860?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 05:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:937de8a5-8b0a-4526-8187-265a8680e64f</guid><dc:creator>SharathMalve</dc:creator><description>&lt;p&gt;Hi , based on the memory layout, 256KB may be insufficient for our application consider future scalability. Can you pl help in modifying the memory layout to get something around 350K-400K for the application&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sharath&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/239535?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 13:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3b9c19f-5a42-444d-9786-f724022e2ec2</guid><dc:creator>kk2mkk</dc:creator><description>[quote userid="73166" url="~/f/nordic-q-a/58854/nrf91-questions-related-to-merged-image-app-smp-mcuboot/239181"]You can change the memory allocation of SPM, mcuboot; and application by using the partition manager. You will find the documentation &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html"&gt;here&lt;/a&gt;.[/quote]
&lt;p&gt;I gone through the documentation pointed above but it dint explains anything about the memory map of any sample projects, but i learnt something about mcuboot+spm+app for the dts file &amp;quot;~\ncs\zephyr\boards\arm\nrf9160_pca10090\nrf9160_pca10090_common.dts&amp;quot; and other threads&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1584019126311v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52329/what-address-to-manually-flash-zephyr-and-application/216304#216304" rel="noopener noreferrer" target="_blank"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/52329/what-address-to-manually-flash-zephyr-and-application/216304#216304&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46787/application-won-t-run---erroneous-flash-address-range"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/46787/application-won-t-run---erroneous-flash-address-range&lt;/a&gt;&lt;/p&gt;
[quote userid="73166" url="~/f/nordic-q-a/58854/nrf91-questions-related-to-merged-image-app-smp-mcuboot/239509"]Do you have any more information other than &amp;quot;The board dint boots up&amp;quot;? Like output log and error messages.[/quote]
&lt;p&gt;I have enabled the CONFIG_BOOTLOADER_MCUBOOT=y in my project and then flashing the following three file using JLINK&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;MCUboot zephyr image &amp;nbsp;&amp;nbsp; &amp;nbsp;\build_nrf9160_pca10090ns\mcuboot\zephyr\zephyr.hex&lt;/li&gt;
&lt;li&gt;SPM zephyr image &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; \build_nrf9160_pca10090ns\spm\zephyr\zephyr.hex&lt;/li&gt;
&lt;li&gt;user app zephyr image &amp;nbsp;&amp;nbsp; &amp;nbsp;\build_nrf9160_pca10090ns\zephyr\zephyr.hex&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After reset i see the below error message&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;*** Booting Zephyr OS build v2.1.99-ncs1-2-g30f47eace36c&amp;nbsp; ***&lt;br /&gt;[00:00:00.006,134] [0m&amp;lt;inf&amp;gt; mcuboot: Starting bootloader[0m&lt;br /&gt;[00:00:00.014,282] [0m&amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3[0m&lt;br /&gt;[00:00:00.027,557] [0m&amp;lt;inf&amp;gt; mcuboot: Boot source: none[0m&lt;br /&gt;[00:00:00.034,667] [1;33m&amp;lt;wrn&amp;gt; mcuboot: Failed reading image headers; Image=0[0m&lt;br /&gt;[00:00:00.044,433] [1;31m&amp;lt;err&amp;gt; mcuboot: Unable to find bootable image[0m&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/239509?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 11:29:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7710a7e1-c62c-4d63-a204-a06d6a3f3ef5</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Do you have any more information other than &amp;quot;The board dint boots up&amp;quot;? Like output log and error messages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/239322?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 12:36:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f249c717-d4b9-4a42-b160-dc9451e94d8b</guid><dc:creator>kk2mkk</dc:creator><description>&lt;p&gt;Considering the &amp;quot;http_application_update&amp;quot;, can you please let me know how the flash memory locations are done for MCUboot, SPM &amp;amp; my APP?&lt;/p&gt;
[quote userid="73166" url="~/f/nordic-q-a/58854/nrf91-questions-related-to-merged-image-app-smp-mcuboot/238673"]You find the relevant files in the build folder in build/zephyr/zephyr.hex and build/spm/zephyr/zephyr.hex respectively[/quote]
&lt;p&gt;The board dint boots up if i flash the images individually as per your suggestion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/239181?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 15:32:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2332ffc9-cba7-4267-9c80-1f70eaa9fbc1</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;You can change the memory allocation of SPM, mcuboot; and application by using the partition manager. You will find the documentation &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/238674?ContentTypeID=1</link><pubDate>Sun, 08 Mar 2020 16:27:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0f29af0-fb6f-43d9-9a1b-e63c7f9e8de1</guid><dc:creator>kk2mkk</dc:creator><description>&lt;p&gt;HI Hakon,&lt;/p&gt;
&lt;p&gt;I have got only partial answer to my questions, can you point me to the documentation where it described the memory map of bootloader, spm and sample app(http_application_update) are build, and how to control the allocation of memory regions?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;KK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF91: questions related to merged image (App , smp &amp;  mcuboot)</title><link>https://devzone.nordicsemi.com/thread/238673?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 13:34:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47ea67d9-6549-4527-ba03-8e581c5a2031</guid><dc:creator>Hakon</dc:creator><description>[quote user=""]Can I flash the app and spm separately using jlink?[/quote]
&lt;p&gt;&amp;nbsp;Yes, using nrfjprog or Segger you can flash the images separately, You find the relevant files in the build folder in build/zephyr/zephyr.hex and build/spm/zephyr/zephyr.hex respectively. I don&amp;#39;t think you can use west though, or at least I haven&amp;#39;t figured out how to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>