From 5c119c9f8c588fd496d11cd05a4ab577de1c19eb Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Sun, 7 Jul 2024 18:36:44 +0200 Subject: [PATCH] Platform 2024.07.10 --- README.md | 2 +- builder/frameworks/espidf.py | 24 +++++++++++++++++------- platform.json | 10 +++++----- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6fe974d9f..61561fcaf 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Espressif Systems is a privately held fabless semiconductor company. They provid Support for the ESP32/ESP32solo1, ESP32C2, ESP32C3, ESP32C6, ESP32S2, ESP32S3 and ESP32-H2 ``` [platformio] -platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.11/platform-espressif32.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.07.10/platform-espressif32.zip framework = arduino ``` to use the ESP32 Solo1 Arduino framework add in your env diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 793997015..a289b2bfa 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -745,7 +745,7 @@ def compile_source_files( preserve_source_file_extension = board.get( "build.esp-idf.preserve_source_file_extension", "yes" - ) == "yes" + ) == "yes" objects.append( build_envs[compile_group_idx].StaticObject( @@ -991,12 +991,24 @@ def find_default_component(target_configs): env.Exit(1) +def get_version_cmake_file(): + version_cmake = os.path.join(FRAMEWORK_DIR, "tools", "cmake", "version.cmake") + with open(version_cmake, "r") as file: + string = file.read().replace("\n", "").replace("(", " ").replace(")", " ") + list = string.split() + v_major = list[(list.index("IDF_VERSION_MAJOR"))+1] + v_minor = list[(list.index("IDF_VERSION_MINOR"))+1] + v_patch = list[(list.index("IDF_VERSION_PATCH"))+1] + version = v_major + "." + v_minor + "." + v_patch + return version + + def create_version_file(): version_file = os.path.join(FRAMEWORK_DIR, "version.txt") if not os.path.isfile(version_file): with open(version_file, "w") as fp: - package_version = platform.get_package_version("framework-espidf") - fp.write(get_original_version(package_version) or package_version) + version = get_version_cmake_file() + fp.write(version) def generate_empty_partition_image(binary_path, image_size): @@ -1229,10 +1241,8 @@ def get_idf_venv_dir(): # unnecessary reinstallation of Python dependencies in cases when Arduino # as an IDF component requires a different version of the IDF package and # hence a different set of Python deps or their versions - idf_version = get_original_version(platform.get_package_version("framework-espidf")) - return os.path.join( - env.subst("$PROJECT_CORE_DIR"), "penv", ".espidf-" + idf_version - ) + idf_version = get_version_cmake_file() + return os.path.join(env.subst("$PROJECT_CORE_DIR"), "penv", ".espidf-" + idf_version) def ensure_python_venv_available(): diff --git a/platform.json b/platform.json index 59c061547..eaff34f88 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/tasmota/platform-espressif32.git" }, - "version": "2024.06.11", + "version": "2024.07.10", "frameworks": { "arduino": { "script": "builder/frameworks/arduino.py" @@ -33,25 +33,25 @@ "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.2.240625/framework-arduinoespressif32.zip" + "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.2.240707/framework-arduinoespressif32.zip" }, "framework-arduino-solo1": { "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.2.240625/framework-arduinoespressif32-solo1.zip" + "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.2.240707/framework-arduinoespressif32-solo1.zip" }, "framework-arduino-ITEAD": { "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.2.240625/framework-arduinoespressif32-ITEAD.zip" + "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.2.240707/framework-arduinoespressif32-ITEAD.zip" }, "framework-espidf": { "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/tasmota/esp-idf/releases/download/v5.1.4.240625/esp-idf-v5.1.4.zip" + "version": "https://github.com/tasmota/esp-idf/releases/download/v5.1.4.240629/esp-idf-v5.1.4.zip" }, "toolchain-xtensa-esp32": { "type": "toolchain",