Unable to Build the Zephyr ADXL372 sensor example

Hi,

I am new at the Zephyr RTOS,

I am using the VS code on windows 10, ncs v2.1.0,

I am building the Zephyr ADXL372 sensor example but getting the below 3 errors and 2 warning I don't understand the problem, because other exmples are buid successfully.

"#include errors detected based on information provided by the configurationProvider setting. Squiggles are disabled for this translation unit (D:\\Zephyr_Projects\\adxl372\\src\\main.c)."
"cannot open source file \"syscall_list.h\" (dependency of \"D:\\Zephyr_Projects\\adxl372\\zephyr\\zephyr.h\")"
"cannot open source file \"syscalls/mem_manage.h\" (dependency of \"D:\\Zephyr_Projects\\adxl372\\zephyr\\drivers\\sensor.h\")"

"The choice symbol ADXL372_SPI (defined at drivers/sensor/adxl372/Kconfig:28) was selected"

When i click on the above warning it opens KCONFIG file but it is empty.


"CONFIG_ADXL372_SPI was assigned the value y, but got the value n. Missing dependencies:\n<choice ADXL372_BUS_TYPE>"

When I click on the above error it opens prj.conf file and it contains below data

CONFIG_STDOUT_CONSOLE=y
CONFIG_LOG=y
CONFIG_SPI=y
CONFIG_SENSOR=y
CONFIG_ADXL372_SPI=y for this line I get the warning and if I click this line it shows "In Build : n"
CONFIG_SENSOR_LOG_LEVEL_WRN=y
CONFIG_CBPRINTF_FP_SUPPORT=y
Please help me to resolve this issue.
  • Hello

    I assume you're building for the nRF52840 DK since you've tagged your issue with nrf52840.

    When I try to build the ADXL372 sample for the nRF52840 DK in NCS v2.1.0, I get an error saying "No adi,adxl372 compatible node found in the device tree".

    Are you not building for the nRF52840 DK?

    Have you made any changes to the sample?

    Also, I'm having trouble understanding why zephyr/zephyr.h is located inside your application directory. 

    Did you put it there? What is your ncs install path?

    Best regards,

    Einar

  • Hi Einarh, Thanks for reply.

    Yes, I also get the same error in "Terminal" window "No adi, adxl372 compatible node found in the device tree". and the other errors and warnings which was mentioned earlier are getting in the "Problems" window.

    Yes, I am building the example for nRF52840dk.

    No, I haven't made any changes.

    I have not put the zephyr/zephyr.h  in application directory.

    ncs install path is = C:\ncs\

    I have installed all tools using the toolchain manager app of nrf connect desktop app.

    But I have created another folder to save my projects and its path is = D:\Zephyr_Projects\

    May it cause issue?

  • Hi Einarh,

    Rest of the errors are resolved

    Now I am getting "No adi, adxl372 compatible node found in the device tree" and "#error directive: \"No adi, adxl372 compatible node found in the device tree\"", errors for the same line.

     and Below warnings,

    [{
    "resource": "/drivers/sensor/adxl372/Kconfig",
    "owner": "nrf-connect",
    "severity": 4,
    "message": "The choice symbol ADXL372_SPI (defined at drivers/sensor/adxl372/Kconfig:28) was selected",
    "source": "kconfig",
    "startLineNumber": 28,
    "startColumn": 1,
    "endLineNumber": 28,
    "endColumn": 2147483647
    }]

    [{
    "resource": "/d:/Zephyr_Projects/adxl372/prj.conf",
    "owner": "kconfig0",
    "severity": 4,
    "message": "CONFIG_ADXL372_SPI was assigned the value y, but got the value n. Missing dependencies:\n<choice ADXL372_BUS_TYPE>",
    "startLineNumber": 5,
    "startColumn": 1,
    "endLineNumber": 5,
    "endColumn": 19
    }]

    What is the issue?  I searched for it, but not getting the solution.

    (I have updated the SDK version from v2.1.0 to v2.1.2 by using the Toolchain Manager app)

  • Hi

    Please share how you resolved your errors for other users with similar issues.

    SM_ said:
    No adi, adxl372 compatible node found in the device tree

    This is the issue. There is no adxl372 node in the devicetree, so you will have to add a devicetree overlay file.

    If you build for nRF52832 (which this sample is actually compatible with) you can look at the adxl372 node in build/zephyr/zephyr.dts to get an idea of what it could look like.

    -Einar

  • Hi ,

    After updating the SDK version from v2.1.0 to v2.1.2 my other errors are gone.

    OK will check. 

    Thanks.

Related