Skip to content

Commit 79b5a07

Browse files
committed
Merge branch 'release/v6.7.0'
2 parents 38f570b + 73fb89d commit 79b5a07

File tree

202 files changed

+309
-27568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+309
-27568
lines changed

.github/workflows/examples.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
- "examples/arduino-wifiscan"
1616
- "examples/espidf-arduino-blink"
1717
- "examples/espidf-arduino-wifiscan"
18-
- "examples/espidf-aws-iot"
1918
- "examples/espidf-ble-eddystone"
2019
- "examples/espidf-coap-server"
2120
- "examples/espidf-exceptions"

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
fail-fast: false
99
matrix:
1010
os: [ubuntu-latest, windows-latest, macos-latest]
11-
python-version: [3.7]
11+
python-version: [3.9]
1212
example:
1313
- "examples/espidf-hello-world"
1414
runs-on: ${{ matrix.os }}

boards/esp32s3_powerfeather.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"partitions": "default_8MB.csv"
5+
},
6+
"core": "esp32",
7+
"extra_flags": [
8+
"-DARDUINO_ESP32S3_POWERFEATHER",
9+
"-DARDUINO_USB_CDC_ON_BOOT=1",
10+
"-DARDUINO_RUNNING_CORE=1",
11+
"-DARDUINO_EVENT_RUNNING_CORE=1"
12+
],
13+
"f_cpu": "240000000L",
14+
"f_flash": "80000000L",
15+
"flash_mode": "qio",
16+
"hwids": [
17+
[
18+
"0X303A",
19+
"0x81BB"
20+
]
21+
],
22+
"mcu": "esp32s3",
23+
"variant": "esp32s3_powerfeather"
24+
},
25+
"connectivity": [
26+
"bluetooth",
27+
"wifi"
28+
],
29+
"debug": {
30+
"openocd_target": "esp32s3.cfg"
31+
},
32+
"frameworks": [
33+
"arduino",
34+
"espidf"
35+
],
36+
"name": "ESP32-S3 PowerFeather",
37+
"upload": {
38+
"flash_size": "8MB",
39+
"maximum_ram_size": 327680,
40+
"maximum_size": 8388608,
41+
"wait_for_upload_port": true,
42+
"require_upload_port": true,
43+
"speed": 460800
44+
},
45+
"url": "https://powerfeather.dev/",
46+
"vendor": "PowerFeather"
47+
}
48+

boards/motorgo_mini_1.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"build": {
3+
"core": "esp32",
4+
"extra_flags": [
5+
"-DARDUINO_MOTORGO_MINI_1",
6+
"-DARDUINO_USB_CDC_ON_BOOT=1",
7+
"-DARDUINO_RUNNING_CORE=1",
8+
"-DARDUINO_EVENT_RUNNING_CORE=1"
9+
],
10+
"f_cpu": "240000000L",
11+
"f_flash": "80000000L",
12+
"flash_mode": "qio",
13+
"hwids": [
14+
[
15+
"0X303A",
16+
"0x1001"
17+
]
18+
],
19+
"mcu": "esp32s3",
20+
"variant": "motorgo_mini_1"
21+
},
22+
"connectivity": [
23+
"bluetooth",
24+
"wifi"
25+
],
26+
"debug": {
27+
"openocd_target": "esp32s3.cfg"
28+
},
29+
"frameworks": [
30+
"arduino",
31+
"espidf"
32+
],
33+
"name": "MotorGo Mini 1 (ESP32-S3)",
34+
"upload": {
35+
"flash_size": "4MB",
36+
"maximum_ram_size": 327680,
37+
"maximum_size": 4194304,
38+
"require_upload_port": true,
39+
"speed": 460800
40+
},
41+
"url": "https://motorgo.net/shop/ols/products/motorgo-mini-v1-dot-2-starter-kit-plus-motors",
42+
"vendor": "MotorGo"
43+
}

