Hello
I'm attempting to build the following sample bme280 programme on a nRF5340dk development board.
- ncs\v2.3.0\zephyr\samples\sensor\bme280
However, I'm getting the following error:
- undefined reference to `__device_dts_ord_131'
I've started with a 'basic/blinky' template using the 'nRF5340dk_nRF5340_cpuapp_ns' board.
With blinky working I've added/changed the project with code from the bme280 sample as follows:
- prj.conf
- the sample only had 'CONFIG_GPIO=y' which was greyed out
- overlay
- created “nrf5340dk_nrf5340_cpuapp_ns.overlay” and added the following contents from "ncs\v2.3.0\zephyr\samples\sensor\bme280\arduino_spi.overlay"
&arduino_spi {
status = "okay";
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>;
bme280@0 {
compatible = "bosch,bme280";
reg = <0>;
spi-max-frequency = <1000000>; /* conservatively set to 1MHz */
};
};
- main.c
- copied the contents from "ncs\v2.3.0\zephyr\samples\sensor\bme280\src\main.c" to the new project's "main.c"
When I build I get the following error:
[232/244] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
.
C:\Workspace\nrf\5340\exSPI\008_bme280\src\main.c:46: undefined reference to `__device_dts_ord_131'
How might I get over this issue?
Thanks
RoW