<?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>Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104710/linking-fails-with-config_bootloader_mcuboot-with-external-spi-flash-enabled</link><description>Hi, 
 So my project builds as is when I comment out the config option CONFIG_BOOTLOADER_MCUBOOT, or if I leave it enabled and then comment out the external flash memory decleration in the device tree file. When the build fails I get the following error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jan 2024 12:56:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104710/linking-fails-with-config_bootloader_mcuboot-with-external-spi-flash-enabled" /><item><title>RE: Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/thread/466223?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 12:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4b936c6-0630-4a3d-910d-7bc3c3fb1b5b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;1) Create folder child_image&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/pastedimage1706273724741v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;2) Create file&amp;nbsp;mcuboot.conf&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/pastedimage1706273764593v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;with this content:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI_NOR=y
CONFIG_MULTITHREADING=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/thread/461244?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 09:56:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f55d26a1-899b-4628-a5ee-32f7cfae2732</guid><dc:creator>parobin</dc:creator><description>&lt;p&gt;Yes sorry, to reproduce the problem you must also add the following code directly to the board&amp;#39;s dts (and therefore not use the project&amp;#39;s overlay) and delete the qspi&lt;br /&gt; &lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi2 {
compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
status = &amp;quot;okay&amp;quot;;
cs-gpios = &amp;lt;&amp;amp;gpio0 17 GPIO_ACTIVE_LOW&amp;gt;;
pinctrl-0 = &amp;lt;&amp;amp;spi2_default&amp;gt;;
pinctrl-1 = &amp;lt;&amp;amp;spi2_sleep&amp;gt;;
pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
mx25r64: mx25r6435f@0 {
compatible = &amp;quot;jedec,spi-nor&amp;quot;;
reg = &amp;lt;0&amp;gt;;
spi-max-frequency = &amp;lt;8000000&amp;gt;;
jedec-id = [c2 28 17];
size = &amp;lt;67108864&amp;gt;;
wp-gpios = &amp;lt;&amp;amp;gpio0 22 GPIO_ACTIVE_LOW&amp;gt;;
hold-gpios = &amp;lt;&amp;amp;gpio0 23 GPIO_ACTIVE_LOW&amp;gt;;
};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/thread/453047?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2023 13:18:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c000693e-76c8-4b29-9ec9-071188f1dc36</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I tried building this with NCS 2.5.0, but I did not get any build errors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/thread/452808?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 14:11:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4318125a-3412-4880-b0db-5dadbcfe5666</guid><dc:creator>parobin</dc:creator><description>&lt;p&gt;Hi, I have exactly the same problem.&lt;br /&gt;You can reproduce it with the jesd216&amp;nbsp;sample and the following command: west build zephyr/samples/drivers/jesd216 -b nrf52840dk_nrf52840 -p -- -DEXTRA_CONF_FILE=boards/nrf52840dk_nrf52840_spi.conf -DDTC_OVERLAY_FILE=boards/nrf52840dk_nrf52840_spi.overlay&lt;br /&gt;and setting CONFIG_BOOTLOADER_MCUBOOT=y&lt;/p&gt;
&lt;p&gt;Have you found a solution ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/thread/451540?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2023 15:19:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6f79282-68cc-4065-86d2-f909208753e7</guid><dc:creator>Sigurd</dc:creator><description>[quote user="4DoorToyota"]This however doesn&amp;#39;t look wrong to my eyes. [/quote]
&lt;p&gt;I agree, everything looks right here.&amp;nbsp; Could you post the&amp;nbsp;entire&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;quot;/build/mcuboot/zephyr/zephyr.dts&amp;quot; file, as well as these files:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;/build/zephyr/zephyr.dts&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;/build/mcuboot/zephyr/include/devictree_generated.h&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;/build/zephyr/include/devictree_generated.h&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/thread/450573?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2023 12:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a49ace30-1b7f-410e-8f2f-7a878f0333f1</guid><dc:creator>4DoorToyota</dc:creator><description>&lt;p&gt;Hi my appologies,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Everything builds and links with the CONFIG_BOOTLOADER_MCUBOOT option disabled (ie.. with all of the SPI settings). The issue I&amp;#39;m having is building with the MCUBoot option enabled since I need it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;Dug into the build directory. Looking for the error from the device tree in &amp;quot;/build/mcuboot/zephyr/include/devictree_generated.h&amp;quot; (looking for __device_dts_ord_108) shows that it is indeed the SPI bus (or the SPI device?) that is cuasing the issue:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; *   104 /soc/peripheral@50000000/i2c@a000/lis2dh12-accel@19
 *   105 /soc/peripheral@50000000/power@5000
 *   106 /soc/peripheral@50000000/power@5000/gpregret1@551c
 *   107 /soc/peripheral@50000000/power@5000/gpregret2@5520
 *   108 /soc/peripheral@50000000/spi@b000
 *   109 /soc/peripheral@50000000/spi@b000/w25q64jv@0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;(in the orginal post the missing device is&amp;nbsp;__device_dts_ord_113 but this is a refrence to a different build configuration that I didn&amp;#39;t want to post. The exact same issue is happening on both just with different id #&amp;#39;s)&lt;/p&gt;
&lt;p&gt;Finding the matching device for 108 in &amp;quot;/build/mcuboot/zephyr/zephyr.dts&amp;quot; gives the following for the devices configuration:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;spi3: feather_spi: arduino_spi: spi@b000 {
				compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
				#address-cells = &amp;lt; 0x1 &amp;gt;;
				#size-cells = &amp;lt; 0x0 &amp;gt;;
				reg = &amp;lt; 0xb000 0x1000 &amp;gt;;
				interrupts = &amp;lt; 0xb 0x1 &amp;gt;;
				max-frequency = &amp;lt; 0x7a1200 &amp;gt;;
				easydma-maxcnt-bits = &amp;lt; 0xd &amp;gt;;
				status = &amp;quot;okay&amp;quot;;
				cs-gpios = &amp;lt; &amp;amp;gpio0 0x19 0x1 &amp;gt;;
				pinctrl-0 = &amp;lt; &amp;amp;spi3_default &amp;gt;;
				pinctrl-1 = &amp;lt; &amp;amp;spi3_sleep &amp;gt;;
				pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
				w25q64: w25q64jv@0 {
					compatible = &amp;quot;jedec,spi-nor&amp;quot;;
					reg = &amp;lt; 0x0 &amp;gt;;
					spi-max-frequency = &amp;lt; 0x4c4b400 &amp;gt;;
					jedec-id = [ EF 40 17 ];
					size = &amp;lt; 0x4000000 &amp;gt;;
					has-dpd;
					t-enter-dpd = &amp;lt; 0xdac &amp;gt;;
					t-exit-dpd = &amp;lt; 0xdac &amp;gt;;
				};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This however doesn&amp;#39;t look wrong to my eyes. From what I&amp;#39;ve read however there should be an issue in the device tree configuration for the board.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking fails with CONFIG_BOOTLOADER_MCUBOOT with external SPI flash enabled</title><link>https://devzone.nordicsemi.com/thread/450564?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2023 12:28:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5579e486-e5ca-4538-8b7c-ee7564c3bb05</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;When&amp;nbsp;removing&amp;nbsp;the spi dts related things, try also to remove these configs:&lt;/p&gt;
&lt;p&gt;#SPI Stuff&lt;br /&gt;CONFIG_SPI=y&lt;br /&gt;CONFIG_SPI_NOR=y&lt;br /&gt;CONFIG_FLASH=y&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>