boards/sensebox_mcu_esp32s2.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "esp32s2_out.ld",
5+
"partitions": "partitions-4MB-tinyuf2.csv",
6+
"memory_type": "qio_qspi"
7+
},
8+
"core": "esp32",
9+
"extra_flags": [
10+
"-DARDUINO_SENSEBOX_MCU_ESP32S2",
11+
"-DBOARD_HAS_PSRAM",
12+
"-DARDUINO_USB_CDC_ON_BOOT=1",
13+
"-DARDUINO_USB_MSC_ON_BOOT=1"
14+
],
15+
"f_cpu": "240000000L",
16+
"f_flash": "80000000L",
17+
"flash_mode": "qio",
18+
"hwids": [
19+
[
20+
"0x303A",
21+
"0x81B8"
22+
],
23+
[
24+
"0x303A",
25+
"0x81B9"
26+
],
27+
[
28+
"0x303A",
29+
"0x81BA"
30+
]
31+
],
32+
"mcu": "esp32s2",
33+
"variant": "sensebox_mcu_esp32s2"
34+
},
35+
"connectivity": [
36+
"wifi"
37+
],
38+
"debug": {
39+
"openocd_target": "esp32s2.cfg"
40+
},
41+
"frameworks": [
42+
"arduino",
43+
"espidf"
44+
],
45+
"name": "senseBox MCU-S2 ESP32-S2",
46+
"upload": {
47+
"arduino": {
48+
"flash_extra_images": [
49+
[
50+
"0x2d0000",
51+
"variants/sensebox_mcu_esp32s2/tinyuf2.bin"
52+
]
53+
]
54+
},
55+
"flash_size": "4MB",
56+
"maximum_ram_size": 327680,
57+
"maximum_size": 4194304,
58+
"use_1200bps_touch": true,
59+
"wait_for_upload_port": true,
60+
"require_upload_port": true,
61+
"speed": 460800
62+
},
63+
"url": "https://sensebox.de/en/products-home",
64+
"vendor": "senseBox"
65+
}

builder/frameworks/espidf.py

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import sys
2727
import shutil
2828
import os
29+
import re
2930
import platform as sys_platform
3031

3132
import click
@@ -58,11 +59,23 @@
5859
idf_variant = mcu.lower()
5960

6061
# Required until Arduino switches to v5
61-
IDF5 = platform.get_package_version("framework-espidf").split(".")[1].startswith("5")
62+
IDF5 = (
63+
platform.get_package_version("framework-espidf")
64+
.split(".")[1]
65+
.startswith("5")
66+
)
6267
IDF_ENV_VERSION = "1.0.0"
6368
FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
6469
TOOLCHAIN_DIR = platform.get_package_dir(
65-
"toolchain-%s" % ("riscv32-esp" if mcu in ("esp32c3", "esp32c6") else ("xtensa-%s" % mcu))
70+
"toolchain-riscv32-esp"
71+
if mcu in ("esp32c3", "esp32c6")
72+
else (
73+
(
74+
"toolchain-xtensa-esp-elf"
75+
if "arduino" not in env.subst("$PIOFRAMEWORK")
76+
else "toolchain-xtensa-%s" % mcu
77+
)
78+
)
6679
)
6780

6881

@@ -482,7 +495,7 @@ def _scan_components_from_framework():
482495
return components or _scan_components_from_framework()
483496

484497

