Zephyr RTC build issue.

Greetings,

 In the process of adding the RTC driver to the project I am encountering a build error when I try to setup a device pointer. The offending line is:

 const struct device *rtc_ptr = DEVICE_DT_GET(DT_NODELABEL(rtc0));

In prj.conf I have added:

CONFIG_RTC=y
CONFIG_NRFX_RTC0=y
CONFIG_COUNTER=y
The build error message is:

C:/ncs/v2.9.0/zephyr/include/zephyr/device.h:92:41: error: '__device_dts_ord_82' undeclared here (not in a function); did you mean '__device_dts_ord_2'?

   92 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)

It appears that the device driver is not being compiled based on this error message. I am using V2.9.0 of the Zephyr SDK and building on a Windows PC with VS Code.

The configuration board target is nrf52dk/nrf52832

Are additional Kconfig options required to be enabled?

I am able to compile calls to RTC functions that don't require the device pointer such as:

rtc_time_to_tm( struct rtc_time *);

Thanks for any help with this issue!,

Best regards,

Mark

   

Parents Reply Children
No Data
Related