<?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>nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83327/nrf5340-mcuboot-fails-with-multi-image-build-at-1-8-0</link><description>Hi all, 
 I observed an issue after upgrading to 1.8.0 and to Zephyr 2.7.0-ncs1 respectively. When having Zigbee (and NET core) enabled, all images are built as before. The external flash is used to store the secondary MCUBOOT image, as defined in the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Jan 2022 15:26:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83327/nrf5340-mcuboot-fails-with-multi-image-build-at-1-8-0" /><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/349332?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 15:26:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f1768cb-6ffd-4629-9575-4bb86a6c35e6</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;m happy you got it to work!&lt;/p&gt;
&lt;p&gt;Could you open a new ticket about the watchdog, since it&amp;#39;s not related to the initial issue (bus fault at &lt;em&gt;libmetal/libmetal/lib/io.c&lt;/em&gt;)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/349331?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 15:24:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09a7fe29-5e70-4970-9932-562391517053</guid><dc:creator>mnvcsUDT</dc:creator><description>&lt;p&gt;Is there any other way, the watchdog to be enabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/349287?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 14:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e89052d4-119c-4f62-ba9c-b1304f09d4bd</guid><dc:creator>mnvcsUDT</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Sorry just missed the notification of your previous answer.&lt;/p&gt;
&lt;p&gt;I managed to get it to work with the workaround. Just needed a clean build. Thank you!!&lt;/p&gt;
&lt;p&gt;We do not need Zigbee FOTA so that part is fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/349259?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 12:58:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24d8f079-634d-4f1f-bfce-a333da579a3a</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Have you tested the suggested workaround? Does it resolve the issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/348595?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 22:12:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:622ebcf4-0293-45da-a2e1-cf6aa70722b4</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;A workaround for the issue is to set&amp;nbsp;CONFIG_NRF53_UPGRADE_NETWORK_CORE=n in the prj.conf file (assuming you don&amp;#39;t need to upgrade the Net Core application). I tested this with your sample and I no longer got the bus fault from&amp;nbsp;&lt;em&gt;modules/hal/libmetal/libmetal/lib/io.c&lt;/em&gt;. However, I had to comment out wdt_feed() and&amp;nbsp;&lt;span&gt;wdt_setup() in main.c, since it caused an&lt;/span&gt;&amp;nbsp;Instruction bus error, but that&amp;#39;s another issue.&lt;/p&gt;
&lt;p&gt;We are working on a fix for the core of the issue and I will update this ticket when get more clarity.&lt;/p&gt;
&lt;p&gt;You should be aware that we don&amp;#39;t fully support&amp;nbsp;Zigbee FOTA&amp;nbsp; on the nRF53 yet. If you have questions about this or other future/road map related questions, contact the Regional Sales Manager in your area, if you don&amp;#39;t know who this is, send me a PM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/348559?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 15:04:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4be4d2e-5410-4224-891b-d07384f8ead9</guid><dc:creator>mnvcsUDT</dc:creator><description>&lt;p&gt;Thanks Simon, and also for the regular updates.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/348546?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 14:34:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9031793e-fb0c-4c5f-ac2d-f8206caf3e14</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Seems like this is a Zigbee-specific issue, since the rpmsg_nrf53_sram area only will be included when Bluetooth is used (bluetooth specific config &lt;span&gt;BT_RPMSG_NRF53 needs to be enabled&lt;/span&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.8.0/subsys/partition_manager/CMakeLists.txt#L77"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v1.8.0/subsys/partition_manager/CMakeLists.txt#L77&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.8.0/subsys/partition_manager/pm.yml.bt_rpmsg_nrf53#L4"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v1.8.0/subsys/partition_manager/pm.yml.bt_rpmsg_nrf53#L4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As I&amp;#39;m not very familiar with Zigbee, I have asked the Zigbee experts internally and waiting for an answer. I will keep you updated.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/347805?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 15:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cea8b90-85b1-4b36-8890-58891bc1013a</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I got some tips internally and did some investigations myself and got some progress.&lt;/p&gt;
&lt;p&gt;During the zephyr kernel initialization process (before main), &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/eb0141519f9c278ed2c255f461b8eb82bd3566df/subsys/ipc/rpmsg_service/rpmsg_service.c#L164"&gt;rpmsg_service_init()&lt;/a&gt; runs, which will eventually end up in&amp;nbsp;&lt;a title="https://github.com/zephyrproject-rtos/libmetal/blob/39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb/libmetal/lib/io.c#l134" href="https://github.com/zephyrproject-rtos/libmetal/blob/39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb/libmetal/lib/io.c#L134" rel="noopener noreferrer" target="_blank"&gt;/modules/hal/libmetal/libmetal/lib/io.c:134&lt;/a&gt;&amp;nbsp;and try to write to the address 0x2007fc00, which is a part of the pcd_sram, according to the ninja pm report:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;+--------------------------------------------+
| 0x20000000: sram_primary (0x7e000 - 504kB) |
| 0x2007e000: pcd_sram (0x2000 - 8kB)        |
+--------------------------------------------+&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The pcd_sram area is read-only after mcuboot has booted, see&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/4e4e979c1998e6dad7e47011e6e076b861921645/boot/zephyr/main.c#L580"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/4e4e979c1998e6dad7e47011e6e076b861921645/boot/zephyr/main.c#L580&lt;/a&gt;. So that is why you&amp;#39;re getting a bus fault&lt;/p&gt;
&lt;p&gt;I looked in the file &amp;lt;sample&amp;gt;/build/zephyr/.config and saw these values&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_RPMSG_SERVICE_SHM_BASE_ADDRESS=0x20070000
CONFIG_RPMSG_SERVICE_SHM_SIZE=0x10000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which spans over the pcd_sram area.&lt;/p&gt;
&lt;p&gt;I compared this to the peripheral_uart sample (with mcuboot enabled) and saw that it has the same values for&amp;nbsp;RPMSG_SERVICE_SHM_BASE_ADDRESS and&amp;nbsp;RPMSG_SERVICE_SHM_SIZE, but the ninja pm report looked like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;+-----------------------------------------------+
| 0x20000000: sram_primary (0x6e000 - 440kB)    |
| 0x2006e000: pcd_sram (0x2000 - 8kB)           |
| 0x20070000: rpmsg_nrf53_sram (0x10000 - 64kB) |
+-----------------------------------------------+&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and you can see it spans over the rpmsg_nrf53_sram (which is not present in your case) instead&lt;/p&gt;
&lt;p&gt;I will continue the investigation on Monday and see how to fix this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/347395?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea0b93d2-71c3-4b99-bcb5-0b2a6d826143</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Yes, I will let you know. Sorry for the delay on this,&amp;nbsp;I&amp;#39;ve been quite busy lately. I have asked about this internally and currently waiting for a reply. I will keep you updated.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/346667?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 10:55:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98068c38-02f8-46d5-be35-cba688838638</guid><dc:creator>mnvcsUDT</dc:creator><description>&lt;p&gt;Thank you Simon. Let me know if I can assist you.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Milan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 MCUBOOT fails with multi image build at 1.8.0</title><link>https://devzone.nordicsemi.com/thread/346644?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 10:01:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35a8df7b-26e8-4fd0-a59f-2193a041259e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello Milan,&lt;/p&gt;
&lt;p&gt;This issue tricked me. I used quite long time debugging the mcuboot, thinking the issue happened there. But eventually I figured out that it actually successfully boots the main image. I ran the command&amp;nbsp;&lt;code&gt;addr2line -e zephyr.elf 0x4bdba&lt;/code&gt;&amp;nbsp;(I got this log output:&amp;nbsp;&amp;quot;&lt;em&gt;&amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): &lt;strong&gt;0x0004bdba&amp;quot;&lt;/strong&gt;&lt;/em&gt;) from &amp;lt;your project&amp;gt;/build/zephyr&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;and got the following output:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/home/simon/ncs/modules/hal/libmetal/libmetal/lib/io.c:134&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So I guess this happens during the Zephyr kernel initialization phase. I will continue to investigate this next week.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>