From de553ce4a8592fc140098a767dccf4d5f56ef191 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:45:24 +0200 Subject: [PATCH 1/9] Skip ldscript preprocessing for IDF < v5.3 (#1434) --- builder/frameworks/espidf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 9c5158785..6c0c06142 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -661,7 +661,8 @@ def generate_project_ld_script(sdk_config, ignore_targets=None): "sections.ld.in", ) - if IDF5: + framework_version = [int(v) for v in get_framework_version().split(".")] + if framework_version[:2] > [5, 2]: initial_ld_script = preprocess_linker_file( initial_ld_script, os.path.join( @@ -1419,7 +1420,8 @@ def get_python_exe(): "memory.ld.in", )) - if IDF5: + framework_version = [int(v) for v in get_framework_version().split(".")] + if framework_version[:2] > [5, 2]: initial_ld_script = preprocess_linker_file( initial_ld_script, os.path.join( From e9dbab3109bb301f0f33b7a65ec46059b644e131 Mon Sep 17 00:00:00 2001 From: valeros Date: Wed, 14 Aug 2024 12:24:57 +0300 Subject: [PATCH 2/9] Fix variant name for Heltec WiFi Kit 32 V3 Resolves #1442 --- boards/heltec_wifi_kit_32_V3.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/heltec_wifi_kit_32_V3.json b/boards/heltec_wifi_kit_32_V3.json index d10631917..62d730131 100644 --- a/boards/heltec_wifi_kit_32_V3.json +++ b/boards/heltec_wifi_kit_32_V3.json @@ -21,7 +21,7 @@ ] ], "mcu": "esp32s3", - "variant": "heltec_wifi_kit_32_v3" + "variant": "heltec_wifi_kit_32_V3" }, "connectivity": [ "wifi", From c73bbc1b4a21d576ac7c17ba11286c681252e58d Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 5 Sep 2024 14:34:05 +0300 Subject: [PATCH 3/9] Better handling of complex macros from CMake model --- builder/frameworks/espidf.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 6c0c06142..20c732d12 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -330,8 +330,9 @@ def _normalize_define(define_string): define_string = define_string.strip() if "=" in define_string: define, value = define_string.split("=", maxsplit=1) - if '"' in value and not value.startswith("\\"): - # Escape only raw values + if any(char in value for char in (' ', '<', '>')): + value = f'"{value}"' + elif any(char in value for char in ('"', '\'')): value = value.replace('"', '\\"') return (define, value) return define_string @@ -342,8 +343,11 @@ def _normalize_define(define_string): ] for f in compile_group.get("compileCommandFragments", []): - if f.get("fragment", "").startswith("-D"): - result.append(_normalize_define(f["fragment"][2:])) + fragment = f.get("fragment", "").strip() + if fragment.startswith('"'): + fragment = fragment.strip('"') + if fragment.startswith("-D"): + result.append(_normalize_define(fragment[2:])) return result @@ -429,8 +433,8 @@ def _extract_flags(config): for cg in config["compileGroups"]: flags[cg["language"]] = [] for ccfragment in cg["compileCommandFragments"]: - fragment = ccfragment.get("fragment", "") - if not fragment.strip() or fragment.startswith("-D"): + fragment = ccfragment.get("fragment", "").strip("\" ") + if not fragment or fragment.startswith("-D"): continue flags[cg["language"]].extend( click.parser.split_arg_string(fragment.strip()) @@ -715,7 +719,7 @@ def prepare_build_envs(config, default_env, debug_allowed=True): build_env = default_env.Clone() build_env.SetOption("implicit_cache", 1) for cc in compile_commands: - build_flags = cc.get("fragment") + build_flags = cc.get("fragment", "").strip("\" ") if not build_flags.startswith("-D"): if build_flags.startswith("-include") and ".." in build_flags: source_index = cg.get("sourceIndexes")[0] From b3884b1a7b44adba0c15f73d0190d1d713752a4b Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 5 Sep 2024 15:33:45 +0300 Subject: [PATCH 4/9] Typo fix --- builder/frameworks/espidf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 20c732d12..96b15f64a 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -332,7 +332,7 @@ def _normalize_define(define_string): define, value = define_string.split("=", maxsplit=1) if any(char in value for char in (' ', '<', '>')): value = f'"{value}"' - elif any(char in value for char in ('"', '\'')): + elif '"' in value and not value.startswith("\\"): value = value.replace('"', '\\"') return (define, value) return define_string From da5dd515e9da60ff1c911417890a7708b2b57f00 Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 12 Sep 2024 15:33:56 +0300 Subject: [PATCH 5/9] Update ESP-IDF to v5.3.1 Resolves #1459 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index bf0fee096..c409e6ad5 100644 --- a/platform.json +++ b/platform.json @@ -88,7 +88,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~3.50300.0", + "version": "~3.50301.0", "optionalVersions": ["~3.40407.0"] }, "tool-esptoolpy": { From a6be7432523390673f2921d1ca5102c2adc48d6e Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 12 Sep 2024 16:23:54 +0300 Subject: [PATCH 6/9] Update build command for ULP config generation --- builder/frameworks/ulp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/frameworks/ulp.py b/builder/frameworks/ulp.py index 7f4d17c05..89aa42011 100644 --- a/builder/frameworks/ulp.py +++ b/builder/frameworks/ulp.py @@ -107,7 +107,7 @@ def _generate_ulp_configuration_action(env, target, source): "-DIDF_PATH=" + fs.to_unix_path(FRAMEWORK_DIR), "-DSDKCONFIG_HEADER=" + os.path.join(BUILD_DIR, "config", "sdkconfig.h"), "-DPYTHON=" + env.subst("$PYTHONEXE"), - "-DULP_COCPU_IS_RISCV=%s" % ("ON" if riscv_ulp_enabled else "OFF"), + "-DSDKCONFIG_CMAKE=" + os.path.join(BUILD_DIR, "config", "sdkconfig.cmake"), "-GNinja", "-B", ULP_BUILD_DIR, From 76a59aa12f1935eabe5833ac869987f07377b266 Mon Sep 17 00:00:00 2001 From: Damien Espitallier <123735745+DamienEspitallier@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:23:32 +0200 Subject: [PATCH 7/9] Add PROJECT_SOURCE_DIR for bootloader to enable bootloader_components build (#1460) --- builder/frameworks/espidf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 96b15f64a..2ece86765 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -879,6 +879,7 @@ def build_bootloader(sdk_config): "-DPYTHON=" + get_python_exe(), "-DIDF_PATH=" + FRAMEWORK_DIR, "-DSDKCONFIG=" + SDKCONFIG_PATH, + "-DPROJECT_SOURCE_DIR=" + PROJECT_DIR, "-DLEGACY_INCLUDE_COMMON_HEADERS=", "-DEXTRA_COMPONENT_DIRS=" + os.path.join(FRAMEWORK_DIR, "components", "bootloader"), From 51356391fba2a3f49cc0315d4de9b16ad1cda0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 23 Sep 2024 07:38:22 -0300 Subject: [PATCH 8/9] Add WeAct Studio ESP32C3CoreBoard (#1465) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- boards/weactstudio_esp32c3coreboard.json | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 boards/weactstudio_esp32c3coreboard.json diff --git a/boards/weactstudio_esp32c3coreboard.json b/boards/weactstudio_esp32c3coreboard.json new file mode 100644 index 000000000..507e66526 --- /dev/null +++ b/boards/weactstudio_esp32c3coreboard.json @@ -0,0 +1,45 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32c3_out.ld" + }, + "core": "esp32", + "extra_flags": [ + "-DARDUINO_ESP32C3_DEV", + "-DARDUINO_USB_MODE=1", + "-DARDUINO_USB_CDC_ON_BOOT=1" + ], + "f_cpu": "160000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [ + [ + "0x303A", + "0x1001" + ] + ], + "mcu": "esp32c3", + "variant": "esp32c3" + }, + "connectivity": [ + "wifi", + "bluetooth" + ], + "debug": { + "openocd_target": "esp32c3.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "WeAct Studio ESP32C3CoreBoard", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 409600, + "maximum_size": 393216, + "require_upload_port": true, + "speed": 460800 + }, + "url": "https://github.com/WeActStudio/WeActStudio.ESP32C3CoreBoard", + "vendor": "WeAct Studio" +} From 1fc7f34d00229e7025e83ba9f95160c6365495dd Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 26 Sep 2024 14:38:45 +0300 Subject: [PATCH 9/9] Bump version to 6.9.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index c409e6ad5..ee0745b68 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/platformio/platform-espressif32.git" }, - "version": "6.8.1", + "version": "6.9.0", "frameworks": { "arduino": { "package": "framework-arduinoespressif32",