Hello,
I’ve git cloned https://github.com/circuitdojo/air-quality-wing-zephyr-demo, updated cmake to its version 3.21.1, update Zephyr-sdk to version 0.13.0. After cloning the CircuitDojo’s AQW driver demo I ran west init ., west zephyr-export, west update. Attempting to build the demo I am now facing the following dts binding error:

devicetree error: 'enable-gpios' appears in /soc/i2c@40003000/sgp40@59 in nrf52840dk_nrf52840.dts.pre.tmp, but is not declared in 'properties:' in /home/cpguest/embedded/air-quality-wing-jared-wolff/demo/zephyr/dts/bindings/sensor/sensirion,sgp40.yaml

I’ve opened this file, searched on line for about ninety minutes now, for documents on how to include a property which I surmise should be typed in as gpios-enabled: beneath the properties section of this bindings file. The closest answer I can find is https://docs.zephyrproject.org/latest/guides/dts/bindings.html#id13. I’m wondering however, whether this demo is building without errors for its developer? If yes, why am I seeing them?

Full build messages here:

ted@localhost:~/embedded/air-quality-wing-jared-wolff/demo$ west build -b nrf52840dk_nrf52840 -p

-- west build: making build dir /home/cpguest/embedded/air-quality-wing-jared-wolff/demo/build pristine
-- west build: generating a build system
-- Build type: debug 🚀
Including boilerplate (Zephyr base): /home/cpguest/embedded/air-quality-wing-jared-wolff/demo/zephyr/cmake/app/boilerplate.cmake
CMake Deprecation Warning at zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
  The OLD behavior for policy CMP0079 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:22 (find_package)


-- Application: /home/cpguest/embedded/air-quality-wing-jared-wolff/demo
-- Zephyr version: 2.6.99 (/home/cpguest/embedded/air-quality-wing-jared-wolff/demo/zephyr), build: zephyr-v2.6.0-2378-g5d988fde057f
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/cpguest/.cache/zephyr
-- Using toolchain: zephyr 0.13.0 (/opt/zephyr-sdk-0.13.0)
-- Found dtc: /opt/zephyr-sdk-0.13.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/cpguest/embedded/air-quality-wing-jared-wolff/demo/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: /home/cpguest/embedded/air-quality-wing-jared-wolff/demo/boards/nrf52840dk_nrf52840.overlay
devicetree error: 'enable-gpios' appears in /soc/i2c@40003000/sgp40@59 in nrf52840dk_nrf52840.dts.pre.tmp, but is not declared in 'properties:' in /home/cpguest/embedded/air-quality-wing-jared-wolff/demo/zephyr/dts/bindings/sensor/sensirion,sgp40.yaml
CMake Error at zephyr/cmake/dts.cmake:246 (message):
  gen_defines.py failed with return code: 1
Call Stack (most recent call first):
  zephyr/cmake/app/boilerplate.cmake:553 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:22 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/cpguest/embedded/air-quality-wing-jared-wolff/demo/build -S/home/cpguest/embedded/air-quality-wing-jared-wolff/demo -GNinja -DBOARD=nrf52840dk_nrf52840
ted@localhost:~/embedded/air-quality-wing-jared-wolff/demo$

    jaredwolff Hi Jared,
    I have not yet been able to answer my enable-gpios question. This morning now when I attempt to build your AQW demo project, I encounter different errors. Build message just below . . . the only change I’ve made is that I invoked west update in the directory named demo, the top level of your AQW demo.

    Wish I could reproduce yesterday’s error. It’s difficult to move forward answering a question when I cannot pin down and observe an error in a “produce on demand” way.

    Latest demo build errors relate to symbols not found (similar to my first posted issue, CONFIG_<sensor> not defined):

    ted@localhost:~/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo$ west build -b nrf52840dk_nrf52840 -p
    
    -- west build: making build dir /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/build pristine
    -- west build: generating a build system
    -- Build type: debug 🚀
    Including boilerplate (Zephyr base): /home/ted/projects/embedded/ncs/zephyr/cmake/app/boilerplate.cmake
    -- Application: /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo
    -- Zephyr version: 2.6.0-rc1 (/home/ted/projects/embedded/ncs/zephyr), build: v2.6.0-rc1-ncs1
    -- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter 
    -- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Cache files will be written to: /home/ted/.cache/zephyr
    -- Using toolchain: zephyr 0.12.4 (/opt/zephyr-sdk-0.12.4)
    -- Found dtc: /opt/zephyr-sdk-0.12.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
    -- Found BOARD.dts: /home/ted/projects/embedded/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/boards/nrf52840dk_nrf52840.overlay
    -- Generated zephyr.dts: /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/build/zephyr/include/generated/device_extern.h
    Parsing /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/Kconfig
    Loaded configuration '/home/ted/projects/embedded/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/prj.conf'
    Merged configuration '/home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/boards/nrf52840dk_nrf52840.conf'
    
    /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/prj.conf:19: warning: attempt to assign the value 'y' to the undefined symbol SHTC3
    
    /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/prj.conf:20: warning: attempt to assign the value 'y' to the undefined symbol SGP40
    
    /home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/prj.conf:23: warning: attempt to assign the value 'y' to the undefined symbol AQW
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at /home/ted/projects/embedded/ncs/zephyr/cmake/kconfig.cmake:264 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      /home/ted/projects/embedded/ncs/zephyr/cmake/app/boilerplate.cmake:555 (include)
      /home/ted/projects/embedded/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
      /home/ted/projects/embedded/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
      CMakeLists.txt:23 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo/build -S/home/ted/projects/embedded/ncs/zephyr/samples/sandbox-de-ted/jared-wolff/demo -GNinja -DBOARD=nrf52840dk_nrf52840

      tedhavelka66 did you init west with the demo repository and then run west update? You’re missing the aqw directory likely. I’m assuming you have not modified the demo?

        Hi Jared. Related to your observation about missing aqw directory, I think you’re right. I believe my understanding of west and its notion of “west workspace” is incomplete. I have thus far cloned your AQW driver and demo git projects into an existing west workspace. I had not really thought clearly about working within this workspace as I created it a couple weeks ago when I understood much less about west and the Zephyr project.

        Following this first set up, I created some small “non-west only-git” projects in ncs/zephyr/samples/sand-box-de-ted area. I was using tools and methods I understand, to make first forays into the new project space. But it may be my mistake to clone Air Quality Wing drivers or demo into this existing west workspace. When I issue west update it seems to update a lot of stuff, but not the AQW nor its demo code bases.

        I’m going to try cloning your demo again outside of any west workspace. That will permit me to west init && west update, a start from square one.

        Do you have a best practices way of managing your west workspaces? These take up a lot of disk space, and the workspaces are redundant when they each use the same version of Zephyr anyway. How do you keep copies of large code bases down to a reasonable count? Or this not a big worry in your work flow?

          tedhavelka66 Do you have a best practices way of managing your west workspaces? These take up a lot of disk space, and the workspaces are redundant when they each use the same version of Zephyr anyway. How do you keep copies of large code bases down to a reasonable count? Or this not a big worry in your work flow?

          The best practice, for now, it so let every project have it’s own copy. It sucks (lots of space) but I’ve found that multiple projects are not always running on the same version of Zephyr. It gets hairy after a while when you can’t remember which goes to what. This is what’s powerful about the west.yml manifest. It dictates exactly what you need to reproduce the SDK structure across any machine.

          Typically, if I’ve finished a project or don’t plan on coming back to it later I’ll delete all directories except for my source code. They can simply be restored at a later time using west update.

            Terms and Conditions | Privacy Policy