【已解决】【新手】请教ESP-IDF 5.0版本 USB设备例程编译不通过问题?

cxm007
Posts: 15
Joined: Wed Mar 15, 2023 2:44 am

【已解决】【新手】请教ESP-IDF 5.0版本 USB设备例程编译不通过问题?

Postby cxm007 » Wed Mar 15, 2023 3:30 am

环境:window11 vscode
版本库:v5.0-rc1*
问题:在编译usb的tusb_hid例程时,出现了下面的问题,请问需要怎么解决?
  1. PS C:\Users\15119\esp\scanner\tusb_hid> idf.py menuconfig
  2. Executing action: menuconfig
  3. Running cmake in directory c:\users\15119\esp\scanner\tusb_hid\build
  4. Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 c:\users\15119\esp\scanner\tusb_hid"...
  5. -- Found Git: C:/Users/15119/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
  6. -- ccache will be used for faster recompilation
  7. -- The C compiler identification is GNU 11.2.0
  8. -- The CXX compiler identification is GNU 11.2.0
  9. -- The ASM compiler identification is GNU
  10. -- Found assembler: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe
  11. -- Detecting C compiler ABI info
  12. -- Detecting C compiler ABI info - done
  13. -- 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
  14. -- Detecting C compile features
  15. -- Detecting C compile features - done
  16. -- Detecting CXX compiler ABI info
  17. -- Detecting CXX compiler ABI info - done
  18. -- 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
  19. -- Detecting CXX compile features
  20. -- Detecting CXX compile features - done
  21. -- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
  22. -- Building ESP-IDF components for target esp32s3
  23. Solving dependencies requirements
  24. Updating lock file at C:/Users/15119/esp/scanner/tusb_hid\dependencies.lock
  25. Processing 2 dependencies:
  26. [1/2] espressif/esp_tinyusb (0.0.1)
  27. CMake Error at C:/Users/15119/esp/esp-idf/tools/cmake/build.cmake:519 (message):
  28.   Traceback (most recent call last):
  29.  
  30.     File "runpy.py", line 194, in _run_module_as_main
  31.     File "runpy.py", line 87, in _run_code
  32.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_manager\prepare_components\__main__.py", line 3, in <module>
  33.       main()
  34.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_manager\prepare_components\prepare.py", line 126, in main
  35.       args.func(args)
  36.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_manager\prepare_components\prepare.py", line 39, in prepare_dep_dirs
  37.       ComponentManager(args.project_dir).prepare_dep_dirs(
  38.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_manager\core.py", line 404, in prepare_dep_dirs
  39.       downloaded_component_paths = download_project_dependencies(
  40.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_manager\dependencies.py", line 128, in download_project_dependencies
  41.       download_paths = fetcher.download()
  42.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_tools\sources\fetcher.py", line 51, in download
  43.       return self.source.download(self.component, self.managed_path)
  44.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_tools\sources\web_service.py", line 173, in download
  45.       unpack_archive(file_path, self.component_cache_path(component))
  46.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_tools\archive_tools.py", line 100, in unpack_archive
  47.       handler(file, destination_directory)
  48.     File "C:\Users\15119\.espressif\python_env\idf5.0_py3.8_env\lib\site-packages\idf_component_tools\archive_tools.py", line 76, in unpack_tar
  49.       tar.extractall(destination_directory)
  50.     File "tarfile.py", line 2028, in extractall
  51.     File "tarfile.py", line 2069, in extract
  52.     File "tarfile.py", line 2141, in _extract_member
  53.     File "tarfile.py", line 2182, in makefile
  54.  
  55.   FileNotFoundError: [Errno 2] No such file or directory:
  56.   'C:\\Users\\15119\\AppData\\Local\\Espressif\\ComponentManager\\Cache\\service_74cc6623\\espressif__esp_tinyusb_0.0.1_4fa75cb0739eddaf6aca1b57c4796387062f82eeb08435540792438beeb3316c\\test\\vendor\\ceedling\\docs\\UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf'
  57.  
  58.  
  59. Call Stack (most recent call first):
  60.   C:/Users/15119/esp/esp-idf/tools/cmake/project.cmake:440 (idf_build_process)
  61.   CMakeLists.txt:8 (project)
  62.  
  63.  
  64. -- Configuring incomplete, errors occurred!
  65. See also "C:/Users/15119/esp/scanner/tusb_hid/build/CMakeFiles/CMakeOutput.log".
  66. cmake failed with exit code 1
  67. PS C:\Users\15119\esp\scanner\tusb_hid>
之后我尝试把idf_component.yml中的esp_tinyusb版本改为1.1.0之后,再编译,又出现了新的问题。
  1. ## IDF Component Manager Manifest File
  2. dependencies:
  3.   espressif/esp_tinyusb: "1.1.0"
  4.   idf: "^5.0"
  1.  
  2. PS C:\Users\15119\esp\scanner\tusb_hid> idf.py menuconfig
  3. Executing action: menuconfig
  4. Running cmake in directory c:\users\15119\esp\scanner\tusb_hid\build
  5. Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 c:\users\15119\esp\scanner\tusb_hid"...
  6. -- Found Git: C:/Users/15119/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
  7. -- ccache will be used for faster recompilation
  8. -- The C compiler identification is GNU 11.2.0
  9. -- The CXX compiler identification is GNU 11.2.0
  10. -- The ASM compiler identification is GNU
  11. -- Found assembler: C:/Users/15119/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe
  12. -- Detecting C compiler ABI info
  13. -- Detecting C compiler ABI info - done
  14. -- 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
  15. -- Detecting C compile features
  16. -- Detecting C compile features - done
  17. -- Detecting CXX compiler ABI info
  18. -- Detecting CXX compiler ABI info - done
  19. -- 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
  20. -- Detecting CXX compile features
  21. -- Detecting CXX compile features - done
  22. -- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
  23. -- Building ESP-IDF components for target esp32s3
  24.  
  25.   FileNotFoundError: [WinError 206] 文件名或扩展名太长。:
  26.   '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'
  27.  
  28.  
  29. Call Stack (most recent call first):
  30.   C:/Users/15119/esp/esp-idf/tools/cmake/project.cmake:440 (idf_build_process)
  31.   CMakeLists.txt:8 (project)
  32.  
  33.  
  34. -- Configuring incomplete, errors occurred!See also "C:/Users/15119/esp/scanner/tusb_hid/build/CMakeFiles/CMakeOutput.log".
  35. cmake failed with exit code 1
  36. PS C:\Users\15119\esp\scanner\tusb_hid>

ESP_Junru
Posts: 49
Joined: Tue Jul 12, 2022 6:26 am

Re: 【新手】请教ESP-IDF 5.0版本 USB设备例程编译不通过问题?

Postby ESP_Junru » Tue Mar 21, 2023 9:11 am

1. 请移除 Build,mannaged_components,dependencies.lock 目录后再编译。
2. 取保 esp-idf 子模块拉取完全

cxm007
Posts: 15
Joined: Wed Mar 15, 2023 2:44 am

Re: 【新手】请教ESP-IDF 5.0版本 USB设备例程编译不通过问题?

Postby cxm007 » Wed Mar 22, 2023 8:44 am

我又试了下,还是不行。
之后我试着更新了组件管理器
  1. python -m pip install --upgrade idf-component-manager
更新完成后就可以了。
打破认知

Who is online

Users browsing this forum: No registered users and 46 guests