How to copy a project from github into my vscode IDF installation

MichaelS
Posts: 35
Joined: Mon Jul 08, 2024 12:08 am

How to copy a project from github into my vscode IDF installation

Postby MichaelS » Sat Nov 30, 2024 12:23 am

I am using vscode and IDF.

Up until now I have used the example projects which get installed with IDF as a basis for a new project. But there is an example project on github at examples/usb/host/usb_cdc_4g_module which I want to use, and is not in my installed examples..

I don't want to clone the entire repository, so I downloaded the folder structure at https://github.com/espressif/esp-iot-so ... _4g_module

But I can't build or even run menu config without getting lots of errors, see below

What is the correct procedure for doing this?
Thanks

Code: Select all

[SDK Configuration Editor]
Executing action: confserver
Running cmake in directory C:\Users\micha\Documents\Cybertek\Software\usb_cdc_4g_module\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\Users\micha\.espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 C:\Users\micha\Documents\Cybertek\Software\usb_cdc_4g_module"...
-- Found Git: C:/Users/micha/.espressif/tools/idf-git/2.39.2/cmd/git.exe (found version "2.39.2.windows.1") 

-- ccache will be used for faster recompilation

-- 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: C:/Users/micha/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/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: C:/Users/micha/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/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: C:/Users/micha/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/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

Dependencies lock doesn't exist, solving dependencies.


---------------------------ERROR--------------------------

CMake Error at C:/Users/micha/esp/v5.3.1/esp-idf/tools/cmake/build.cmake:552 (message):
  ERROR: The "override_path" field in the manifest file
  "C:\Users\micha\components\usb\iot_usbh_modem\idf_component.yml" does not
  point to a directory.  You can safely remove this field from the manifest
  if this project is an example copied from a component repository.  The
  dependency will be downloaded from the ESP component registry.
  Documentation:
  https://docs.espressif.com/projects/idf-component-manager/en/latest/reference/manifest_file.html#override-path


Call Stack (most recent call first):
  C:/Users/micha/esp/v5.3.1/esp-idf/tools/cmake/project.cmake:710 (idf_build_process)
  CMakeLists.txt:6 (project)



-----------------------END OF ERROR-----------------------
-- Configuring incomplete, errors occurred!
See also "C:/Users/micha/Documents/Cybertek/Software/usb_cdc_4g_module/build/CMakeFiles/CMakeOutput.log".

---------------------------ERROR--------------------------

cmake failed with exit code 1, output of the command is in the C:\Users\micha\Documents\Cybertek\Software\usb_cdc_4g_module\build\log\idf_py_stderr_output_91912 and C:\Users\micha\Documents\Cybertek\Software\usb_cdc_4g_module\build\log\idf_py_stdout_output_91912

-----------------------END OF ERROR-----------------------
---------------------------ERROR--------------------------

SDK Configuration editor confserver process exited with code: 2
-----------------------END OF ERROR-----------------------

MicroController
Posts: 1994
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: How to copy a project from github into my vscode IDF installation

Postby MicroController » Sat Nov 30, 2024 9:28 am

Apparently, the component you try to build depends on a component "iot_usbh_modem" from the same repository, which it expects to also find locally. Best to clone or download the whole repo so that all dependencies are also there.

MichaelS
Posts: 35
Joined: Mon Jul 08, 2024 12:08 am

Re: How to copy a project from github into my vscode IDF installation

Postby MichaelS » Sat Nov 30, 2024 7:22 pm

Thanks for your help.
But my ultimate goal is to merge this functionality into main project using my local IDF installation.
I can manually download and copy the missing components into my local vscode IDF component directory structure, but there must be a "proper" way to do this.
Why are there two espressif repositories?
https://github.com/espressif/esp-idf/tr ... r/examples
https://github.com/espressif/esp-iot-so ... r/examples

Is esp-iot-solution compatible with IDF?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 122 guests