dts/bindings files for out-of-tree sensor driver is not being included build #45805
-
Hi there, I am creating an out-of-tree sensor driver and have based my project structure on the zephyr example-application. I have included my devicetree binding file in dts/bindings folder. From analysing the build files, it seems that the dts/bindings/ folder is not being included in the build. I have set the DTS_ROOT in both the zephyr/module.yml and the root CMakeLists.txt to no success. As a result, when attempting to call device_get_binding() there is no binding in relation to the ATSENSE301 sensor and it returns NULL. Project Structure
The output of my zephyr.dts.d file:
I have attempted to set the DTS_ROOT in zephyr/module.yml:
And in CMakeLists.txt in the root of the folder:
The microchip,atsense301.yaml file is as follows:
And the stm32mp157c_dk2.overlay file is configured for SPI2:
The main.cpp file
In the ATSENSE301.cpp file, I have configured the DT_DRV_COMPACT:
and the initialisation macro for the sensor is as follows:
I am really struggling to understand what I am missing. Appreciate any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It was a typo in the end. I had written:
and I should have written:
Leaving this up for clarity |
Beta Was this translation helpful? Give feedback.
It was a typo in the end. I had written:
and I should have written:
Leaving this up for clarity