Pass a string to a variable using the command line.

Using the peripheral_uart example routine from the NCSv3.0 library with the 54l15 chip.

1. compilation command:west build --build-dir build . --pristine --board nrf54l15dk/nrf54l15/cpuapp --sysbuild -- -DCONF_FILE=peripheral.conf -DEXTRA_DTC_OVERLAY_FILE=peripheral.overlay -DCONFIG_USE_DRIVER=y -DCONFIG_USE_I2S_ES8311="ENABLE"

2. Kconfig:

config USE_DRIVER
    bool "Enable Driver1"
    default n
    help
      Enable this to include Driver1 in the build.

config USE_I2S_ES8311
    string "I2S ES8311 driver selection"
    default "DISABLE"
    help
      Set this to the name of the I2S driver you want to use.
3. The configuration CONFIG_USE_DRIVER=y can be passed in correctly.
4. When passing the configuration CONFIG_USE_I2S_ES8311="ENABLE", some errors were encountered during compilation.
    error message:
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
    CMake configure failed for Zephyr project: atel
     Location: E:/ncs/v3.0.0/project/atel
    Call Stack (most recent call first):
    cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
    cmake/modules/sysbuild_default.cmake:21 (include)
    E:/ncs/v3.0.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
    E:/ncs/v3.0.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    E:/ncs/v3.0.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
    template/CMakeLists.txt:10 (find_package)



    -- Configuring incomplete, errors occurred!
    See also "E:/ncs/v3.0.0/project/atel/build/CMakeFiles/CMakeOutput.log".
   [91mFATAL ERROR: command exited with status 1: 'E:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' -           DWEST_PYTHON=E:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe '-BE:\ncs\v3.0.0\project\atel\build' -GNinja -DBOARD=nrf54l15dk/nrf54l15/cpuapp -  DCONF_FILE=peripheral.conf -DEXTRA_DTC_OVERLAY_FILE=peripheral.overlay -DCONFIG_USE_DRIVER=y -DCONFIG_USE_I2S_ES8311=ENABLE '-SE:\ncs\v3.0.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=E:\ncs\v3.0.0\project\atel'
We look forward to your prompt reply.
Parents Reply Children
Related