485-
def extract_linker_script_fragments(framework_components_dir, sdk_config):
498+
def extract_linker_script_fragments_backup(framework_components_dir, sdk_config):
486499
# Hardware-specific components are excluded from search and added manually below
487500
project_components = load_component_paths(
488501
framework_components_dir, ignored_component_prefixes=("esp32", "riscv")
@@ -530,6 +543,52 @@ def extract_linker_script_fragments(framework_components_dir, sdk_config):
530543
return result
531544

532545

546+
def extract_linker_script_fragments(
547+
ninja_buildfile, framework_components_dir, sdk_config
548+
):
549+
def _normalize_fragment_path(base_dir, fragment_path):
550+
if not os.path.isabs(fragment_path):
551+
fragment_path = os.path.abspath(
552+
os.path.join(base_dir, fragment_path)
553+
)
554+
if not os.path.isfile(fragment_path):
555+
print("Warning! The `%s` fragment is not found!" % fragment_path)
556+
557+
return fragment_path
558+
559+
assert os.path.isfile(
560+
ninja_buildfile
561+
), "Cannot extract linker fragments! Ninja build file is missing!"
562+
563+
result = []
564+
with open(ninja_buildfile, encoding="utf8") as fp:
565+
for line in fp.readlines():
566+
if "sections.ld: CUSTOM_COMMAND" not in line:
567+
continue
568+
for fragment_match in re.finditer(r"(\S+\.lf\b)+", line):
569+
result.append(_normalize_fragment_path(
570+
BUILD_DIR, fragment_match.group(0).replace("$:", ":")
571+
))
572+
573+
break
574+
575+
# Fall back option if the new algorithm didn't work
576+
if not result:
577+
result = extract_linker_script_fragments_backup(
578+
framework_components_dir, sdk_config
579+
)
580+
581+
if board.get("build.esp-idf.extra_lf_files", ""):
582+
for fragment_path in board.get(
583+
"build.esp-idf.extra_lf_files"
584+
).splitlines():
585+
if not fragment_path.strip():
586+
continue
587+
result.append(_normalize_fragment_path(PROJECT_DIR, fragment_path))
588+
589+
return result
590+
591+
533592
def create_custom_libraries_list(ldgen_libraries_file, ignore_targets):
534593
if not os.path.isfile(ldgen_libraries_file):
535594
sys.stderr.write("Error: Couldn't find the list of framework libraries\n")
@@ -558,11 +617,13 @@ def create_custom_libraries_list(ldgen_libraries_file, ignore_targets):
558617
def generate_project_ld_script(sdk_config, ignore_targets=None):
559618
ignore_targets = ignore_targets or []
560619
linker_script_fragments = extract_linker_script_fragments(
561-
os.path.join(FRAMEWORK_DIR, "components"), sdk_config
620+
os.path.join(BUILD_DIR, "build.ninja"),
621+
os.path.join(FRAMEWORK_DIR, "components"),
622+
sdk_config
562623
)
563624

564-
# Create a new file to avoid automatically generated library entry as files from
565-
# this library are built internally by PlatformIO
625+
# Create a new file to avoid automatically generated library entry as files
626+
# from this library are built internally by PlatformIO
566627
libraries_list = create_custom_libraries_list(
567628
os.path.join(BUILD_DIR, "ldgen_libraries"), ignore_targets
568629
)
@@ -691,7 +752,7 @@ def compile_source_files(
691752
obj_path = os.path.join(obj_path, os.path.basename(src_path))
692753

693754
preserve_source_file_extension = board.get(
694-
"build.esp-idf.preserve_source_file_extension", False
755+
"build.esp-idf.preserve_source_file_extension", True
695756
)
696757

697758
objects.append(

builder/frameworks/ulp.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,14 @@
3434
def prepare_ulp_env_vars(env):
3535
ulp_env.PrependENVPath("IDF_PATH", FRAMEWORK_DIR)
3636

37+
toolchain_path = platform.get_package_dir(
38+
"toolchain-xtensa-esp-elf"
39+
if "arduino" not in env.subst("$PIOFRAMEWORK")
40+
else "toolchain-xtensa-%s" % idf_variant
41+
)
42+
3743
additional_packages = [
38-
os.path.join(
39-
platform.get_package_dir("toolchain-xtensa-%s" % idf_variant),
40-
"bin",
41-
),
44+
toolchain_path,
4245
os.path.join(
4346
platform.get_package_dir("toolchain-esp32ulp"),
4447
"bin",

examples/espidf-aws-iot/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/espidf-aws-iot/.travis.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

examples/espidf-aws-iot/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)