<?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>BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71437/bme280-code-update-with-nrf9160</link><description>Hi, I have a BME280 sensor running normally with the nRF9160 on v1.2.0 firmware. When I updated the firmware to 1.3.1, I had to update the code to run I updated the files but still getting errors is there any updated version. zephyr v2.3. The code is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Feb 2021 12:07:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71437/bme280-code-update-with-nrf9160" /><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/294359?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 12:07:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1023fae-204b-45de-9ad1-e98f87fc27c6</guid><dc:creator>AMG</dc:creator><description>&lt;p&gt;Major changes need to be done to run the code on&amp;nbsp;&lt;span&gt;*** Booting Zephyr OS build v2.3.0-rc1-ncs2 *** it runs on&amp;nbsp;*** Booting Zephyr OS build v2.1.99-ncs1 *** without any problems. The tutorial from nordic is for the v2.1.99&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/b/archives/posts/nrf-connect-sdk-tutorial---part-3-ncs-v1-3-0#h79sk0f70607qwcyitkx2xn61bmh9mo"&gt;https://devzone.nordicsemi.com/nordic/b/archives/posts/nrf-connect-sdk-tutorial---part-3-ncs-v1-3-0#h79sk0f70607qwcyitkx2xn61bmh9mo&lt;/a&gt;. most of the header files to be changed.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/293993?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 13:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51741e04-f1a1-44eb-b8f7-49796acc073e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;I see one of my sentences were cut short in my last reply.&amp;nbsp;&lt;/p&gt;
[quote user="AMG"]The code in the first comment runs on the v1.2.0. I am struggling with getting the code to run on v1.3.1.[/quote]
&lt;p&gt;Then I recommend looking at the NCS 1.3.1 sample in order to get it running. Devicetree / DTS plays a big part in getting HW running correctly in NCS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let me know how it works for you.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/293990?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 13:25:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5cdb02e-771a-4390-a3f3-8c83ac6c1807</guid><dc:creator>AMG</dc:creator><description>&lt;p&gt;The code in the first comment runs on the v1.2.0. I am struggling with getting the code to run on v1.3.1. Will have a look. thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/293938?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 10:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68ce10d4-74ff-4301-9343-47874c19df1b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;I&amp;#39;m a little confused. What version of NCS are you working on? NCS 1.2.0 or NCS 1.3.1? Are you able to run an unaltered version of the v1.3.1 sample?&lt;/p&gt;
&lt;p&gt;The error clearly states &lt;em&gt;&amp;quot;Your devicetree has no enabled nodes with compatible &amp;quot;bosch,bme280&amp;quot;.&amp;nbsp;&lt;/em&gt;From the part I posted in my first comment:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define BME280 DT_INST(0, bosch_bme280)

#if DT_NODE_HAS_STATUS(BME280, okay)
#define BME280_LABEL DT_LABEL(BME280)
#else
#error Your devicetree has no enabled nodes with compatible &amp;quot;bosch,bme280&amp;quot;
#define BME280_LABEL &amp;quot;&amp;lt;none&amp;gt;&amp;quot;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The Devicetree is used to define the&lt;span&gt;&amp;nbsp;hardware descriptions&amp;nbsp;in which the Zephyr OS obtains HW information.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In NCS 1.3.0, there were several new features introduces (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/releases/release-notes-1.3.0.html"&gt;See NCS 1.3.0 release notes&lt;/a&gt;), one being (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/releases/release-notes-1.3.0.html#zephyr"&gt;under Zephyr&lt;/a&gt;):&lt;br /&gt;&amp;quot;&lt;em&gt;Updated all files to use the C/C++ Devicetree generic API, because the C/C++ Devicetree value fetching API was reworked in Zephyr so that it uses compatible strings and new function-like macros to match properties. See&amp;nbsp;&lt;a title="(in Zephyr Project v2.4.99)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/api-usage.html#dt-from-c"&gt;Devicetree access from C/C++&lt;/a&gt;&lt;/em&gt;&lt;span&gt;&lt;em&gt;.&lt;/em&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the error you posted last, your GCC is seemingly building for NCS 1.3.1 (ref&amp;nbsp;&lt;em&gt;-DBUILD_VERSION=v2.3.0-rc1-ncs2&lt;/em&gt;).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/293772?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 13:21:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f6038a9-da1b-4a02-ade0-497908e0928d</guid><dc:creator>AMG</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FAILED: CMakeFiles/app.dir/src/main.c.obj 
ccache /opt/gnuarmemb/bin/arm-none-eabi-gcc -DBUILD_VERSION=v2.3.0-rc1-ncs2 -DEXT_API_MAGIC=0x281ee6de,0xb845acea,23298 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,23298 -DKERNEL -DNRF9160_XXAA -DNRF_TRUSTZONE_NONSECURE -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/am/nrfmix/zephyr/include -Izephyr/include/generated -I/home/am/nrfmix/zephyr/soc/arm/nordic_nrf/nrf91 -I/home/am/nrfmix/nrf/include -I/home/am/nrfmix/modules/hal/cmsis/CMSIS/Core/Include -I/home/am/nrfmix/modules/hal/nordic/nrfx -I/home/am/nrfmix/modules/hal/nordic/nrfx/drivers/include -I/home/am/nrfmix/modules/hal/nordic/nrfx/mdk -I/home/am/nrfmix/modules/hal/nordic/. -isystem /home/am/nrfmix/zephyr/lib/libc/minimal/include -isystem /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/include -isystem /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/include-fixed -Os -imacros/home/am/nrfmix/zephyr/samples/sensor/bme280/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m33 -mthumb -mabi=aapcs -imacros/home/am/nrfmix/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/am/nrfmix/zephyr/samples/sensor/bme280=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/am/nrfmix/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/am/nrfmix=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj   -c ../src/main.c
../src/main.c:17:2: error: #error Your devicetree has no enabled nodes with compatible &amp;quot;bosch,bme280&amp;quot;
 #error Your devicetree has no enabled nodes with compatible &amp;quot;bosch,bme280&amp;quot;
  ^~~~~
ninja: build stopped: subcommand failed.
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/293766?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 12:51:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0443c67-5b4c-4f3e-a1b4-52146b83b6ba</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Can you please provide the errors you are seeing? Difficult for me to determine what&amp;#39;s going on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/293708?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 09:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dea2fbbe-6ace-41d5-ac4e-63caa5328220</guid><dc:creator>AMG</dc:creator><description>&lt;p&gt;@Oyvind adding this config will cause more errors. The code doesn&amp;#39;t run in the more advanced firmware version. That&amp;#39;s why I altered the code. If you can run the code. please provide the firmware version since it only run on v1.20.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME280 code update with nRF9160</title><link>https://devzone.nordicsemi.com/thread/293573?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 13:51:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f793e62-54e8-4418-b7c9-702205d6c71d</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Comparing your code to the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/e18fcbba5a4e63b54116f40ae5f0323d5237d329/samples/sensor/bme280/src/main.c#L12:L23"&gt;BME280 sensor sample in Zephyr&lt;/a&gt;, I see that you do not have the following configuration:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
#define BME280 DT_INST(0, bosch_bme280)

#if DT_NODE_HAS_STATUS(BME280, okay)
#define BME280_LABEL DT_LABEL(BME280)
#else
#error Your devicetree has no enabled nodes with compatible &amp;quot;bosch,bme280&amp;quot;
#define BME280_LABEL &amp;quot;&amp;lt;none&amp;gt;&amp;quot;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Please look at the sample and make sure to add the same.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>