Skip to content

Commit

Permalink
Merge branch 'release/v6.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Sep 26, 2024
2 parents 3f33cce + 1fc7f34 commit 268f561
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 13 deletions.
2 changes: 1 addition & 1 deletion boards/heltec_wifi_kit_32_V3.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
],
"mcu": "esp32s3",
"variant": "heltec_wifi_kit_32_v3"
"variant": "heltec_wifi_kit_32_V3"
},
"connectivity": [
"wifi",
Expand Down
45 changes: 45 additions & 0 deletions boards/weactstudio_esp32c3coreboard.json
Original file line number Diff line number Diff line change
@@ -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"
}
25 changes: 16 additions & 9 deletions builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '"' in value and not value.startswith("\\"):
value = value.replace('"', '\\"')
return (define, value)
return define_string
Expand All @@ -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

Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -661,7 +665,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(
Expand Down Expand Up @@ -714,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]
Expand Down Expand Up @@ -874,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"),
Expand Down Expand Up @@ -1419,7 +1425,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(
Expand Down
2 changes: 1 addition & 1 deletion builder/frameworks/ulp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -88,7 +88,7 @@
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~3.50300.0",
"version": "~3.50301.0",
"optionalVersions": ["~3.40407.0"]
},
"tool-esptoolpy": {
Expand Down

0 comments on commit 268f561

Please sign in to comment.