Adding a sensor that is supported in the library to an existing sample, issue with DT_HAS_ADI_ADXL362_ENABLED

Hi,
I have been trying to understand how to modify existing projects/samples by adding aspect that are already supported in the libraries.
I have an nrf9151 development kit, and I have purchased an ADXL362 which I will connect to the IO. The 9151 thingy happens to have one on board.

There doesn't appear to be a supported sample for teh ADXL362 anymore, however I am using the MQTT sample and I am attempting to add the ADXL to the sample.

I create the project, start with a build using my DK and the overlay.

I remove the UART1 (trace) and replace it with SPI1, then I add teh adxl362 as a node into it, set the pins, add the label.

I navigate into kconfig gui to add the drivers and can not get the DT_HAS_ADI_ADXL362_ENABLED prereq to show up at y

I can not find this anywhere and have attempted to find out what this is but there is little information

If anyone can help that would be wonderful. Also are there generalised tutorials in how to develop using the dev tree and kconfig gui to expand functionality.

Thanks

  • Hi

    I think the UI hasn't caught up to your project here, and a simple rebuild of the project should fix the GUI for you. Please try a pristine build and see if the GUI changes.

    Best regards,

    Simon

  • Hi Simon, this had crossed my mind, unfortunately this did not solve the issue. I deleted the build folder and tried again with no luck. Does anyone know what DT_HAS_ADI_ADXL362_ENABLED is actually looking for?

    Cheers

  • Hi

    Okay, it was worth a shot at least. Can you try making sure your child node is enabled (set status = "okay") for that in your .dts/overlay file.

    If that doesn't work, I think I need some more information to help you out further here. Can you upload the compiled zephyr.dts, .config file and build log from your end here, so we can properly review what you're building?

    Best regards,

    Simon

  • Hey Simon,

    Thanks for the ongoing support. I still can not figure out where that pre-req is getting checked. I have set the status of that sensor to "okay" with no luck. I'm beginning to wonder whether the ADXL362 in the konfig gui is just setup for the thingy which has the sensor hardware on the board, and that configurations inherent to that board fill in that requirement.

    I'll see if I can gather the files required for you to have a closer look.

    Cheers

  • Hi Adro,

    Simon is out of office, and I will continue helping you in his stead.

    What nRF Connect SDK version are you working with?

    We will want to look at what Simon requested, build output files and build log. 

    Adro said:
    I deleted the build folder and tried again with no luck. Does anyone know what DT_HAS_ADI_ADXL362_ENABLED is actually looking for?
    Adro said:
    I'm beginning to wonder whether the ADXL362 in the konfig gui is just setup for the thingy which has the sensor hardware on the board, and that configurations inherent to that board fill in that requirement.

    This is not the case. The build system generates the DT_HAS_* Kconfig from DeviceTree node. As long as your node with the compat property is enabled, the Kconfig will be generated.

    Regards,

    Hieu

Related