Help with out of tree driver addition #nrf52840


@simo
 

Hi all, I'm working on a custom product based on the nRF9160 and am trying to setup our version control repo outside of the Zephyr (or in this case the Nordic SDK). Currently I have the following directory structure:

> Project
  > ncs
    > mbedtls
    > mcuboot
    > modules
    > nrf
    > nrfxlib
    > test
    > zephyr
  > myRepo
    > boards
    > drivers
      > CMakeLists.txt
      > Kconfig
      > sensor
        > CMakeLists.txt
        > Kconfig
        > tmp116
          > CMakeLists.txt
          > Kconfig
          > tmp116.c
          > tmp116.h
    > dts
      > bindings
        > sensor
          > ti,tmp116.yaml
    > samples

So far I've been able to create a sample project in myRepo/samples, and build it using cMake by specifying my BOARD and BOARD_ROOT. I'm able to include the zephyr-supported drivers and configure my board to use them.

Now I would like to add support for custom out of tree drivers (TI's TMP116 to start) and am getting stuck. So far I've added the driver folder as above and basically created the same structure as the tmp112 sensor driver in the Zephyr repo. I add CONFIG_SENSOR=y and CONFIG_TMP116=y to my proj.cfg. When I attempt to run cmake, however, I see the following error:

warning: attempt to assign the value 'y' to the undefined symbol TMP116

I've tried a number of things I was able to find online, but nothing has gotten me any closer to successfully building. I suspect that some of my CMakeLists aren't being picked up, or maybe I need to include myRepo as a module? Could someone please point me in the right direction?

Join users@lists.zephyrproject.org to automatically receive all group messages.