乐鑫技术交流
直播中

吴湛

9年用户 883经验值
擅长:电源/新能源
私信 关注
[问答]

使用vscode创建I2S_es7210_tdm的例程,选择芯片时报错且无法正常编译是怎么回事?

使用vscode创建I2S_es7210_tdm的例程,在选择芯片时弹出如下错误,且导致工程无法正常编译;

[Error: non zero exit code 2

Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Executing action: set-target
Set Target to: esp32s3, new sdkconfig will be created.
Running cmake in directory E:Projecti2s_es7210_tdmbuild
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=e:EnvESP.espressifpython_envidf5.2_py3.11_envScriptspython.exe -DESP_PLATFORM=1 -DIDF_TARGET=esp32s3 -DCCACHE_ENABLE=0 E:Projecti2s_es7210_tdm"...
-- Existing sdkconfig 'E:/Project/i2s_es7210_tdm/sdkconfig' renamed to 'E:/Project/i2s_es7210_tdm/sdkconfig.old'.
-- Found Git: E:/Env/ESP/.espressif/tools/idf-git/2.39.2/cmd/git.exe (found version "2.39.2.windows.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: E:/Env/ESP/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: E:/Env/ESP/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: E:/Env/ESP/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32s3
Processing 2 dependencies:

[1/2] espressif/es7210 (1.0.1)

[2/2] idf (5.2.1)

CMake Error at build/component_requires.temp.cmake:317 (__component_set_property):
  Syntax error in cmake code at

    E:/Project/i2s_es7210_tdm/build/component_requires.temp.cmake:317

  when parsing string

    e:EnvESPv5.2.1esp-idf/examples/peripherals/i2s/common

  Invalid character escape 'E'.
Call Stack (most recent call first):
  E:/Env/ESP/v5.2.1/esp-idf/tools/cmake/component.cmake:254 (include)
  E:/Env/ESP/v5.2.1/esp-idf/tools/cmake/build.cmake:578 (__component_get_requirements)
  E:/Env/ESP/v5.2.1/esp-idf/tools/cmake/project.cmake:605 (idf_build_process)
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "E:/Project/i2s_es7210_tdm/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the E:Projecti2s_es7210_tdmbuildlogidf_py_stderr_output_15452 and E:Projecti2s_es7210_tdmbuildlogidf_py_stdout_output_15452

        at ChildProcess. (distextension.js:2:1394091)
        at ChildProcess.emit (node:events:517:28)
        at ChildProcess._handle.onexit (node:internal/child_process:292:12)]
                                                                                                                                                                     

回帖(1)

安德森大

2024-6-5 16:05:37
根据您提供的错误信息,这个问题可能是由于以下几个原因导致的:

1. **芯片选择错误**:确保您在创建项目时选择了正确的芯片型号。在您的错误信息中,目标芯片被设置为 "esp32s3",但您的项目可能是针对其他型号的芯片。请检查您的项目设置,确保选择了正确的芯片型号。

2. **配置文件问题**:错误信息中提到 "new sdkconfig will be created",这可能意味着配置文件(sdkconfig)没有正确生成或存在问题。您可以尝试手动创建或更新配置文件,然后重新编译项目。

3. **CMake问题**:错误信息中提到 "Running cmake in directory E:Projecti2s_es7210_tdmbuild",这表明CMake可能没有正确执行。请确保您的CMake工具链文件(toolchain file)正确设置,并且与您的项目和芯片型号兼容。

4. **环境问题**:确保您的开发环境(如Python、CMake、ESPRESSIF-IDF等)已正确安装并配置。检查环境变量和路径设置,确保所有必要的工具和库都已正确安装。

5. **权限问题**:在某些情况下,权限问题可能导致编译失败。请确保您有足够的权限访问项目文件夹和相关文件。

解决步骤:

1. **检查芯片型号**:确保您选择了正确的芯片型号。

2. **检查配置文件**:手动创建或更新配置文件(sdkconfig),然后重新编译项目。

3. **检查CMake设置**:确保CMake工具链文件正确设置,并与您的项目和芯片型号兼容。

4. **检查开发环境**:确保所有必要的工具和库都已正确安装。

5. **检查权限**:确保您有足够的权限访问项目文件夹和相关文件。

6. **清理项目**:尝试清理项目(例如,删除build文件夹),然后重新编译。

7. **查看详细日志**:如果问题仍然存在,请查看更详细的编译日志,以便找到具体的错误信息和解决方案。

希望这些建议能帮助您解决问题。如果问题仍然存在,请提供更多详细信息,以便我们能更好地帮助您。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分