espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.72k stars 7.43k forks source link

Cannot build due to "ERROR: Because project depends on idf (>=5.1.0,<5.2.0) which doesn't match" #10055

Closed plystdr closed 4 months ago

plystdr commented 4 months ago

Board

Custom esp32-s3 board

Device Description

Custom board.

Hardware Configuration

Multiple sensors.

Version

latest master (checkout manually)

IDE Name

PlatformIO VSCode

Operating System

Windows 11

Flash frequency

80Mhz

PSRAM enabled

yes

Upload speed

115200

Description

Cannot make platformio build the project. I even tried skip version checking but nothing works...

; PlatformIO Project Configuration File ; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags ; Library options: dependencies, extra library storages ; Advanced options: extra scripting ; ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html

[common] lib_deps = https://github.com/joltwallet/esp_littlefs.git ayushsharma82/ElegantOTA@^3.1.2

[env:test-project] platform = https://github.com/platformio/platform-espressif32.git platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master framework = espidf, arduino board = test-board board_build.mcu = esp32s3 upload_protocol = esptool monitor_speed = 115200 board_build.f_cpu = 240000000L board_build.f_flash = 80000000L board_build.flash_mode = qio board_build.partitions = partition_scheme.csv board_build.filesystem = littlefs board_upload.offset_address = 0x670000 lib_deps = ${common.lib_deps} extra_scripts = tasks.py build_flags = -DCORE_DEBUG_LEVEL=5 -DBOARD_HAS_PSRAM -DARDUINO_ESP32S3_DEV -DCONFIG_SPIRAM_USE -mfix-esp32-psram-cache-issue -w -Wno-unused-variable -Wno-unused-function -DELEGANTOTA_USE_ASYNC_WEBSERVER=1 -DARDUINO_SKIP_IDF_VERSION_CHECK=1

Sketch

Not even start compiling.

Debug Message

Processing projecttest (platform: https://github.com/platformio/platform-espressif32.git; framework: espidf, arduino; board: testboard)
--------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION:
PLATFORM: Espressif 32 (6.7.0+sha.68ad40f) > Espressif ESP32-S3-N8-R2 (8 MB QD, 2MB PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.0.3+sha.690bdb5
 - framework-espidf @ 3.40407.240606 (4.4.7)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-ninja @ 1.9.0
 - tool-openocd-esp32 @ 2.1100.20220706 (11.0)
 - toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Warning! Arduino framework as an ESP-IDF component doesn't handle the `variant` field! The default `esp32` variant will be used.
Reading CMake configuration...
-- Building ESP-IDF components for target esp32s3
Manifest files have changed, solving dependencies.

...........NOTICE: Skipping optional dependency: espressif/cbor

.......NOTICE: Skipping optional dependency: espressif/mdns

....NOTICE: Skipping optional dependency: espressif/jsmn

...........-- Configuring incomplete, errors occurred!
See also "D:/firmware/projecttest/.pio/build/projecttest/CMakeFiles/CMakeOutput.log".

fatal: not a git repository (or any of the parent directories): .git
CMake Error at C:/Users/usertest/.platformio/packages/framework-espidf/tools/cmake/build.cmake:463 (message):
  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  WARNING: Component "idf" not found

  ERROR: Because project depends on idf (>=5.1.0,<5.2.0) which doesn't match
  any versions, version solving failed.

Call Stack (most recent call first):
  C:/Users/usertest/.platformio/packages/framework-espidf/tools/cmake/project.cmake:476 (idf_build_process)
  CMakeLists.txt:7 (project)

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

me-no-dev commented 4 months ago

cc @Jason2866

Official Platformio does not support Arduino v3. There are other ways to get this going with PlatformIO supported by the community

Jason2866 commented 4 months ago

@plystdr You can use the community version which supports https://github.com/pioarduino/platform-espressif32 See examples folders to see how Arduino as component setup has to be done

platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.03/platform-espressif32.zip
board = ...
...
VojtechBartoska commented 4 months ago

PlatfromIO issue, solution is proposed above. Marking as wontfix at our end.

Can I consider this as answered @plystdr? thanks!

WebDust21 commented 3 months ago

@plystdr You can use the community version which supports https://github.com/pioarduino/platform-espressif32 See examples folders to see how Arduino as component setup has to be done

platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.03/platform-espressif32.zip
board = ...
...

@Jason2866 You're a hero. Got myself stuck up a tree with no way down after finding an issue deep in ESP-IDF (using Arduino-ESP32), only to find actually trying to use ESP-IDF a very probable-cause reason that so many programmers are completely bald...

Your repo and suggestions actually WORK, thank you!

Now I just need to figure out how to get a modified repository (based on the proper ESP-IDF version) linked into PlatformIO with my corrections in it to verify that the issue is fixed...

(yes, the corrections DO work...now I'll have to PR the two lines of changed code deeeeeep in the Bluedroid libraries...)

Jason2866 commented 3 months ago

@WebDust21 To use your own IDF version is easy. Fork https://github.com/pioarduino/esp-idf/tree/release/v5.1 Do your changes there. Create a zip including the git submodules. Easiest to do is via this github actions https://github.com/webdust21/esp-idf/blob/release/v5.1/.github/workflows/release_zips.yml It will create the zip and does a release in your fork. Fork https://github.com/pioarduino/platform-espressif32 and change this entry pointing to your IDF https://github.com/pioarduino/platform-espressif32/blob/18cb216bea0ffb63390d035d76451af9d8c0435d/platform.json#L48 Use your platform with

platform = https://github.com/webdust21/platform-espressif32.git#develop