esp-rs / esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
https://docs.esp-rs.org/esp-idf-svc/
Apache License 2.0
326 stars 180 forks source link

the crate given by `ESP_IDF_SYS_ROOT_CRATE` does not exist in this workspace #515

Open vortex314 opened 3 hours ago

vortex314 commented 3 hours ago

When trying to include esp_idf_svc in my build for esp32, I always have the issue as mentioned below. I try to include this crate as I need motor control and use the capture functionality which is not yet available in the esp_hal mcpwm no_std. So I thought using the esp-idf-sys wrappers.

I have no clue and there is no documentation available on what you need to specify for this env ESP_IDF_SYS_ROOT_CRATE variable.

Getting desperate to make this work after endless attempts to make this work. Anybody can help ?

Sources : https://github.com/vortex314/zenoh-projects/tree/main/esp32-idf-dc-motor

   Compiling esp-idf-sys v0.35.0
The following warnings were emitted during compilation:

warning: esp-idf-sys@0.35.0: the crate given by `ESP_IDF_SYS_ROOT_CRATE` does not exist in this workspace

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

Caused by:
  process didn't exit successfully: `/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/release/build/esp-idf-sys-33e261a5dae3ad5b/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:rerun-if-env-changed=ESP_IDF_COMPONENT_MANAGER
  cargo:warning=the crate given by `ESP_IDF_SYS_ROOT_CRATE` does not exist in this workspace
  cargo:rerun-if-changed=/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/sdkconfig
  CMAKE_PREFIX_PATH_xtensa-esp32-espidf = None
  CMAKE_PREFIX_PATH_xtensa_esp32_espidf = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_xtensa-esp32-espidf = None
  CMAKE_xtensa_esp32_espidf = None
  TARGET_CMAKE = None
  CMAKE = None
  running: cd "/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build" && CMAKE_PREFIX_PATH="" EXTRA_COMPONENT_DIRS="" IDF_COMPONENT_MANAGER="1" IDF_PATH="/home/lieven/esp/esp-idf" IDF_TARGET="esp32" PATH="/home/lieven/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/lieven/esp/esp-idf/components/espcoredump:/home/lieven/esp/esp-idf/components/partition_table:/home/lieven/esp/esp-idf/components/app_update:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.local/bin:/home/lieven/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/lieven/.cargo/bin:/home/lieven/esp/esp-idf/components/espcoredump:/home/lieven/esp/esp-idf/components/partition_table:/home/lieven/esp/esp-idf/components/app_update:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.espressif/python_env/idf5.1_py3.10_env/bin:/home/lieven/esp/esp-idf/tools:/home/lieven/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/lieven/.local/bin:/home/lieven/go/bin:/home/lieven/arm/bin:/usr/local/go/bin:/home/lieven/.local/bin:/home/lieven/go/bin:/home/lieven/arm/bin" PROJECT_DIR="/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor" SDKCONFIG_DEFAULTS="/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/gen-sdkconfig.defaults;/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/sdkconfig" "cmake" "/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out" "-G" "Ninja" "-DCMAKE_TOOLCHAIN_FILE=/home/lieven/esp/esp-idf/tools/cmake/toolchain-esp32.cmake" "-DCMAKE_BUILD_TYPE=" "-DPYTHON=/home/lieven/.espressif/python_env/idf5.1_py3.10_env/bin/python" "-DCMAKE_INSTALL_PREFIX=/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out" "-DCMAKE_C_FLAGS= -mlongcalls -Wno-frame-address" "-DCMAKE_CXX_FLAGS= -mlongcalls -Wno-frame-address" "-DCMAKE_ASM_FLAGS= -mlongcalls"
  -- Building ESP-IDF components for target esp32
  -- Checking Python dependencies...
  Python requirements are satisfied.
  Constraint file: /home/lieven/.espressif/espidf.constraints.v5.1.txt
  Requirement files:
   - /home/lieven/esp/esp-idf/tools/requirements/requirements.core.txt
  Python being checked: /home/lieven/.espressif/python_env/idf5.1_py3.10_env/bin/python
  -- Project sdkconfig file /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/sdkconfig
  Loading defaults file /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/gen-sdkconfig.defaults...
  Loading defaults file /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/sdkconfig...
  -- App "libespidf" version: e876ff0-dirty
  -- Adding linker script /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build/esp-idf/esp_system/ld/memory.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_system/ld/esp32/sections.ld.in
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
  -- Components: app_trace app_update bootloader bootloader_support bt btstack cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
  -- Component paths: /home/lieven/esp/esp-idf/components/app_trace /home/lieven/esp/esp-idf/components/app_update /home/lieven/esp/esp-idf/components/bootloader /home/lieven/esp/esp-idf/components/bootloader_support /home/lieven/esp/esp-idf/components/bt /home/lieven/esp/esp-idf/components/btstack /home/lieven/esp/esp-idf/components/cmock /home/lieven/esp/esp-idf/components/console /home/lieven/esp/esp-idf/components/cxx /home/lieven/esp/esp-idf/components/driver /home/lieven/esp/esp-idf/components/efuse /home/lieven/esp/esp-idf/components/esp-tls /home/lieven/esp/esp-idf/components/esp_adc /home/lieven/esp/esp-idf/components/esp_app_format /home/lieven/esp/esp-idf/components/esp_coex /home/lieven/esp/esp-idf/components/esp_common /home/lieven/esp/esp-idf/components/esp_eth /home/lieven/esp/esp-idf/components/esp_event /home/lieven/esp/esp-idf/components/esp_gdbstub /home/lieven/esp/esp-idf/components/esp_hid /home/lieven/esp/esp-idf/components/esp_http_client /home/lieven/esp/esp-idf/components/esp_http_server /home/lieven/esp/esp-idf/components/esp_https_ota /home/lieven/esp/esp-idf/components/esp_https_server /home/lieven/esp/esp-idf/components/esp_hw_support /home/lieven/esp/esp-idf/components/esp_lcd /home/lieven/esp/esp-idf/components/esp_local_ctrl /home/lieven/esp/esp-idf/components/esp_mm /home/lieven/esp/esp-idf/components/esp_netif /home/lieven/esp/esp-idf/components/esp_netif_stack /home/lieven/esp/esp-idf/components/esp_partition /home/lieven/esp/esp-idf/components/esp_phy /home/lieven/esp/esp-idf/components/esp_pm /home/lieven/esp/esp-idf/components/esp_psram /home/lieven/esp/esp-idf/components/esp_ringbuf /home/lieven/esp/esp-idf/components/esp_rom /home/lieven/esp/esp-idf/components/esp_system /home/lieven/esp/esp-idf/components/esp_timer /home/lieven/esp/esp-idf/components/esp_wifi /home/lieven/esp/esp-idf/components/espcoredump /home/lieven/esp/esp-idf/components/esptool_py /home/lieven/esp/esp-idf/components/fatfs /home/lieven/esp/esp-idf/components/freertos /home/lieven/esp/esp-idf/components/hal /home/lieven/esp/esp-idf/components/heap /home/lieven/esp/esp-idf/components/http_parser /home/lieven/esp/esp-idf/components/idf_test /home/lieven/esp/esp-idf/components/ieee802154 /home/lieven/esp/esp-idf/components/json /home/lieven/esp/esp-idf/components/log /home/lieven/esp/esp-idf/components/lwip /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/main /home/lieven/esp/esp-idf/components/mbedtls /home/lieven/esp/esp-idf/components/mqtt /home/lieven/esp/esp-idf/components/newlib /home/lieven/esp/esp-idf/components/nvs_flash /home/lieven/esp/esp-idf/components/openthread /home/lieven/esp/esp-idf/components/partition_table /home/lieven/esp/esp-idf/components/perfmon /home/lieven/esp/esp-idf/components/protobuf-c /home/lieven/esp/esp-idf/components/protocomm /home/lieven/esp/esp-idf/components/pthread /home/lieven/esp/esp-idf/components/sdmmc /home/lieven/esp/esp-idf/components/soc /home/lieven/esp/esp-idf/components/spi_flash /home/lieven/esp/esp-idf/components/spiffs /home/lieven/esp/esp-idf/components/tcp_transport /home/lieven/esp/esp-idf/components/ulp /home/lieven/esp/esp-idf/components/unity /home/lieven/esp/esp-idf/components/usb /home/lieven/esp/esp-idf/components/vfs /home/lieven/esp/esp-idf/components/wear_levelling /home/lieven/esp/esp-idf/components/wifi_provisioning /home/lieven/esp/esp-idf/components/wpa_supplicant /home/lieven/esp/esp-idf/components/xtensa
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build
  running: cd "/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build" && EXTRA_COMPONENT_DIRS="" IDF_COMPONENT_MANAGER="1" IDF_PATH="/home/lieven/esp/esp-idf" IDF_TARGET="esp32" PATH="/home/lieven/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/lieven/esp/esp-idf/components/espcoredump:/home/lieven/esp/esp-idf/components/partition_table:/home/lieven/esp/esp-idf/components/app_update:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.local/bin:/home/lieven/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/lieven/.cargo/bin:/home/lieven/esp/esp-idf/components/espcoredump:/home/lieven/esp/esp-idf/components/partition_table:/home/lieven/esp/esp-idf/components/app_update:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/home/lieven/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/home/lieven/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:/home/lieven/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:/home/lieven/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:/home/lieven/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/home/lieven/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/home/lieven/.espressif/python_env/idf5.1_py3.10_env/bin:/home/lieven/esp/esp-idf/tools:/home/lieven/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/lieven/.local/bin:/home/lieven/go/bin:/home/lieven/arm/bin:/usr/local/go/bin:/home/lieven/.local/bin:/home/lieven/go/bin:/home/lieven/arm/bin" PROJECT_DIR="/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor" SDKCONFIG_DEFAULTS="/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/gen-sdkconfig.defaults;/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/sdkconfig" "cmake" "--build" "." "--config" "Release" "--parallel" "4"
  [1/724] Building C object esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj
  FAILED: esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj 
  /home/lieven/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -DIDF_VER=\"v5.1.4\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build/config -I/home/lieven/esp/esp-idf/components/newlib/platform_include -I/home/lieven/esp/esp-idf/components/newlib/priv_include -I/home/lieven/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/lieven/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/lieven/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/home/lieven/esp/esp-idf/components/freertos/esp_additions/include -I/home/lieven/esp/esp-idf/components/freertos/esp_additions/arch/xtensa/include -I/home/lieven/esp/esp-idf/components/esp_hw_support/include -I/home/lieven/esp/esp-idf/components/esp_hw_support/include/soc -I/home/lieven/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/lieven/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/home/lieven/esp/esp-idf/components/heap/include -I/home/lieven/esp/esp-idf/components/log/include -I/home/lieven/esp/esp-idf/components/soc/include -I/home/lieven/esp/esp-idf/components/soc/esp32 -I/home/lieven/esp/esp-idf/components/soc/esp32/include -I/home/lieven/esp/esp-idf/components/hal/esp32/include -I/home/lieven/esp/esp-idf/components/hal/include -I/home/lieven/esp/esp-idf/components/hal/platform_port/include -I/home/lieven/esp/esp-idf/components/esp_rom/include -I/home/lieven/esp/esp-idf/components/esp_rom/include/esp32 -I/home/lieven/esp/esp-idf/components/esp_rom/esp32 -I/home/lieven/esp/esp-idf/components/esp_common/include -I/home/lieven/esp/esp-idf/components/esp_system/include -I/home/lieven/esp/esp-idf/components/esp_system/port/soc -I/home/lieven/esp/esp-idf/components/esp_system/port/include/private -I/home/lieven/esp/esp-idf/components/xtensa/include -I/home/lieven/esp/esp-idf/components/xtensa/esp32/include -I/home/lieven/esp/esp-idf/components/lwip/include -I/home/lieven/esp/esp-idf/components/lwip/include/apps -I/home/lieven/esp/esp-idf/components/lwip/include/apps/sntp -I/home/lieven/esp/esp-idf/components/lwip/lwip/src/include -I/home/lieven/esp/esp-idf/components/lwip/port/include -I/home/lieven/esp/esp-idf/components/lwip/port/freertos/include -I/home/lieven/esp/esp-idf/components/lwip/port/esp32xx/include -I/home/lieven/esp/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/lieven/esp/esp-idf/components/spi_flash/include -mlongcalls -Wno-frame-address  -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -O2 -fmacro-prefix-map=/home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out=. -fmacro-prefix-map=/home/lieven/esp/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj -MF esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj.d -o esp-idf/newlib/CMakeFiles/__idf_newlib.dir/reent_init.c.obj -c /home/lieven/esp/esp-idf/components/newlib/reent_init.c
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c: In function 'esp_reent_init':
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c:29:6: error: 'struct _reent' has no member named '__sdidinit'
     29 |     r->__sdidinit = 1;
        |      ^~
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c:30:6: error: 'struct _reent' has no member named '__sglue'
     30 |     r->__sglue._next = NULL;
        |      ^~
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c:31:6: error: 'struct _reent' has no member named '__sglue'
     31 |     r->__sglue._niobs = 0;
        |      ^~
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c:32:6: error: 'struct _reent' has no member named '__sglue'
     32 |     r->__sglue._iobs = NULL;
        |      ^~
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c: In function 'esp_reent_cleanup':
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c:60:40: error: 'struct _reent' has no member named '__sglue'
     60 |     struct _glue* prev = &_GLOBAL_REENT->__sglue;
        |                                        ^~
  /home/lieven/esp/esp-idf/components/newlib/reent_init.c:61:43: error: 'struct _reent' has no member named '__sglue'
     61 |     for (struct _glue* cur = _GLOBAL_REENT->__sglue._next; cur != NULL;) {
        |                                           ^~
  [2/724] Building C object esp-idf/esp_app_format/CMakeFiles/__idf_esp_app_format.dir/esp_app_desc.c.obj
  [3/724] Building C object esp-idf/newlib/CMakeFiles/__idf_newlib.dir/syscalls.c.obj
  [4/724] Performing build step for 'bootloader'
  [0/1] Re-running CMake...
  -- Building ESP-IDF components for target esp32
  -- Project sdkconfig file /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/sdkconfig
  Compiler supported targets: xtensa-esp-elf

  CMake Warning at /home/lieven/esp/esp-idf/tools/cmake/tool_version_check.cmake:41 (message):
    Can not get version for tool:
    /home/lieven/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc

    Check Getting Started documentation or proceed at own risk.

  Call Stack (most recent call first):
    /home/lieven/esp/esp-idf/components/esp_common/project_include.cmake:10 (check_expected_tool_version)
    /home/lieven/esp/esp-idf/tools/cmake/build.cmake:398 (include)
    /home/lieven/esp/esp-idf/tools/cmake/build.cmake:620 (__build_process_project_includes)
    /home/lieven/esp/esp-idf/tools/cmake/project.cmake:604 (idf_build_process)
    CMakeLists.txt:58 (project)

  -- Adding linker script /home/lieven/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
  -- App "bootloader" version: v5.1.4
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
  -- Adding linker script /home/lieven/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
  -- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
  -- Component paths: /home/lieven/esp/esp-idf/components/bootloader /home/lieven/esp/esp-idf/components/bootloader_support /home/lieven/esp/esp-idf/components/efuse /home/lieven/esp/esp-idf/components/esp_app_format /home/lieven/esp/esp-idf/components/esp_common /home/lieven/esp/esp-idf/components/esp_hw_support /home/lieven/esp/esp-idf/components/esp_rom /home/lieven/esp/esp-idf/components/esp_system /home/lieven/esp/esp-idf/components/esptool_py /home/lieven/esp/esp-idf/components/freertos /home/lieven/esp/esp-idf/components/hal /home/lieven/esp/esp-idf/components/log /home/lieven/esp/esp-idf/components/bootloader/subproject/main /home/lieven/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /home/lieven/esp/esp-idf/components/newlib /home/lieven/esp/esp-idf/components/partition_table /home/lieven/esp/esp-idf/components/soc /home/lieven/esp/esp-idf/components/spi_flash /home/lieven/esp/esp-idf/components/xtensa
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build/bootloader
  [1/1] cd /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build/bootloader/esp-idf/esptool_py && /home/lieven/.espressif/python_env/idf5.1_py3.10_env/bin/python /home/lieven/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/lieven/workspace/zenoh-projects/esp32-idf-dc-motor/target/xtensa-esp32-espidf/release/build/esp-idf-sys-428c047870959faf/out/build/bootloader/bootloader.bin
  Bootloader binary size 0x6770 bytes. 0x890 bytes (8%) free.
  ninja: build stopped: subcommand failed.

  --- stderr
  Build configuration: BuildConfig {
      esp_idf_tools_install_dir: None,
      esp_idf_sdkconfig: None,
      esp_idf_sdkconfig_defaults: None,
      mcu: Some(
          "esp32",
      ),
      native: NativeConfig {
          esp_idf_version: Some(
              Tag(
                  "v5.1",
              ),
          ),
          esp_idf_repository: None,
          esp_idf_cmake_generator: None,
          idf_path: Some(
              "/home/lieven/esp/esp-idf",
          ),
          extra_components: [],
          esp_idf_components: None,
          esp_idf_component_manager: None,
      },
      esp_idf_sys_root_crate: Some(
          "main",
      ),
  }
  Using activated esp-idf v5.1.4 environment at '/home/lieven/esp/esp-idf'
  Compiler supported targets: xtensa-esp-elf

  CMake Warning at /home/lieven/esp/esp-idf/tools/cmake/tool_version_check.cmake:41 (message):
    Can not get version for tool:
    /home/lieven/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc

    Check Getting Started documentation or proceed at own risk.

  Call Stack (most recent call first):
    /home/lieven/esp/esp-idf/components/esp_common/project_include.cmake:10 (check_expected_tool_version)
    /home/lieven/esp/esp-idf/tools/cmake/build.cmake:398 (include)
    /home/lieven/esp/esp-idf/tools/cmake/build.cmake:620 (__build_process_project_includes)
    /home/lieven/esp/esp-idf/tools/cmake/project.cmake:604 (idf_build_process)
    CMakeLists.txt:28 (project)

  thread 'main' panicked at /home/lieven/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:1100:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  stack backtrace:
     0: rust_begin_unwind
     1: core::panicking::panic_fmt
     2: cmake::fail
               at /home/lieven/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:1100:5
     3: cmake::run
               at /home/lieven/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:1078:9
     4: cmake::Config::build
               at /home/lieven/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.51/src/lib.rs:874:9
     5: build_script_build::native::cargo_driver::build
               at ./build/native/cargo_driver.rs:527:5
     6: build_script_build::native::build
               at ./build/native.rs:17:9
     7: build_script_build::main
               at ./build/build.rs:51:24
     8: core::ops::function::FnOnce::call_once
               at /home/rust/rust/library/core/src/ops/function.rs:250:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

 *  The terminal process "/usr/bin/bash '-c', '~/.cargo/bin/cargo run --release'" terminated with exit code: 101. 
 *  Terminal will be reused by tasks, press any key to close it. 
ivmarkov commented 3 hours ago

Why don't you try to generate a small, clean project using the esp-idf-template first and see if that builds?

Please follow all instructions in its README carefully.

Also, do not mix esp-hal crates with esp-idf-* crates (esp-println). They don't mix and match yet.

ivmarkov commented 3 hours ago

Also, please don't try to download esp idf and activate it yourself. As per the README, this is supported but NOT necessary, and unless you know really well what you are doing, this will certainly fail the build: Using activated esp-idf v5.1.4 environment at '/home/lieven/esp/esp-idf'