<?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 get a wrong image header when using ext flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95528/mcuboot-get-a-wrong-image-header-when-using-ext-flash</link><description>Hi, 
 I am using NCS 2.2.0, nRF5340. 
 A few days ago, i add NSIB to my project, but i can&amp;#39;t upgrade MCUboot. I find some puzzled quetionns after reading the MCUboot code. 
 
 In loader.c, path ${NCS_ROOT}/bootloader/mcuboot/boot/bootutil/src/loader.c</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Jan 2023 13:41:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95528/mcuboot-get-a-wrong-image-header-when-using-ext-flash" /><item><title>RE: MCUboot get a wrong image header when using ext flash</title><link>https://devzone.nordicsemi.com/thread/404572?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2023 13:41:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7465403f-bcd5-4bcb-b0a0-2ebb65173ab4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;There is an issue when using secure boot (NSIB) on the nRF5340 with external flash in nRF Connect SDK 2.2.0 This is only triggered when using ISIB. In this case MCUboot assumes all images goes to the netcore for some reason. We are looking into this but I do not have a solution at the moment.&lt;/p&gt;
&lt;p&gt;(A colleague of mine is looking into this and have a private case with a colleague of yours (case ID&amp;nbsp;301063)).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot get a wrong image header when using ext flash</title><link>https://devzone.nordicsemi.com/thread/404261?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2023 10:00:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e27952ff-0277-461d-af3a-fe1183f42d9f</guid><dc:creator>yang.hu</dc:creator><description>&lt;p&gt;By the way, this problem only happen when NSIB is added.&lt;/p&gt;
&lt;p&gt;I have a project that can upgrade application and not adding NSIB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot get a wrong image header when using ext flash</title><link>https://devzone.nordicsemi.com/thread/404256?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2023 09:55:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:910ff3fe-c697-42dc-ba53-fb46bbcb18c1</guid><dc:creator>yang.hu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;If i use&amp;nbsp;&lt;span&gt;internal flash,&amp;nbsp; after this line &amp;#39;struct&amp;nbsp;image_header&amp;nbsp;*hdr&amp;nbsp;= (struct&amp;nbsp;image_header&amp;nbsp;*)secondary_fa-&amp;gt;fa_off;&amp;#39; , i can get the true image_header data, and IMAGE_MAGIC is hdr-&amp;gt;ih_magic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But if i use&amp;nbsp;ext flash,&amp;nbsp;after this line &amp;#39;struct&amp;nbsp;image_header&amp;nbsp;*hdr&amp;nbsp;= (struct&amp;nbsp;image_header&amp;nbsp;*)secondary_fa-&amp;gt;fa_off;&amp;#39;&amp;nbsp; the hdr means nothing. The &amp;#39;secondary_fa-&amp;gt;fa_off&amp;#39; is only an address in ext flash which identify Image Header. Then, we should use &amp;#39;&amp;nbsp;&lt;/span&gt;flash_area_read()&amp;#39; to get the true data of Image Header.&lt;/p&gt;
&lt;p&gt;This thread is Using a ext flash problem, and others threads is upgrade MCUboot problem.&lt;/p&gt;
&lt;p&gt;If you think the two threads is the same issue, i will turn to other threads.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Yang Hu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot get a wrong image header when using ext flash</title><link>https://devzone.nordicsemi.com/thread/404247?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2023 09:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b874a15-f32e-4315-85c9-af64a13df623</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not see any issues here. Also, we use external flash extensively with MCUBoot in both SDK examples and reference designs, bot for nRF5340 and other devices. I see you have made other threads for specific issues so I suggest you continue in those and we close this (as it seems like it is just based on misunderstandings while reading the MCUboot code, if I am not mistaken).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>