esp-rs / esp-idf-sys

Bindings for ESP-IDF (Espressif's IoT Development Framework)
Apache License 2.0
264 stars 119 forks source link

failed to run custom build command for `esp-idf-sys v0.33.0` #204

Closed lw664256297 closed 1 year ago

lw664256297 commented 1 year ago

Hello, I created a project through the template esp-idf-template, I only modified.cargo/config.toml file construction failed, please help me

err log

The following warnings were emitted during compilation:

warning: Configuring first supported MCU 'esp32c3' derived from the build target 'riscv32imc-esp-espidf' supporting MCUs [esp32c3, esp32c2, esp32h2, esp32c5]; explicitly specify an MCU to resolve this ambiguity

error: failed to run custom build command for `esp-idf-sys v0.33.0`

Caused by:
  process didn't exit successfully: `/Users/zhangds/IOT/rust/demo10/target/debug/build/esp-idf-sys-3ed82ede6a9e77b2/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS
  cargo:rerun-if-env-changed=MCU
  cargo:rerun-if-env-changed=ESP_IDF_SYS_ROOT_CRATE
  cargo:rerun-if-env-changed=ESP_IDF_VERSION
  cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY
  cargo:rerun-if-env-changed=ESP_IDF_CMAKE_GENERATOR
  cargo:rerun-if-env-changed=IDF_PATH
  cargo:rerun-if-env-changed=EXTRA-COMPONENTS
  cargo:rerun-if-env-changed=ESP_IDF_COMPONENTS
  cargo:warning=Configuring first supported MCU 'esp32c3' derived from the build target 'riscv32imc-esp-espidf' supporting MCUs [esp32c3, esp32c2, esp32h2, esp32c5]; explicitly specify an MCU to resolve this ambiguity
  Submodule path 'components/asio/asio': checked out 'f31694c9f1746ba189a4bcae2e34db15135ddb22'
  Submodule path 'components/bootloader/subproject/components/micro-ecc/micro-ecc': checked out 'd037ec89546fad14b5c4d5456c2e23a71e554966'
  Submodule path 'components/bt/controller/lib_esp32': checked out '8ce6d27e0981c09e1c5a982976f182d0a37662f6'
  Submodule path 'components/bt/controller/lib_esp32c3_family': checked out 'd7513ebe88d7d207f6c062ce9381d347a0a70918'
  Submodule path 'components/bt/host/nimble/nimble': checked out '4ed953346e55320ddcd09e0633fd2c4a8aef6b5b'
  Submodule path 'components/cbor/tinycbor': checked out '7c349dbb6b8d76db39383b226d3ebdf59b8ab37d'
  Submodule path 'components/cmock/CMock': checked out 'eeecc49ce8af123cf8ad40efdb9673e37b56230f'
  Submodule path 'components/cmock/CMock/vendor/c_exception': checked out '71b47be7c950f1bf5f7e5303779fa99a16224bb6'
  Submodule path 'components/cmock/CMock/vendor/unity': checked out 'cf949f45ca6d172a177b00da21310607b97bc7a7'
  Submodule path 'components/coap/libcoap': checked out '3aa11612c143c9734d72022720f33e12506f7a2c'
  Submodule path 'components/coap/libcoap/ext/tinydtls': checked out '59055b8a935bc53bf69d002fc089ad4bd08851b2'
  Submodule path 'components/esp_phy/lib': checked out '7255b24596a11f67bada61ef169b7a7a00791cbd'
  Submodule path 'components/esp_wifi/lib': checked out 'f12308854151bb05189bc8352f4fb7f45f5d5306'
  Submodule path 'components/esptool_py/esptool': checked out 'ed3af0f60b04ea7d02f995abad9bfb0c8f9b1e1a'
  Submodule path 'components/expat/expat': checked out '454c6105bc2d0ea2521b8f8f7a5161c2abd8c386'
  Submodule path 'components/ieee802154/lib': checked out 'f7b5e8059a3bb6f321e79ac3bf2aa4d2a9b93326'
  Submodule path 'components/json/cJSON': checked out 'd348621ca93571343a56862df7de4ff3bc9b5667'
  Submodule path 'components/libsodium/libsodium': checked out '4f5e89fa84ce1d178a6765b8b46f2b6f91216677'
  Submodule path 'components/lwip/lwip': checked out '6bb132e3797d5449a923804c75c57d458920f8ac'
  Submodule path 'components/mbedtls/mbedtls': checked out '15b55d406db3918bac88aaf5ef2c6e036d1e0f0e'
  Submodule path 'components/mqtt/esp-mqtt': checked out 'bb9c8af9d552b608dd3aabf9617bde757a538ebe'
  Submodule path 'components/nghttp/nghttp2': checked out '8f7b008b158e12de0e58247afd170f127dbb6456'
  Submodule path 'components/nghttp/nghttp2/third-party/mruby': checked out '7c91efc1ffda769a5f1a872c646c82b00698f1b8'
  Submodule path 'components/nghttp/nghttp2/third-party/neverbleed': checked out 'b967ca054f48a36f82d8fcdd32e54ec5144f2751'
  Submodule path 'components/openthread/lib': checked out '9a8d34d8f698cad2c9468468b473e26a3dda51b9'
  Submodule path 'components/openthread/openthread': checked out 'c36c0e77a2465355bcf13bd7dc718d8c9aa6ff64'
  Submodule path 'components/protobuf-c/protobuf-c': checked out 'f224ab2eeb648a818eb20687d7150a285442c907'
  Submodule path 'components/spiffs/spiffs': checked out '0dbb3f71c5f6fae3747a9d935372773762baf852'
  Submodule path 'components/tinyusb/tinyusb': checked out 'c4badd394eda18199c0196ed0be1e2d635f0a5f6'
  Submodule path 'components/unity/unity': checked out '7d2bf62b7e6afaf38153041a9d53c21aeeca9a25'
  Submodule path 'examples/build_system/cmake/import_lib/main/lib/tinyxml2': checked out '7e8e249990ec491ec15990cf95b6d871a66cf64a'
  Submodule path 'examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib': checked out '36d0642e66ff5b1c7a291873f24c498ca6ffedef'
  OPENOCD_SCRIPTS=/Users/zhangds/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/share/openocd/scripts
  IDF_PYTHON_ENV_PATH=/Users/zhangds/.espressif/python_env/idf4.4_py3.11_env
  PATH=/Users/zhangds/.espressif/tools/xtensa-esp-elf-gdb/11.2_20220823/xtensa-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/riscv32-esp-elf-gdb/11.2_20220823/riscv32-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s2-elf/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin:/Users/zhangds/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin:/Users/zhangds/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/Users/zhangds/.espressif/tools/cmake/3.23.1/CMake.app/Contents/bin:/Users/zhangds/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/bin:/Users/zhangds/.espressif/tools/ninja/1.10.2/:/Users/zhangds/.espressif/python_env/idf4.4_py3.11_env/bin:/Users/zhangds/.espressif/esp-idf/release-v4.4/tools:$PATH
  Current system platform: macos
  Skipping riscv32-esp-elf@esp-2021r2-patch5-8.4.0 (already installed)
  Skipping cmake@3.23.1 (already installed)
  Skipping ninja@1.10.2 (already installed)
  OPENOCD_SCRIPTS=/Users/zhangds/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/share/openocd/scripts
  IDF_PYTHON_ENV_PATH=/Users/zhangds/.espressif/python_env/idf4.4_py3.11_env
  PATH=/Users/zhangds/.espressif/tools/xtensa-esp-elf-gdb/11.2_20220823/xtensa-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/riscv32-esp-elf-gdb/11.2_20220823/riscv32-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s2-elf/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin:/Users/zhangds/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin:/Users/zhangds/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/Users/zhangds/.espressif/tools/cmake/3.23.1/CMake.app/Contents/bin:/Users/zhangds/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/bin:/Users/zhangds/.espressif/tools/ninja/1.10.2/:/Users/zhangds/.espressif/python_env/idf4.4_py3.11_env/bin:/Users/zhangds/.espressif/esp-idf/release-v4.4/tools:$PATH
  cargo:rerun-if-changed=/Users/zhangds/IOT/rust/demo10/sdkconfig.defaults
  CMAKE_PREFIX_PATH_riscv32imc-esp-espidf = None
  CMAKE_PREFIX_PATH_riscv32imc_esp_espidf = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_riscv32imc-esp-espidf = None
  CMAKE_riscv32imc_esp_espidf = None
  TARGET_CMAKE = None
  CMAKE = None
  running: cd "/Users/zhangds/IOT/rust/demo10/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-f4f76de1b1587451/out/build" && CMAKE_PREFIX_PATH="" EXTRA_COMPONENT_DIRS="" IDF_PATH="/Users/zhangds/.espressif/esp-idf/release-v4.4" IDF_TARGET="esp32c3" IDF_TOOLS_PATH="/Users/zhangds/.espressif" PATH="/Users/zhangds/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/Users/zhangds/.espressif/esp-idf/release-v4.4/tools:/Users/zhangds/.espressif/tools/riscv32-esp-elf-gdb/11.2_20220823/riscv32-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin:/Users/zhangds/.espressif/python_env/idf4.4_py3.11_env/bin:/Users/zhangds/.espressif/tools/xtensa-esp-elf-gdb/11.2_20220823/xtensa-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/cmake/3.23.1/CMake.app/Contents/bin:/Users/zhangds/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin:/Users/zhangds/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s2-elf/bin:/Users/zhangds/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/bin:/Users/zhangds/.espressif/tools/ninja/1.10.2/:/Users/zhangds/.nvm/versions/node/v18.14.2/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/zhangds/.cargo/bin:/Users/zhangds/.rustup/toolchains/esp/xtensa-esp32s2-elf/esp-2021r2-patch5-8_4_0/xtensa-esp32s2-elf/bin:/Users/zhangds/.rustup/toolchains/esp/xtensa-esp32s3-elf/esp-2021r2-patch5-8_4_0/xtensa-esp32s3-elf/bin:/Users/zhangds/.rustup/toolchains/esp/xtensa-esp32-elf/esp-2021r2-patch5-8_4_0/xtensa-esp32-elf/bin:/Users/zhangds/.rustup/toolchains/esp/riscv32-esp-elf/esp-2021r2-patch5-8_4_0/riscv32-esp-elf/bin:/usr/local/Homebrew/bin:/Users/zhangds/Library/Android/sdk/emulator:/Users/zhangds/Library/Android/sdk/tools:/Users/zhangds/Library/Android/sdk/tools/bin:/Users/zhangds/Library/Android/sdk/platform-tools" SDKCONFIG_DEFAULTS="/Users/zhangds/IOT/rust/demo10/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-f4f76de1b1587451/out/gen-sdkconfig.defaults;/Users/zhangds/IOT/rust/demo10/sdkconfig.defaults" "cmake" "/Users/zhangds/IOT/rust/demo10/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-f4f76de1b1587451/out" "-G" "Ninja" "-DCMAKE_TOOLCHAIN_FILE=/Users/zhangds/.espressif/esp-idf/release-v4.4/tools/cmake/toolchain-esp32c3.cmake" "-DCMAKE_BUILD_TYPE=" "-DPYTHON=/Users/zhangds/.espressif/python_env/idf4.4_py3.11_env/bin/python" "-DCMAKE_INSTALL_PREFIX=/Users/zhangds/IOT/rust/demo10/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-f4f76de1b1587451/out" "-DCMAKE_C_FLAGS= -march=rv32imc -ffunction-sections -fdata-sections -march=rv32imc -mabi=ilp32 -mcmodel=medany" "-DCMAKE_CXX_FLAGS= -march=rv32imc -ffunction-sections -fdata-sections -march=rv32imc -mabi=ilp32 -mcmodel=medany" "-DCMAKE_ASM_FLAGS=  -ffunction-sections -fdata-sections -march=rv32imc -mabi=ilp32 -mcmodel=medany"
  -- Found Git: /usr/bin/git (found version "2.30.1 (Apple Git-130)") 
  -- The C compiler identification is GNU 8.4.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/zhangds/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Checking Python dependencies...
  The following Python requirements are not satisfied:
  urllib3<2
  Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
  Diagnostic information:
      IDF_PYTHON_ENV_PATH: (not set)
      Python interpreter used: /Users/zhangds/.espressif/python_env/idf4.4_py3.11_env/bin/python
      Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
      PATH: /Users/zhangds/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/Users/zhangds/.espressif/esp-idf/release-v4.4/tools:/Users/zhangds/.espressif/tools/riscv32-esp-elf-gdb/11.2_20220823/riscv32-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin:/Users/zhangds/.espressif/python_env/idf4.4_py3.11_env/bin:/Users/zhangds/.espressif/tools/xtensa-esp-elf-gdb/11.2_20220823/xtensa-esp-elf-gdb/bin:/Users/zhangds/.espressif/tools/cmake/3.23.1/CMake.app/Contents/bin:/Users/zhangds/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin:/Users/zhangds/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/bin:/Users/zhangds/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s2-elf/bin:/Users/zhangds/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/bin:/Users/zhangds/.espressif/tools/ninja/1.10.2/:/Users/zhangds/.nvm/versions/node/v18.14.2/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/zhangds/.cargo/bin:/Users/zhangds/.rustup/toolchains/esp/xtensa-esp32s2-elf/esp-2021r2-patch5-8_4_0/xtensa-esp32s2-elf/bin:/Users/zhangds/.rustup/toolchains/esp/xtensa-esp32s3-elf/esp-2021r2-patch5-8_4_0/xtensa-esp32s3-elf/bin:/Users/zhangds/.rustup/toolchains/esp/xtensa-esp32-elf/esp-2021r2-patch5-8_4_0/xtensa-esp32-elf/bin:/Users/zhangds/.rustup/toolchains/esp/riscv32-esp-elf/esp-2021r2-patch5-8_4_0/riscv32-esp-elf/bin:/usr/local/Homebrew/bin:/Users/zhangds/Library/Android/sdk/emulator:/Users/zhangds/Library/Android/sdk/tools:/Users/zhangds/Library/Android/sdk/tools/bin:/Users/zhangds/Library/Android/sdk/platform-tools
  -- Configuring incomplete, errors occurred!
  See also "/Users/zhangds/IOT/rust/demo10/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-f4f76de1b1587451/out/build/CMakeFiles/CMakeOutput.log".

  --- stderr
  Build configuration: BuildConfig {
      esp_idf_tools_install_dir: Some(
          Global,
      ),
      esp_idf_sdkconfig: None,
      esp_idf_sdkconfig_defaults: None,
      mcu: None,
      native: NativeConfig {
          esp_idf_version: Some(
              Branch(
                  "release/v4.4",
              ),
          ),
          esp_idf_repository: None,
          esp_idf_cmake_generator: None,
          idf_path: None,
          extra_components: [],
          esp_idf_components: None,
      },
      esp_idf_sys_root_crate: None,
  }
  Using managed esp-idf repository: RemoteSdk { repo_url: None, git_ref: Branch("release/v4.4") }
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4'...
Updating files: 100% (9824/9824), done.
  Submodule 'components/asio/asio' (https://github.com/espressif/asio.git) registered for path 'components/asio/asio'
  Submodule 'components/bootloader/subproject/components/micro-ecc/micro-ecc' (https://github.com/kmackay/micro-ecc.git) registered for path 'components/bootloader/subproject/components/micro-ecc/micro-ecc'
  Submodule 'components/bt/controller/lib_esp32' (https://github.com/espressif/esp32-bt-lib.git) registered for path 'components/bt/controller/lib_esp32'
  Submodule 'components/bt/controller/lib_esp32c3_family' (https://github.com/espressif/esp32c3-bt-lib.git) registered for path 'components/bt/controller/lib_esp32c3_family'
  Submodule 'components/bt/host/nimble/nimble' (https://github.com/espressif/esp-nimble.git) registered for path 'components/bt/host/nimble/nimble'
  Submodule 'components/cbor/tinycbor' (https://github.com/intel/tinycbor.git) registered for path 'components/cbor/tinycbor'
  Submodule 'components/cmock/CMock' (https://github.com/ThrowTheSwitch/CMock.git) registered for path 'components/cmock/CMock'
  Submodule 'components/coap/libcoap' (https://github.com/obgm/libcoap.git) registered for path 'components/coap/libcoap'
  Submodule 'components/esp_phy/lib' (https://github.com/espressif/esp-phy-lib.git) registered for path 'components/esp_phy/lib'
  Submodule 'components/esp_wifi/lib' (https://github.com/espressif/esp32-wifi-lib.git) registered for path 'components/esp_wifi/lib'
  Submodule 'components/esptool_py/esptool' (https://github.com/espressif/esptool.git) registered for path 'components/esptool_py/esptool'
  Submodule 'components/expat/expat' (https://github.com/libexpat/libexpat.git) registered for path 'components/expat/expat'
  Submodule 'components/ieee802154/lib' (https://github.com/espressif/esp-ieee802154-lib.git) registered for path 'components/ieee802154/lib'
  Submodule 'components/json/cJSON' (https://github.com/DaveGamble/cJSON.git) registered for path 'components/json/cJSON'
  Submodule 'components/libsodium/libsodium' (https://github.com/jedisct1/libsodium.git) registered for path 'components/libsodium/libsodium'
  Submodule 'components/lwip/lwip' (https://github.com/espressif/esp-lwip.git) registered for path 'components/lwip/lwip'
  Submodule 'components/mbedtls/mbedtls' (https://github.com/espressif/mbedtls.git) registered for path 'components/mbedtls/mbedtls'
  Submodule 'components/mqtt/esp-mqtt' (https://github.com/espressif/esp-mqtt.git) registered for path 'components/mqtt/esp-mqtt'
  Submodule 'components/nghttp/nghttp2' (https://github.com/nghttp2/nghttp2.git) registered for path 'components/nghttp/nghttp2'
  Submodule 'components/openthread/lib' (https://github.com/espressif/esp-thread-lib.git) registered for path 'components/openthread/lib'
  Submodule 'components/openthread/openthread' (https://github.com/espressif/openthread.git) registered for path 'components/openthread/openthread'
  Submodule 'components/protobuf-c/protobuf-c' (https://github.com/protobuf-c/protobuf-c.git) registered for path 'components/protobuf-c/protobuf-c'
  Submodule 'components/spiffs/spiffs' (https://github.com/pellepl/spiffs.git) registered for path 'components/spiffs/spiffs'
  Submodule 'components/tinyusb/tinyusb' (https://github.com/espressif/tinyusb.git) registered for path 'components/tinyusb/tinyusb'
  Submodule 'components/unity/unity' (https://github.com/ThrowTheSwitch/Unity.git) registered for path 'components/unity/unity'
  Submodule 'examples/build_system/cmake/import_lib/main/lib/tinyxml2' (https://github.com/leethomason/tinyxml2.git) registered for path 'examples/build_system/cmake/import_lib/main/lib/tinyxml2'
  Submodule 'examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib' (https://github.com/espressif/esp-cryptoauthlib.git) registered for path 'examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib'
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/asio/asio'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/bootloader/subproject/components/micro-ecc/micro-ecc'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/bt/controller/lib_esp32'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/bt/controller/lib_esp32c3_family'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/bt/host/nimble/nimble'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/cbor/tinycbor'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/cmock/CMock'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/coap/libcoap'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/esp_phy/lib'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/esp_wifi/lib'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/esptool_py/esptool'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/expat/expat'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/ieee802154/lib'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/json/cJSON'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/libsodium/libsodium'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/lwip/lwip'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/mbedtls/mbedtls'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/mqtt/esp-mqtt'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/nghttp/nghttp2'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/openthread/lib'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/openthread/openthread'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/protobuf-c/protobuf-c'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/spiffs/spiffs'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/tinyusb/tinyusb'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/unity/unity'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/examples/build_system/cmake/import_lib/main/lib/tinyxml2'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib'...
  From ssh://github.com/espressif/asio
   * branch            f31694c9f1746ba189a4bcae2e34db15135ddb22 -> FETCH_HEAD
  From ssh://github.com/kmackay/micro-ecc
   * branch            d037ec89546fad14b5c4d5456c2e23a71e554966 -> FETCH_HEAD
  From ssh://github.com/espressif/esp32-bt-lib
   * branch            8ce6d27e0981c09e1c5a982976f182d0a37662f6 -> FETCH_HEAD
  From ssh://github.com/intel/tinycbor
   * branch            7c349dbb6b8d76db39383b226d3ebdf59b8ab37d -> FETCH_HEAD
  From ssh://github.com/ThrowTheSwitch/CMock
   * branch            eeecc49ce8af123cf8ad40efdb9673e37b56230f -> FETCH_HEAD
  Submodule 'vendor/c_exception' (https://github.com/throwtheswitch/cexception.git) registered for path 'components/cmock/CMock/vendor/c_exception'
  Submodule 'vendor/unity' (https://github.com/throwtheswitch/unity.git) registered for path 'components/cmock/CMock/vendor/unity'
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/cmock/CMock/vendor/c_exception'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/cmock/CMock/vendor/unity'...
  From ssh://github.com/throwtheswitch/cexception
   * branch            71b47be7c950f1bf5f7e5303779fa99a16224bb6 -> FETCH_HEAD
  From ssh://github.com/throwtheswitch/unity
   * branch            cf949f45ca6d172a177b00da21310607b97bc7a7 -> FETCH_HEAD
  From ssh://github.com/obgm/libcoap
   * branch            3aa11612c143c9734d72022720f33e12506f7a2c -> FETCH_HEAD
  Submodule 'ext/tinydtls' (https://github.com/eclipse/tinydtls.git) registered for path 'components/coap/libcoap/ext/tinydtls'
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/coap/libcoap/ext/tinydtls'...
  From ssh://github.com/eclipse/tinydtls
   * branch            59055b8a935bc53bf69d002fc089ad4bd08851b2 -> FETCH_HEAD
  From ssh://github.com/espressif/esp-phy-lib
   * branch            7255b24596a11f67bada61ef169b7a7a00791cbd -> FETCH_HEAD
  From ssh://github.com/espressif/esp32-wifi-lib
   * branch            f12308854151bb05189bc8352f4fb7f45f5d5306 -> FETCH_HEAD
  From ssh://github.com/espressif/esptool
   * branch            ed3af0f60b04ea7d02f995abad9bfb0c8f9b1e1a -> FETCH_HEAD
  From ssh://github.com/libexpat/libexpat
   * branch            454c6105bc2d0ea2521b8f8f7a5161c2abd8c386 -> FETCH_HEAD
  From ssh://github.com/espressif/esp-ieee802154-lib
   * branch            f7b5e8059a3bb6f321e79ac3bf2aa4d2a9b93326 -> FETCH_HEAD
  From ssh://github.com/DaveGamble/cJSON
   * branch            d348621ca93571343a56862df7de4ff3bc9b5667 -> FETCH_HEAD
  From ssh://github.com/jedisct1/libsodium
   * branch            4f5e89fa84ce1d178a6765b8b46f2b6f91216677 -> FETCH_HEAD
  From ssh://github.com/espressif/esp-lwip
   * branch            6bb132e3797d5449a923804c75c57d458920f8ac -> FETCH_HEAD
  From ssh://github.com/espressif/mbedtls
   * branch            15b55d406db3918bac88aaf5ef2c6e036d1e0f0e -> FETCH_HEAD
  From ssh://github.com/espressif/esp-mqtt
   * branch            bb9c8af9d552b608dd3aabf9617bde757a538ebe -> FETCH_HEAD
  From ssh://github.com/nghttp2/nghttp2
   * branch            8f7b008b158e12de0e58247afd170f127dbb6456 -> FETCH_HEAD
  Submodule 'third-party/mruby' (https://github.com/mruby/mruby) registered for path 'components/nghttp/nghttp2/third-party/mruby'
  Submodule 'third-party/neverbleed' (https://github.com/tatsuhiro-t/neverbleed.git) registered for path 'components/nghttp/nghttp2/third-party/neverbleed'
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/nghttp/nghttp2/third-party/mruby'...
  Cloning into '/Users/zhangds/.espressif/esp-idf/release-v4.4/components/nghttp/nghttp2/third-party/neverbleed'...
  From ssh://github.com/mruby/mruby
   * branch            7c91efc1ffda769a5f1a872c646c82b00698f1b8 -> FETCH_HEAD
  From ssh://github.com/tatsuhiro-t/neverbleed
   * branch            b967ca054f48a36f82d8fcdd32e54ec5144f2751 -> FETCH_HEAD
  From ssh://github.com/espressif/esp-thread-lib
   * branch            9a8d34d8f698cad2c9468468b473e26a3dda51b9 -> FETCH_HEAD
  From ssh://github.com/espressif/openthread
   * branch            c36c0e77a2465355bcf13bd7dc718d8c9aa6ff64 -> FETCH_HEAD
  From ssh://github.com/protobuf-c/protobuf-c
   * branch            f224ab2eeb648a818eb20687d7150a285442c907 -> FETCH_HEAD
  From ssh://github.com/pellepl/spiffs
   * branch            0dbb3f71c5f6fae3747a9d935372773762baf852 -> FETCH_HEAD
  From ssh://github.com/espressif/tinyusb
   * branch            c4badd394eda18199c0196ed0be1e2d635f0a5f6 -> FETCH_HEAD
  From ssh://github.com/ThrowTheSwitch/Unity
   * branch            7d2bf62b7e6afaf38153041a9d53c21aeeca9a25 -> FETCH_HEAD
  From ssh://github.com/leethomason/tinyxml2
   * branch            7e8e249990ec491ec15990cf95b6d871a66cf64a -> FETCH_HEAD
  From ssh://github.com/espressif/esp-cryptoauthlib
   * branch            36d0642e66ff5b1c7a291873f24c498ca6ffedef -> FETCH_HEAD
  fatal: No names found, cannot describe anything.
  Using esp-idf v4.4.4 at '/Users/zhangds/.espressif/esp-idf/release-v4.4'
  fatal: No names found, cannot describe anything.
  error: patch failed: components/app_update/esp_app_desc.c:11
  error: components/app_update/esp_app_desc.c: patch does not apply
  CMake Error at /Users/zhangds/.espressif/esp-idf/release-v4.4/tools/cmake/build.cmake:296 (message):
    Some Python dependencies must be installed.  Check above message for
    details.
  Call Stack (most recent call first):
    /Users/zhangds/.espressif/esp-idf/release-v4.4/tools/cmake/build.cmake:425 (__build_check_python)
    CMakeLists.txt:16 (idf_build_process)

  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /Users/zhangds/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/cmake-0.1.50/src/lib.rs:1098:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

.cargo/config.toml

[build]
target = "riscv32imc-esp-espidf"

[target.riscv32imc-esp-espidf]
linker = "ldproxy"
runner = "espflash --monitor" # Select this runner for espflash v1.x.x
# runner = "espflash flash --monitor"            # Select this runner for espflash v2.x.x
rustflags = ["-C", "default-linker-libraries"]

[unstable]
build-std = ["std", "panic_abort"]

[env]
# Note: these variables are not used when using pio builder (`cargo build --features pio`)
ESP_IDF_VERSION = "release/v4.4"
ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" }
lw664256297 commented 1 year ago

This can be solved temporarily by installing esp-idf locally, And then set

ESP_IDF_TOOLS_INSTALL_DIR = { value = "fromenv" }

remark

You will need to install esp-idf(Don't choose the wrong version)

esp-idf

Vollbrecht commented 1 year ago

this probably happened because you have probably leftover env vars in your context from a esp-idf installation. on default the template installs its own version of esp-idf-sys in the .embuild dir in your project for every project. But seeing Using esp-idf v4.4.4 at '/Users/zhangds/.espressif/esp-idf/release-v4.4' this was overridden in your place.