Greetings
I have been going through the BLE fundamentals course, and I am currently on Lesson 4 exercise 1, which entails creating custom services. I have went through the exercise and can see it working perfectly.
However, I am trying to add the sensor drivers for the LPS22HB pressure sensor. I would like to experiment with sending the pressure readings as a custom service. I have included the sensor.h file to main.c and added the following KConfig defines to my prj.conf file, for the pressure sensor:
# # Copyright (c) 2018 Nordic Semiconductor # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # # Logger module CONFIG_LOG=y # Button and LED library CONFIG_DK_LIBRARY=y # Bluetooth LE CONFIG_BT=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="MY_LBS1" # Increase stack size for the main thread and System Workqueue CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 CONFIG_MAIN_STACK_SIZE=2048 # KConfig defines for LPS22HB pressure sensor CONFIG_STDOUT_CONSOLE=y CONFIG_I2C=y CONFIG_CBPRINTF_FP_SUPPORT=y CONFIG_SENSOR=y CONFIG_LPS22HB=y CONFIG_DT_HAS_ST_LPS22HB_PRESS_ENABLED=y
After adding these changes, I get the following error: CMake Error at C:/ncs/v2.6.0/zephyr/cmake/modules/kconfig.cmake:358 (message):
There are also warnings shown in the KConfig file for the last 2 lines:
CONFIG_LPS22HB was assigned the value y, but got the value n. Missing dependencies:
DT_HAS_ST_LPS22HB_PRESS_ENABLED
Symbol CONFIG_DT_HAS_ST_LPS22HB_PRESS_ENABLED cannot be set (has no prompt)
What am I doing incorrectly?