Adding VM3011 Audio Driver Issues

I'm attempting to integrate the VM3011 audio driver into my project which uses the Thingy53 platform.

This question originally led me to Edge Impulse's VM3011 driver code: Audio driver for VM3011 in Thingy:53 - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

I copied the vm3011 folder: firmware-nordic-thingy53/drivers/vm3011 at main · edgeimpulse/firmware-nordic-thingy53 · GitHub from their repository into my own project under a /drivers folder at the root of my application.

I think added the corresponding KConfig options from the driver to the prj.conf file:

# Microphone Support
CONFIG_VM3011=y
CONFIG_VM3011_PDM_BUFFER_SIZE=1600
CONFIG_AUDIO=y
CONFIG_AUDIO_DMIC=y
CONFIG_AUDIO_DMIC_LOG_LEVEL_DBG=y

and finally in the root CMakeLists.txt for the project I added:

set(ZEPHYR_EXTRA_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/drivers/vm3011)

When I attempt to compile my project I get the following error:

C:/ncs/v2.3.0/zephyr/scripts/kconfig/kconfig.py: Dependency loop
===============

I2C (defined at boards/shields\x_nucleo_53l0a1\Kconfig.defconfig:9, C:/ncs/v2.3.0/zephyr/boards/arm/thingy53_nrf5340/Kconfig.defconfig:95, drivers/i2c/Kconfig:9), with definition...

config I2C
        bool
        default y
        depends on SHIELD_X_NUCLEO_53L0A1

config I2C
        bool
        default y
        depends on !TRUSTED_EXECUTION_SECURE && (BOARD_THINGY53_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP_NS)

menuconfig I2C
        bool "I2C Drivers"
        help
          Enable I2C Driver Configuration

My questions are as follows:
1) Why would my project, which targets that thingy53_nrf5340_cpuapp_ns board target pull in some kconfig resources for the x_nucleo_53l0a1 shield? This reference to the shield is causing a dependency loop error listed above. How would I debug why this shield file gets pulled in?

2) Is there a good example for adding an out of tree driver to a basic project? My understanding is that I need to provide the driver files which Edge Impulse as already written, then add a devicetree overlay file that adds the vm3011 to system and it should just work correct?

Parents Reply Children
No Data
Related