Hello,
I'm trying to build the HTS221 sensor example for nRF9160 but got this error :
2> Compiling ‘hts221.c’ 2> C:/Nordic_Semi/ncs_1-2-0/zephyr/drivers/sensor/hts221/hts221.c:67:36: error: 'DT_INST_0_ST_HTS221_BASE_ADDRESS' undeclared (first use in this function); did you mean 'DT_INST_0_MMIO_SRAM_BASE_ADDRESS'? 2> C:/Nordic_Semi/ncs_1-2-0/zephyr/drivers/sensor/hts221/hts221.c:67:36: note: each undeclared identifier is reported only once for each function it appears in 2> C:/Nordic_Semi/ncs_1-2-0/zephyr/drivers/sensor/hts221/hts221.c:84:36: error: 'DT_INST_0_ST_HTS221_BASE_ADDRESS' undeclared (first use in this function); did you mean 'DT_INST_0_MMIO_SRAM_BASE_ADDRESS'? 2> C:/Nordic_Semi/ncs_1-2-0/zephyr/drivers/sensor/hts221/hts221.c:116:37: error: 'DT_INST_0_ST_HTS221_BUS_NAME' undeclared (first use in this function); did you mean 'DT_INST_0_MMIO_SRAM_SIZE'? 2> C:/Nordic_Semi/ncs_1-2-0/zephyr/drivers/sensor/hts221/hts221.c:124:39: error: 'DT_INST_0_ST_HTS221_BASE_ADDRESS' undeclared (first use in this function); did you mean 'DT_INST_0_ST_HTS221_BUS_NAME'? 2> In file included from C:/Nordic_Semi/ncs_1-2-0/zephyr/include/drivers/i2c.h:23:0, 2> from C:/Nordic_Semi/ncs_1-2-0/zephyr/drivers/sensor/hts221/hts221.c:7: 2> C:/Nordic_Semi/ncs_1-2-0/zephyr/drivers/sensor/hts221/hts221.c:178:29: error: 'DT_INST_0_ST_HTS221_LABEL' undeclared here (not in a function); did you mean 'DT_INST_0_SOC_NV_FLASH_LABEL'? 2> C:/Nordic_Semi/ncs_1-2-0/zephyr/include/device.h:106:11: note: in definition of macro 'DEVICE_AND_API_INIT' Build failed
I'm compiling the code with ncs v1.2.0 and here is my prj.conf :
CONFIG_STDOUT_CONSOLE=y CONFIG_I2C=y CONFIG_I2C_2=y CONFIG_SENSOR=y CONFIG_HTS221=y CONFIG_HTS221_TRIGGER_NONE=y
Can someone point me out to the right direction so that I can the example up and running, please?