<?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>Error when trying to add MCU BOOT functionality on a basic blinky example using Zephry/nRF Connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112849/error-when-trying-to-add-mcu-boot-functionality-on-a-basic-blinky-example-using-zephry-nrf-connect</link><description>I wanted to get FOTA running on a PineTime devkit board (nrf52832) just to test and see if it works, but am getting the following error message: 
 
 
 /opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Jul 2024 13:31:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112849/error-when-trying-to-add-mcu-boot-functionality-on-a-basic-blinky-example-using-zephry-nrf-connect" /><item><title>RE: Error when trying to add MCU BOOT functionality on a basic blinky example using Zephry/nRF Connect</title><link>https://devzone.nordicsemi.com/thread/493175?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 13:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aef431ae-0471-4611-aa2d-c9d92f6795c9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Good to hear. Yes, the Pinetime board is placing the secondary slot along with the storage partition in the external flash here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/588ae3982bb59bcedc0151cd6619c7672c53537d/boards/arm/pinetime_devkit0/pinetime_devkit0.dts#L151"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/588ae3982bb59bcedc0151cd6619c7672c53537d/boards/arm/pinetime_devkit0/pinetime_devkit0.dts#L151&lt;/a&gt;. However, if you want to do the same&amp;nbsp;in the nRF Connect SDK, you need to do it through the Partition Manager as outlined in the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/config_and_build/bootloaders/bootloader_external_flash.html"&gt;Using external flash memory partitions&lt;/a&gt;&amp;nbsp;section of the SDK documentation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that you can check the current flash partition layout in your project by running the &amp;#39;Memory report&amp;#39; action in the VS code extension.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1720618268011v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to add MCU BOOT functionality on a basic blinky example using Zephry/nRF Connect</title><link>https://devzone.nordicsemi.com/thread/493173?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 13:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6effe17-4e6f-4898-975c-3adbbaa8a2bb</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;That worked. Thank you. It did build. I thought it might have to do with incorrect partitions which seem to be a requirement according to &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/mcuboot/readme-zephyr.html"&gt;this article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It states:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The first step required for Zephyr is making sure your board has flash partitions defined in its device tree. These partitions are:&lt;/span&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;
&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;boot_partition&lt;/span&gt;&lt;/code&gt;: for MCUboot itself&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;slot0_partition&lt;/span&gt;&lt;/code&gt;: the primary slot of Image 0&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;slot1_partition&lt;/span&gt;&lt;/code&gt;: the secondary slot of Image 0&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;While the pintime_devkit0.dts had:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		/* MCUboot bootloader */
		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0xc000&amp;gt;;
		};

		/* main firmware partition */
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x74000&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to add MCU BOOT functionality on a basic blinky example using Zephry/nRF Connect</title><link>https://devzone.nordicsemi.com/thread/493163?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 12:53:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dce5edef-b0e0-48e7-bb77-42516f22b311</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The problem is that the&amp;nbsp;&lt;span&gt;PineTime board enables the &amp;#39;&lt;/span&gt;xt25fb32&amp;#39; flash NOR device on the spi1 bus by default in the devicetree, and the linker error is&amp;nbsp;a result of&amp;nbsp;the SPI driver not being included in the bootloader build.&lt;/p&gt;
&lt;p&gt;Assuming you don&amp;#39;t want to use this FLASH NOR device in your bootloader, you can create a devicetree overlay to disable the device for mcuboot. To apply a devicetree overlay for the child image, you can create a folder named &amp;#39;chilld_image&amp;#39; in your project root with the &amp;#39;mcuboot.overlay&amp;#39; file. Folder structure should be as follows (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/config_and_build/multi_image.html#permanent_configuration_changes_to_child_images"&gt;Permanent configuration changes to child images&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;blinky_ble/child_image/&lt;br /&gt;└── mcuboot.overlay&lt;/p&gt;
&lt;p&gt;And the mcuboot.overlay should contain the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/delete-node/ &amp;amp;xt25fb32;

&amp;amp;spi1 {
    status = &amp;quot;disabled&amp;quot;; 
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After you have adding the child_image folder with the mcuboot.overlay, you can perform a pristine build to ensure the overlay is applied to the mcuboot build.&amp;nbsp;&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/pastedimage1720615962286v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>