<?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>Build error for example code of LIS2DH with nRF SDK v1.3.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67067/build-error-for-example-code-of-lis2dh-with-nrf-sdk-v1-3-1</link><description>Hello, 
 I am using example code of LIS2DH ac celerometer sensor with nRF SDK v1.3.1. Building the example code I am getting macro error in devicetree.h file as mentioned below 
 #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Sep 2021 18:19:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67067/build-error-for-example-code-of-lis2dh-with-nrf-sdk-v1-3-1" /><item><title>RE: Build error for example code of LIS2DH with nRF SDK v1.3.1</title><link>https://devzone.nordicsemi.com/thread/332013?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 18:19:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58bd4023-e097-47d7-b866-1a37008fb917</guid><dc:creator>flau</dc:creator><description>&lt;p&gt;By the way, does the sample code only work with I2C?&amp;nbsp; I am using SPI instead.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build error for example code of LIS2DH with nRF SDK v1.3.1</title><link>https://devzone.nordicsemi.com/thread/332011?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 18:16:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdc614e1-0b5a-43b4-820c-931dad6c064c</guid><dc:creator>flau</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am using example code for the LSM6DSL which I believe is very similar to the LIS2DH here.&amp;nbsp; I am stuck with the same error output here.&amp;nbsp; I tried the suggest from Simon, but no luck so far.&amp;nbsp; My LSM6DSL is connected via SPI instead of I2C.&amp;nbsp; Here is my overlay file.&lt;/p&gt;
&lt;p&gt;&amp;amp;spi3 {&lt;br /&gt; compatible = &amp;quot;nordic,nrf-spim&amp;quot;;&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; sck-pin = &amp;lt;3&amp;gt;;&lt;br /&gt; mosi-pin = &amp;lt;4&amp;gt;;&lt;br /&gt; miso-pin = &amp;lt;5&amp;gt;;&lt;br /&gt; &lt;br /&gt; lsm6dsl {&lt;br /&gt; compatible = &amp;quot;st,lsm6dsl&amp;quot;;&lt;br /&gt; reg = &amp;lt;8&amp;gt;;&lt;br /&gt; label = &amp;quot;LSM6DSL&amp;quot;;&lt;br /&gt; };&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;Any help is much appreciated.&amp;nbsp; Thanks in advance.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build error for example code of LIS2DH with nRF SDK v1.3.1</title><link>https://devzone.nordicsemi.com/thread/275052?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 11:28:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24527aa4-313e-45f3-a1fc-dea70e521736</guid><dc:creator>anirudh</dc:creator><description>&lt;p&gt;Thanks alot.... its working now!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build error for example code of LIS2DH with nRF SDK v1.3.1</title><link>https://devzone.nordicsemi.com/thread/274873?ContentTypeID=1</link><pubDate>Wed, 14 Oct 2020 11:55:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6e10784-34ba-4f88-ae65-f204f62aa779</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;You have to add ad an overlay file to your sample and add the&amp;nbsp;&lt;span&gt;LIS2DH as a child node of an I2C (or SPI)&amp;nbsp;node. This will include the&amp;nbsp;LIS2DH&amp;nbsp;to your device tree.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This may be useful:&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-3-ncs-v1-3-0#h79sk0f70607qwcyitkx2xn61bmh9mo"&gt;1.2 Walkthrough for BME280&lt;/a&gt;,&amp;nbsp;In order to get the general idea of how to use a sensor in NCS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/support-private/support/243069"&gt;This ticket&lt;/a&gt; may be helpful as well, note that an older version of NCS was used, so you might have to modify the overlay file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There are several boards that uses the LIS2DH, it may be useful to look a the dts files of these boards to get an idea of how to add the&amp;nbsp;LIS2DH&amp;nbsp;to the overlay file (device tree):&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/a512e7515e506bab8023a3533e2f851287566699/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L129-L142"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/a512e7515e506bab8023a3533e2f851287566699/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L129-L142&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/a87b995bec8717597a81e2eb8b68901dbdc889b4/boards/arm/nrf9160_innblue21/nrf9160_innblue21_common.dts#L87-L100"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/a87b995bec8717597a81e2eb8b68901dbdc889b4/boards/arm/nrf9160_innblue21/nrf9160_innblue21_common.dts#L87-L100&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&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></channel></rss>