Problem with Out of Tree Driver Build

I have been banging my head against this wall for a long time now. I am trying to add support for the NAU7802 sensor based on this repository: https://github.com/TinNotTim/nau7802_loadcell_zephyr_driver/blob/main/Kconfig

I am using the latest 2.7.0 nRF Connect release building for the xiao_ble_sense board. I cannot roll back to 2.6.1 as there is a bug with the LSM6DSL sensor implementation. 

I CANNOT get it to build for the life of me. I am getting a multitude of errors:

1. On a pristine build I always get an error with trying to include the `offsets.h` file. The error is documented in this ticket, but it is not my main focus right now as it goes away after a rebuild. 

In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/app_memory/app_memdomain.h:9,
                 from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/rtio/rtio.h:31,
                 from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/drivers/sensor.h:28,
                 from /Users/ericpietrowicz/firmware/nau7802-test-delete-me/drivers/sensor/nau7802/nau7802.h:13,
                 from /Users/ericpietrowicz/firmware/nau7802-test-delete-me/drivers/sensor/nau7802/nau7802_trigger.c:7:
/opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/linker/linker-defs.h:26:10: fatal error: offsets.h: No such file or directory
   26 | #include <offsets.h>
      |          ^~~~~~~~~~~
compilation terminated.

2. After the first build, I am getting a mess of device tree errors that I can't easily parse.

note: in expansion of macro 'DT_INST_FOREACH_STATUS_OKAY'
  596 | DT_INST_FOREACH_STATUS_OKAY(CREATE_NAU7802_INST)

Does anyone have any ideas? I've attached a minimal version of the failing project here. I suspect it might be something with my Kconfigs (below) but I really have no idea as I just have so many linting errors all over the project.

menu "Zephyr"
source "Kconfig.zephyr"
endmenu

rsource "drivers/Kconfig"

nau7802-test-delete-me.zip

Parents Reply Children
No Data
Related