<?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>out of tree driver; builds, links but not in map</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98015/out-of-tree-driver-builds-links-but-not-in-map</link><description>I have an out of tree driver (vl53l1x) building and linking for an out of tree board which works. However, another driver for bmi088, builds, appears to link but does not appear in the map files which leads to this error when I try and use the sensor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Mar 2023 13:50:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98015/out-of-tree-driver-builds-links-but-not-in-map" /><item><title>RE: out of tree driver; builds, links but not in map</title><link>https://devzone.nordicsemi.com/thread/417441?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 13:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84d50019-1739-492e-b0f1-15ec5d0f21c4</guid><dc:creator>Mike Pulice</dc:creator><description>&lt;p&gt;Although I do not know how proper this &amp;quot;fix&amp;quot; is or if it&amp;#39;s a workaround or what but what got it all working is adding&amp;nbsp;&lt;/p&gt;
&lt;p&gt;a&amp;nbsp;&lt;strong class="makevar"&gt;ZEPHYR_EXTRA_MODULES&amp;nbsp;&lt;/strong&gt;in my root CMakeLists file. &amp;nbsp;&lt;br /&gt;&lt;br /&gt;West built and linked everything but for some reason, it does not link the library files into the main link.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: out of tree driver; builds, links but not in map</title><link>https://devzone.nordicsemi.com/thread/417356?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 09:43:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfb32036-d783-4013-83c3-c4da726c75cf</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The error indicate that there is an issue with the devicetree for the board you build for. The&amp;nbsp;ncs-example-application builds for custom_plank out of the box, but for other boards you need to add an overlay. You can refer to &lt;a href="https://github.com/nrfconnect/ncs-example-application/blob/main/app/boards/nucleo_f302r8.overlay"&gt;this overlay file&lt;/a&gt;, and add as similar for the board you are building for. As an example, a overlay for the nRF52840 DK that use P0.0 for the sensor, could look like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	examplesensor0: examplesensor_0 {
		compatible = &amp;quot;zephyr,examplesensor&amp;quot;;
		input-gpios = &amp;lt;&amp;amp;gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
	};
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: out of tree driver; builds, links but not in map</title><link>https://devzone.nordicsemi.com/thread/417237?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 20:45:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:996704ac-ec40-47b9-9706-285caa3d3226</guid><dc:creator>Mike Pulice</dc:creator><description>&lt;p&gt;I have some new information that can perhaps help you verify on Nordic side.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I was reviewing this web page of Nordics&amp;nbsp;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/developing/adding_code.html#dm-user-workflows"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/developing/adding_code.html#dm-user-workflows&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So I decided to try this&amp;nbsp;&lt;br /&gt;&amp;quot;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;a class="reference external" href="https://github.com/nrfconnect/ncs-example-application"&gt;ncs-example-application&lt;/a&gt;&lt;span&gt;&amp;nbsp;repository is tagged every time a new release of the nRF Connect SDK is launched (starting with v2.3.0), using the same version number. This allows you to select the tag that matches the version of the nRF Connect SDK you intend to use.&lt;/span&gt;&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Low and behold I received this error when building that app.&amp;nbsp;&lt;br /&gt;FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map &lt;br /&gt;main.c:46: undefined reference to `__device_dts_ord_4&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: out of tree driver; builds, links but not in map</title><link>https://devzone.nordicsemi.com/thread/417165?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 15:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aef7ccb-e4f9-41df-befb-548fba2f7f1c</guid><dc:creator>Mike Pulice</dc:creator><description>&lt;p&gt;I just found a difference in this header file.&amp;nbsp; If I compare the in tree devices to my out of tree devices they are different as far as the header comment.&amp;nbsp; For example&amp;nbsp;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt; * Devicetree node: /soc/peripheral@50000000/i2c@9000/bmm150@10&lt;br /&gt; *&lt;br /&gt; * Node identifier: DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmm150_10&lt;br /&gt; *&lt;br /&gt; * Binding (compatible = bosch,bmm150):&lt;br /&gt; * $ZEPHYR_BASE\dts\bindings\sensor\bosch,bmm150.yaml&lt;br /&gt; *&lt;br /&gt; * (Descriptions have moved to the Devicetree Bindings Index&lt;br /&gt; * in the documentation.)&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;/*&lt;br /&gt; * Devicetree node: /soc/peripheral@50000000/i2c@9000/bmi088_gyr@69&lt;br /&gt; *&lt;br /&gt; * Node identifier: DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;Now, I&amp;#39;m not saying that is the issue and I can guarantee the out of tree dts\binding files are there.&amp;nbsp;&lt;br /&gt;Its the same for the vl53 out of tree device but it is functioning.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: out of tree driver; builds, links but not in map</title><link>https://devzone.nordicsemi.com/thread/417162?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 15:33:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5d82d6b-17f1-4230-ad0f-04baa897254f</guid><dc:creator>Mike Pulice</dc:creator><description>&lt;p&gt;I forgot to mention I had already looked there and everything is defined as far as I can tell as compared to functioning devices. Please note that I added some PWM code to bring up that part of the board so my ordinals have changed.&amp;nbsp;&amp;nbsp;&lt;br /&gt;Since this chip has two addresses in it we can just look at the gyro which is ordinal 132 now.&lt;br /&gt;&lt;br /&gt;Snippets from&amp;nbsp;devicetree_generated.h&lt;br /&gt;&lt;br /&gt;I2C depends&amp;nbsp;&lt;br /&gt;/* Ordinals for what depends directly on this node: */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_SUPPORTS_ORDS \&lt;br /&gt; 131, /* /soc/peripheral@50000000/i2c@9000/bmi088_acc@18 */ \&lt;br /&gt; 132, /* /soc/peripheral@50000000/i2c@9000/bmi088_gyr@69 */ \&lt;br /&gt; 133, /* /soc/peripheral@50000000/i2c@9000/bmm150@10 */ \&lt;br /&gt; 134, /* /soc/peripheral@50000000/i2c@9000/bmp388@76 */ \&lt;br /&gt; 135, /* /soc/peripheral@50000000/i2c@9000/vl53l1x@52 */&lt;br /&gt;&lt;br /&gt;/* Node&amp;#39;s dependency ordinal: */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_ORD 132 &amp;lt;--&lt;/p&gt;
&lt;p&gt;/* Ordinals for what this node depends on directly: */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_REQUIRES_ORDS \&lt;br /&gt; 130, /* /soc/peripheral@50000000/i2c@9000 */&lt;/p&gt;
&lt;p&gt;/* Ordinals for what depends directly on this node: */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_SUPPORTS_ORDS /* nothing */&lt;/p&gt;
&lt;p&gt;/* Existence and alternate IDs: */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_EXISTS 1&lt;br /&gt;#define DT_N_ALIAS_bmigyr DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69&lt;br /&gt;#define DT_N_INST_0_bosch_bmi088_gyr DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69&lt;br /&gt;#define DT_N_NODELABEL_gyro DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69&lt;/p&gt;
&lt;p&gt;/* Bus info (controller: &amp;#39;/soc/peripheral@50000000/i2c@9000&amp;#39;, type: &amp;#39;['i2c']&amp;#39;) */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_BUS_i2c 1&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_BUS DT_N_S_soc_S_peripheral_50000000_S_i2c_9000&lt;/p&gt;
&lt;p&gt;/* Macros for properties that are special in the specification: */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_REG_NUM 1&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_REG_IDX_0_EXISTS 1&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_REG_IDX_0_VAL_ADDRESS 105 /* 0x69 */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_RANGES_NUM 0&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_FOREACH_RANGE(fn) &lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_IRQ_NUM 0&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_COMPAT_MATCHES_bosch_bmi088_gyr 1&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_COMPAT_VENDOR_IDX_0_EXISTS 1&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_COMPAT_VENDOR_IDX_0 &amp;quot;Bosch Sensortec GmbH&amp;quot;&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_COMPAT_MODEL_IDX_0_EXISTS 1&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_COMPAT_MODEL_IDX_0 &amp;quot;bmi088-gyr&amp;quot;&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_STATUS_okay 1&lt;/p&gt;
&lt;p&gt;/* Pin control (pinctrl-&amp;lt;i&amp;gt;, pinctrl-names) properties: */&lt;br /&gt;#define DT_N_S_soc_S_peripheral_50000000_S_i2c_9000_S_bmi088_gyr_69_PINCTRL_NUM 0&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I did not include property macros but they are there.&amp;nbsp; Based on what I see, there is no reason it wouldn&amp;#39;t be included in the link.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: out of tree driver; builds, links but not in map</title><link>https://devzone.nordicsemi.com/thread/417094?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 13:18:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be3a41c5-6450-45a2-9d5d-7ade01008421</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seems something is not enabled, either in your device tree or Kconfig (prj.conf). I suggest you open your build folder and find this file:&amp;nbsp;&amp;lt;build_folder&amp;gt;/zephyr/include/generated/devicetree_generated.h. There you see the numbered nodes. As you got&amp;nbsp;__device_dts_ord_127, 127 is relevant here. That points to a peripheral or similar, and that needs to be enabled/included.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>