<?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>Device tree error undefined reference to `__device_dts_ord_127&amp;#39;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96066/device-tree-error-undefined-reference-to-__device_dts_ord_127</link><description>Hi there, 
 
 i have built a custom board in devicetree. I have based it off the nrf52840DK dts but added in a magnetometer: 
 s3_mini_v1.dts 
 
 
 i am attempting to configure the magnetometer, however when ever i try to get the device instance for the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Jan 2023 13:41:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96066/device-tree-error-undefined-reference-to-__device_dts_ord_127" /><item><title>RE: Device tree error undefined reference to `__device_dts_ord_127'</title><link>https://devzone.nordicsemi.com/thread/406863?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2023 13:41:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c045491-2a88-4b30-ae45-8178ac5b2b58</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Oh I see.&lt;/p&gt;
&lt;p&gt;While it certainly isn&amp;#39;t good code practice to use a binding for a different sensor, I don&amp;#39;t really see why it shouldn&amp;#39;t compile.&lt;/p&gt;
&lt;p&gt;It could be worth looking into how the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/sensor/bh1749/README.html#bh1749"&gt;NCS BH1749 sample&lt;/a&gt; is set up.&lt;/p&gt;
&lt;p&gt;One thing I suspect is that nrf/dts/bindings might not be included in your project by default, I notice that the NCS sample has&amp;nbsp;&lt;code&gt;&lt;span&gt;target_sources&lt;/span&gt;&lt;span&gt;(app PRIVATE &lt;/span&gt;&lt;span&gt;${app_sources}&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;)&lt;/code&gt; included in their &lt;code&gt;CMakeLists.txt&lt;/code&gt;, that might be worth trying if you&amp;#39;re not already doing it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, this is what that sample&amp;#39;s compiled dts node looks like:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;i2c2: i2c@a000 {
				compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
				#address-cells = &amp;lt; 0x1 &amp;gt;;
				#size-cells = &amp;lt; 0x0 &amp;gt;;
				reg = &amp;lt; 0xa000 0x1000 &amp;gt;;
				clock-frequency = &amp;lt; 0x61a80 &amp;gt;;
				interrupts = &amp;lt; 0xa 0x1 &amp;gt;;
				status = &amp;quot;okay&amp;quot;;
				pinctrl-0 = &amp;lt; &amp;amp;i2c2_default &amp;gt;;
				pinctrl-1 = &amp;lt; &amp;amp;i2c2_sleep &amp;gt;;
				pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
				bme680: bme680@76 {
					compatible = &amp;quot;bosch,bme680&amp;quot;;
					reg = &amp;lt; 0x76 &amp;gt;;
				};
				bh1749: bh1749@38 {
					compatible = &amp;quot;rohm,bh1749&amp;quot;;
					reg = &amp;lt; 0x38 &amp;gt;;
					int-gpios = &amp;lt; &amp;amp;gpio0 0x1b 0x11 &amp;gt;;
				};
			};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;First thing I notice is they use &lt;code&gt;nrf-twim&lt;/code&gt; rather than &lt;code&gt;nrf-twi&lt;/code&gt;, maybe worth a shot.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Einar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device tree error undefined reference to `__device_dts_ord_127'</title><link>https://devzone.nordicsemi.com/thread/406669?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2023 13:34:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fe1eeab-daf1-4b29-a76b-1852456def04</guid><dc:creator>drumpros</dc:creator><description>&lt;p&gt;for me, rohm,bh1749.yaml is included in the v2.2.0 SDK:&amp;nbsp;\v2.2.0\nrf\dts\bindings\sensor\rohm,bh1749.yaml&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device tree error undefined reference to `__device_dts_ord_127'</title><link>https://devzone.nordicsemi.com/thread/406666?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2023 13:30:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a426092b-f476-4646-837e-1145253a7676</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;What do you mean it has a &amp;#39;int-gpios&amp;#39; property?&lt;/p&gt;
&lt;p&gt;Where is it defined?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device tree error undefined reference to `__device_dts_ord_127'</title><link>https://devzone.nordicsemi.com/thread/406665?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2023 13:26:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b42b706-ae42-4c12-b692-a5c0c3bebbcd</guid><dc:creator>drumpros</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have just used that for now as a template binding as it a &amp;#39;int-gpios&amp;#39; property which as far as im aware is required to call&amp;nbsp;GPIO_DT_SPEC_GET_OR. there is a LSM magnetometer&amp;nbsp; binding, but it is for a slightly different model and has a property for &amp;#39;interrupts&amp;#39; instead which seems to be an invalid syntax when calling&amp;nbsp;&lt;span&gt;GPIO_DT_SPEC_GET_OR.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are there any other bindings you would suggest for arbitrary twi properties?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device tree error undefined reference to `__device_dts_ord_127'</title><link>https://devzone.nordicsemi.com/thread/406655?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2023 12:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e4185c3-22c8-4ad2-ab48-18d983fefbeb</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;I cannot see &amp;quot;rohm,bh1749&amp;quot; on the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings.html"&gt;list of available devicetree bindings&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Have you defined it yourself?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>