<?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>nRF Connect cannot find instance for mcp2515 / nrfx spi / nrf21540 drivers during build, even though they were defined in the devicetree</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121053/nrf-connect-cannot-find-instance-for-mcp2515-nrfx-spi-nrf21540-drivers-during-build-even-though-they-were-defined-in-the-devicetree</link><description>Hi, I tried to migrate my project from nRF Connect SDK v2.5.3 to v2.9.0, switching to sysbuild and creating my own board definition instead of using a overlay file. 
 I decided to go for v2.9.0 because I used this version for another project already and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Apr 2025 14:51:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121053/nrf-connect-cannot-find-instance-for-mcp2515-nrfx-spi-nrf21540-drivers-during-build-even-though-they-were-defined-in-the-devicetree" /><item><title>RE: nRF Connect cannot find instance for mcp2515 / nrfx spi / nrf21540 drivers during build, even though they were defined in the devicetree</title><link>https://devzone.nordicsemi.com/thread/533439?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2025 14:51:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e39b0cbe-3817-482b-bf65-600ef5a6deac</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Hi Vidar, thanks to your help, I could fix the problem.&lt;/p&gt;
&lt;p&gt;Device ID 21 was pointing to a memory address associated with the GPIO1 hardware:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; *   21  /soc/peripheral@50000000/gpio@842800&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I had similar problems with the nrfx spi driver (maybe it was used indirectly by some other driver) and the nRF21540 fem driver. Everything worked when I added the following definitions to both app core and net core device trees in my board definition:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio1 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect cannot find instance for mcp2515 driver even though it was defined in the devicetree</title><link>https://devzone.nordicsemi.com/thread/533376?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2025 11:44:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:850d8999-d105-4c02-9e7a-597d2623beaf</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Michael,&lt;/p&gt;
&lt;p&gt;Please check if&amp;nbsp;CONFIG_CAN_MCP2515 ended up being selected in your .config file (build/&amp;lt;project name&amp;gt;/zephyr/.config). It would also be good to know which device is being referenced here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:/ncs/v2.9.0/zephyr/include/zephyr/device.h:92:41: error: &amp;#39;__device_dts_ord_21&amp;#39; undeclared here (not in a function); did you mean &amp;#39;__device_dts_ord_24&amp;#39;?
   92 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/build/dts/troubleshooting.html#troubleshooting-devicetree"&gt;https://docs.zephyrproject.org/latest/build/dts/troubleshooting.html#troubleshooting-devicetree&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can look up the ordinal number &amp;#39;21&amp;#39; in&amp;nbsp;&lt;span&gt;build/MyProject/zephyr/include/generated/zephyr/devicetree_generated.h&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>