This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PDM microphone interface

HI sir i was trying to interface pdm microphone. i followed the existing ticket  PDM Driver for Zephyr on nrf52840. i had modified the proj.conf as below

CONFIG_PRINTK=y
CONFIG_I2C=y
CONFIG_I2S=y
CONFIG_GPIO=y
#CONFIG_LED=y
#CONFIG_LP3943=y
CONFIG_AUDIO=y
CONFIG_AUDIO_DMIC=y
CONFIG_AUDIO_MPXXDTYY=y

# When on-board microphone is used the DMA must run w/o things
# that could slow it down. So DMA logging must be completely
# disabled and DMA interrupts must run at maximum priority.

CONFIG_DMA=y
CONFIG_DMA_0_IRQ_PRI=0
CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_TRUSTED_EXECUTION_NONSECURE=y

but during the loading process i got the error as below

Creating solution microphone.emProject
  cmake -GNinja -DBOARD=nrf9160dk_nrf9160ns -DBOARD_DIR=/home/kadal/Nordic-Tools/ncs/zephyr/boards/arm/nrf9160dk_nrf9160 -B/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns -S/home/kadal/Nordic-Tools/projects/microphone -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/home/kadal/Nordic-Tools/GNUarm9 -DDTC_OVERLAY_FILE=/home/kadal/Nordic-Tools/projects/microphone/nrf9160dk_nrf9160ns.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/home/kadal/Nordic-Tools/Segger/arm_segger_embedded_studio_v530a_linux_x64_nordic/html/configure_nordic_project_menuconfig.py
  -- Application: /home/kadal/Nordic-Tools/projects/microphone
  -- Zephyr version: 2.4.0 (/home/kadal/Nordic-Tools/ncs/zephyr)
  -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
  -- Board: nrf9160dk_nrf9160ns
  -- Cache files will be written to: /home/kadal/.cache/zephyr
  -- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
  -- Found toolchain: gnuarmemb (/home/kadal/Nordic-Tools/GNUarm9)
  -- Found BOARD.dts: /home/kadal/Nordic-Tools/ncs/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns.dts
  -- Found devicetree overlay: /home/kadal/Nordic-Tools/projects/microphone/nrf9160dk_nrf9160ns.overlay
  -- Generated zephyr.dts: /home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/zephyr/zephyr.dts
  -- Generated devicetree_unfixed.h: /home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/zephyr/include/generated/devicetree_unfixed.h
  Parsing /home/kadal/Nordic-Tools/ncs/zephyr/Kconfig
  Loaded configuration '/home/kadal/Nordic-Tools/ncs/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_defconfig'
  Merged configuration '/home/kadal/Nordic-Tools/projects/microphone/prj.conf'
  Configuration saved to '/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/zephyr/.config'
  Kconfig header saved to '/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/zephyr/include/generated/autoconf.h'
  -- Application: /home/kadal/Nordic-Tools/ncs/nrf/samples/spm
  -- Zephyr version: 2.4.0 (/home/kadal/Nordic-Tools/ncs/zephyr)
  -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
  -- Board: nrf9160dk_nrf9160
  -- Cache files will be written to: /home/kadal/.cache/zephyr
  -- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
  -- Found toolchain: gnuarmemb (/home/kadal/Nordic-Tools/GNUarm9)
  -- Found BOARD.dts: /home/kadal/Nordic-Tools/ncs/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
  -- Found devicetree overlay: /home/kadal/Nordic-Tools/ncs/nrf/samples/spm/nrf9160dk_nrf9160.overlay
  -- Generated zephyr.dts: /home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/spm/zephyr/zephyr.dts
  -- Generated devicetree_unfixed.h: /home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/spm/zephyr/include/generated/devicetree_unfixed.h
  Parsing /home/kadal/Nordic-Tools/ncs/zephyr/Kconfig
  Loaded configuration '/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/spm/zephyr/.config'
  No change to configuration in '/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/spm/zephyr/.config'
  No change to Kconfig header in '/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/spm/zephyr/include/generated/autoconf.h'
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/spm
  -- Application: /home/kadal/Nordic-Tools/projects/microphone
  -- Zephyr version: 2.4.0 (/home/kadal/Nordic-Tools/ncs/zephyr)
  -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
  -- Board: nrf9160dk_nrf9160ns
  -- Cache files will be written to: /home/kadal/.cache/zephyr
  -- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
  -- Found toolchain: gnuarmemb (/home/kadal/Nordic-Tools/GNUarm9)
  -- Found BOARD.dts: /home/kadal/Nordic-Tools/ncs/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns.dts
  -- Found devicetree overlay: /home/kadal/Nordic-Tools/projects/microphone/nrf9160dk_nrf9160ns.overlay
  -- Found devicetree overlay: /home/kadal/Nordic-Tools/projects/microphone/nrf9160dk_nrf9160ns.overlay
  -- Generated zephyr.dts: /home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/zephyr/zephyr.dts
  -- Generated devicetree_unfixed.h: /home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/zephyr/include/generated/devicetree_unfixed.h
  Parsing /home/kadal/Nordic-Tools/ncs/zephyr/Kconfig
  Loaded configuration '/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/zephyr/.config'
  -- Configuring incomplete, errors occurred!
  See also "/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/CMakeFiles/CMakeOutput.log".
  See also "/home/kadal/Nordic-Tools/projects/microphone/build_nrf9160dk_nrf9160ns/CMakeFiles/CMakeError.log".
  nrf9160dk_nrf9160ns.dts.pre.tmp:357.32-361.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
  nrf9160dk_nrf9160ns.dts.pre.tmp:56.42-68.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@40000000/kmu@39000)
  nrf9160dk_nrf9160ns.dts.pre.tmp:305.19-311.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
  Changed board to secure nrf9160dk_nrf9160 (NOT NS)
  
  === child image spm -  begin ===
  Including boilerplate (Zephyr base (cached)): /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake
  nrf9160dk_nrf9160.dts.pre.tmp:56.42-68.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)
  nrf9160dk_nrf9160.dts.pre.tmp:305.19-311.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
  === child image spm -  end ===
  
  Including boilerplate (Zephyr base (cached)): /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:76 (add_custom_target):
    add_custom_target cannot create target "code_data_relocation_target"
    because another target with the same name already exists.  The existing
    target is a custom target created in source directory
    "/home/kadal/Nordic-Tools/projects/microphone".  See documentation for
    policy CMP0002 for more details.
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:97 (add_custom_target):
    add_custom_target cannot create target "runners_yaml_props_target" because
    another target with the same name already exists.  The existing target is a
    custom target created in source directory
    "/home/kadal/Nordic-Tools/projects/microphone".  See documentation for
    policy CMP0002 for more details.
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:158 (add_custom_target):
    add_custom_target cannot create target "pristine" because another target
    with the same name already exists.  The existing target is a custom target
    created in source directory "/home/kadal/Nordic-Tools/projects/microphone".
    See documentation for policy CMP0002 for more details.
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  nrf9160dk_nrf9160ns.dts.pre.tmp:357.32-361.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
  nrf9160dk_nrf9160ns.dts.pre.tmp:56.42-68.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@40000000/kmu@39000)
  nrf9160dk_nrf9160ns.dts.pre.tmp:305.19-311.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/kconfig.cmake:110 (add_custom_target):
    add_custom_target cannot create target "menuconfig" because another target
    with the same name already exists.  The existing target is a custom target
    created in source directory "/home/kadal/Nordic-Tools/projects/microphone".
    See documentation for policy CMP0002 for more details.
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:591 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/kconfig.cmake:110 (add_custom_target):
    add_custom_target cannot create target "guiconfig" because another target
    with the same name already exists.  The existing target is a custom target
    created in source directory "/home/kadal/Nordic-Tools/projects/microphone".
    See documentation for policy CMP0002 for more details.
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:591 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/kconfig.cmake:110 (add_custom_target):
    add_custom_target cannot create target "hardenconfig" because another
    target with the same name already exists.  The existing target is a custom
    target created in source directory
    "/home/kadal/Nordic-Tools/projects/microphone".  See documentation for
    policy CMP0002 for more details.
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:591 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/kconfig.cmake:110 (add_custom_target):
    add_custom_target cannot create target "menuconfig_ses" because another
    target with the same name already exists.  The existing target is a custom
    target created in source directory
    "/home/kadal/Nordic-Tools/projects/microphone".  See documentation for
    policy CMP0002 for more details.
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:591 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  
  error: SB_VALIDATION_INFO_CRYPTO_ID (defined at /home/kadal/Nordic-
  Tools/ncs/nrf/subsys/bootloader/bl_validation/Kconfig:28) is assigned in a configuration file, but
  is not directly user-configurable (has no prompt). It gets its value indirectly from other symbols.
  See http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SB_VALIDATION_INFO_CRYPTO_ID.html
  and/or look up SB_VALIDATION_INFO_CRYPTO_ID in the menuconfig/guiconfig interface. The Application
  Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of
  the manual might be helpful too.
  
  CMake Error at /home/kadal/Nordic-Tools/ncs/zephyr/cmake/kconfig.cmake:239 (message):
    command failed with return code: 1
  Call Stack (most recent call first):
    /home/kadal/Nordic-Tools/ncs/zephyr/cmake/app/boilerplate.cmake:591 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /home/kadal/Nordic-Tools/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:9 (find_package)
  
  
  
  error: cmake failed
  create_nordic_project.py failed (1)
I am not able to find what is causing the error. Kindly check and guide me to solve the errors and also help me to specify pins as per my circuit for microphone give me syntex to define i2s pins in overlay file. 

Related