乐鑫技术交流
直播中

王萍

7年用户 1343经验值
私信 关注
[问答]

ESP-IDF 5.0版本USB设备例程编译不通过怎么解决?

环境:window11 vscode
版本库:v5.0-rc1*
问题:在编译usb的tusb_hid例程时,出现了下面的问题,请问需要怎么解决?

  • PS C:Users15119espscannertusb_hid> idf.py menuconfig
  • Executing action: menuconfig
  • Running cmake in directory c:users15119espscannertusb_hidbuild
  • Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 c:users15119espscannertusb_hid"...
  • -- Found Git: C:/Users/15119/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
  • -- ccache will be used for faster recompilation
  • -- The C compiler identification is GNU 11.2.0
  • -- The CXX compiler identification is GNU 11.2.0
  • -- The ASM compiler identification is GNU
  • -- Found assembler: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe
  • -- Detecting C compiler ABI info
  • -- Detecting C compiler ABI info - done
  • -- Check for working C compiler: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-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: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++.exe - skipped
  • -- Detecting CXX compile features
  • -- Detecting CXX compile features - done
  • -- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
  • -- Building ESP-IDF components for target esp32s3
  • Solving dependencies requirements
  • Updating lock file at C:/Users/15119/esp/scanner/tusb_hiddependencies.lock
  • Processing 2 dependencies:
  • [1/2] espressif/esp_tinyusb (0.0.1)
  • CMake Error at C:/Users/15119/esp/esp-idf/tools/cmake/build.cmake:519 (message):
  •   Traceback (most recent call last):

  •     File "runpy.py", line 194, in _run_module_as_main
  •     File "runpy.py", line 87, in _run_code
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_managerprepare_components__main__.py", line 3, in
  •       main()
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_managerprepare_componentsprepare.py", line 126, in main
  •       args.func(args)
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_managerprepare_componentsprepare.py", line 39, in prepare_dep_dirs
  •       ComponentManager(args.project_dir).prepare_dep_dirs(
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_managercore.py", line 404, in prepare_dep_dirs
  •       downloaded_component_paths = download_project_dependencies(
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_managerdependencies.py", line 128, in download_project_dependencies
  •       download_paths = fetcher.download()
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_toolssourcesfetcher.py", line 51, in download
  •       return self.source.download(self.component, self.managed_path)
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_toolssourcesweb_service.py", line 173, in download
  •       unpack_archive(file_path, self.component_cache_path(component))
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_toolsarchive_tools.py", line 100, in unpack_archive
  •       handler(file, destination_directory)
  •     File "C:Users15119.espressifpython_envidf5.0_py3.8_envlibsite-packagesidf_component_toolsarchive_tools.py", line 76, in unpack_tar
  •       tar.extractall(destination_directory)
  •     File "tarfile.py", line 2028, in extractall
  •     File "tarfile.py", line 2069, in extract
  •     File "tarfile.py", line 2141, in _extract_member
  •     File "tarfile.py", line 2182, in makefile

  •   FileNotFoundError: [Errno 2] No such file or directory:
  •   'C:\Users\15119\AppData\Local\Espressif\ComponentManager\Cache\service_74cc6623\espressif__esp_tinyusb_0.0.1_4fa75cb0739eddaf6aca1b57c4796387062f82eeb08435540792438beeb3316c\test\vendor\ceedling\docs\UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf'


  • Call Stack (most recent call first):
  •   C:/Users/15119/esp/esp-idf/tools/cmake/project.cmake:440 (idf_build_process)
  •   CMakeLists.txt:8 (project)


  • -- Configuring incomplete, errors occurred!
  • See also "C:/Users/15119/esp/scanner/tusb_hid/build/CMakeFiles/CMakeOutput.log".
  • cmake failed with exit code 1
  • PS C:Users15119espscannertusb_hid>

之后我尝试把idf_component.yml中的esp_tinyusb版本改为1.1.0之后,再编译,又出现了新的问题。

  • ## IDF Component Manager Manifest File
  • dependencies:
  •   espressif/esp_tinyusb: "1.1.0"
  •   idf: "^5.0"



  • PS C:Users15119espscannertusb_hid> idf.py menuconfig
  • Executing action: menuconfig
  • Running cmake in directory c:users15119espscannertusb_hidbuild
  • Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 c:users15119espscannertusb_hid"...
  • -- Found Git: C:/Users/15119/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
  • -- ccache will be used for faster recompilation
  • -- The C compiler identification is GNU 11.2.0
  • -- The CXX compiler identification is GNU 11.2.0
  • -- The ASM compiler identification is GNU
  • -- Found assembler: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe
  • -- Detecting C compiler ABI info
  • -- Detecting C compiler ABI info - done
  • -- Check for working C compiler: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-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: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++.exe - skipped
  • -- Detecting CXX compile features
  • -- Detecting CXX compile features - done
  • -- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
  • -- Building ESP-IDF components for target esp32s3

  •   FileNotFoundError: [WinError 206] 文件名或扩展名太长。:
  •   'C:\Users\15119\AppData\Local\Espressif\ComponentManager\Cache\service_74cc6623\espressif__tinyusb_0.14.2_820a2eef39c7ff0b810e859efd7035a4e5b9b44e77c49020a50ef0668fc941ae\test\unit-test\vendor\ceedling\plugins\fake_function_framework\examples\fff_example'


  • Call Stack (most recent call first):
  •   C:/Users/15119/esp/esp-idf/tools/cmake/project.cmake:440 (idf_build_process)
  •   CMakeLists.txt:8 (project)


  • -- Configuring incomplete, errors occurred!See also "C:/Users/15119/esp/scanner/tusb_hid/build/CMakeFiles/CMakeOutput.log".
  • cmake failed with exit code 1
  • PS C:Users15119espscannertusb_hid>

回帖(1)

mintsy

2024-6-12 17:36:15
您在使用ESP-IDF 5.0版本(v5.0-rc1)在Windows 11系统中使用VSCode编译USB设备例程时遇到了问题。以下是一些建议来解决这个问题:

1. 确保您的ESP-IDF版本与您的硬件兼容。请检查您的硬件是否支持ESP-IDF 5.0版本。

2. 确保您的环境变量设置正确。在Windows系统中,您需要将以下路径添加到环境变量中:
   - `C:Users.espressif`
   - `C:Users.espressiftools`

3. 确保您的Git版本与ESP-IDF兼容。您当前的Git版本是2.30.1,这应该是兼容的。但如果您仍然遇到问题,可以尝试升级到最新版本的Git。

4. 清理项目并重新编译。在VSCode的终端中,运行以下命令:
   ```
   idf.py clean
   idf.py build
   ```


举报

更多回帖

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