Skip to content

Commit

Permalink
Merge branch 'release/v6.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed May 14, 2024
2 parents 38f570b + 73fb89d commit 79b5a07
Show file tree
Hide file tree
Showing 202 changed files with 309 additions and 27,568 deletions.
1 change: 0 additions & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- "examples/arduino-wifiscan"
- "examples/espidf-arduino-blink"
- "examples/espidf-arduino-wifiscan"
- "examples/espidf-aws-iot"
- "examples/espidf-ble-eddystone"
- "examples/espidf-coap-server"
- "examples/espidf-exceptions"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7]
python-version: [3.9]
example:
- "examples/espidf-hello-world"
runs-on: ${{ matrix.os }}
Expand Down
48 changes: 48 additions & 0 deletions boards/esp32s3_powerfeather.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"build": {
"arduino":{
"partitions": "default_8MB.csv"
},
"core": "esp32",
"extra_flags": [
"-DARDUINO_ESP32S3_POWERFEATHER",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0X303A",
"0x81BB"
]
],
"mcu": "esp32s3",
"variant": "esp32s3_powerfeather"
},
"connectivity": [
"bluetooth",
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "ESP32-S3 PowerFeather",
"upload": {
"flash_size": "8MB",
"maximum_ram_size": 327680,
"maximum_size": 8388608,
"wait_for_upload_port": true,
"require_upload_port": true,
"speed": 460800
},
"url": "https://powerfeather.dev/",
"vendor": "PowerFeather"
}

43 changes: 43 additions & 0 deletions boards/motorgo_mini_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"build": {
"core": "esp32",
"extra_flags": [
"-DARDUINO_MOTORGO_MINI_1",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0X303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "motorgo_mini_1"
},
"connectivity": [
"bluetooth",
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "MotorGo Mini 1 (ESP32-S3)",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
},
"url": "https://motorgo.net/shop/ols/products/motorgo-mini-v1-dot-2-starter-kit-plus-motors",
"vendor": "MotorGo"
}
65 changes: 65 additions & 0 deletions boards/sensebox_mcu_esp32s2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"build": {
"arduino": {
"ldscript": "esp32s2_out.ld",
"partitions": "partitions-4MB-tinyuf2.csv",
"memory_type": "qio_qspi"
},
"core": "esp32",
"extra_flags": [
"-DARDUINO_SENSEBOX_MCU_ESP32S2",
"-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MSC_ON_BOOT=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0x303A",
"0x81B8"
],
[
"0x303A",
"0x81B9"
],
[
"0x303A",
"0x81BA"
]
],
"mcu": "esp32s2",
"variant": "sensebox_mcu_esp32s2"
},
"connectivity": [
"wifi"
],
"debug": {
"openocd_target": "esp32s2.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "senseBox MCU-S2 ESP32-S2",
"upload": {
"arduino": {
"flash_extra_images": [
[
"0x2d0000",
"variants/sensebox_mcu_esp32s2/tinyuf2.bin"
]
]
},
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"use_1200bps_touch": true,
"wait_for_upload_port": true,
"require_upload_port": true,
"speed": 460800
},
"url": "https://sensebox.de/en/products-home",
"vendor": "senseBox"
}
75 changes: 68 additions & 7 deletions builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import sys
import shutil
import os
import re
import platform as sys_platform

import click
Expand Down Expand Up @@ -58,11 +59,23 @@
idf_variant = mcu.lower()

# Required until Arduino switches to v5
IDF5 = platform.get_package_version("framework-espidf").split(".")[1].startswith("5")
IDF5 = (
platform.get_package_version("framework-espidf")
.split(".")[1]
.startswith("5")
)
IDF_ENV_VERSION = "1.0.0"
FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
TOOLCHAIN_DIR = platform.get_package_dir(
"toolchain-%s" % ("riscv32-esp" if mcu in ("esp32c3", "esp32c6") else ("xtensa-%s" % mcu))
"toolchain-riscv32-esp"
if mcu in ("esp32c3", "esp32c6")
else (
(
"toolchain-xtensa-esp-elf"
if "arduino" not in env.subst("$PIOFRAMEWORK")
else "toolchain-xtensa-%s" % mcu
)
)
)


Expand Down Expand Up @@ -482,7 +495,7 @@ def _scan_components_from_framework():
return components or _scan_components_from_framework()


def extract_linker_script_fragments(framework_components_dir, sdk_config):
def extract_linker_script_fragments_backup(framework_components_dir, sdk_config):
# Hardware-specific components are excluded from search and added manually below
project_components = load_component_paths(
framework_components_dir, ignored_component_prefixes=("esp32", "riscv")
Expand Down Expand Up @@ -530,6 +543,52 @@ def extract_linker_script_fragments(framework_components_dir, sdk_config):
return result


def extract_linker_script_fragments(
ninja_buildfile, framework_components_dir, sdk_config
):
def _normalize_fragment_path(base_dir, fragment_path):
if not os.path.isabs(fragment_path):
fragment_path = os.path.abspath(
os.path.join(base_dir, fragment_path)
)
if not os.path.isfile(fragment_path):
print("Warning! The `%s` fragment is not found!" % fragment_path)

return fragment_path

assert os.path.isfile(
ninja_buildfile
), "Cannot extract linker fragments! Ninja build file is missing!"

result = []
with open(ninja_buildfile, encoding="utf8") as fp:
for line in fp.readlines():
if "sections.ld: CUSTOM_COMMAND" not in line:
continue
for fragment_match in re.finditer(r"(\S+\.lf\b)+", line):
result.append(_normalize_fragment_path(
BUILD_DIR, fragment_match.group(0).replace("$:", ":")
))

break

# Fall back option if the new algorithm didn't work
if not result:
result = extract_linker_script_fragments_backup(
framework_components_dir, sdk_config
)

if board.get("build.esp-idf.extra_lf_files", ""):
for fragment_path in board.get(
"build.esp-idf.extra_lf_files"
).splitlines():
if not fragment_path.strip():
continue
result.append(_normalize_fragment_path(PROJECT_DIR, fragment_path))

return result


def create_custom_libraries_list(ldgen_libraries_file, ignore_targets):
if not os.path.isfile(ldgen_libraries_file):
sys.stderr.write("Error: Couldn't find the list of framework libraries\n")
Expand Down Expand Up @@ -558,11 +617,13 @@ def create_custom_libraries_list(ldgen_libraries_file, ignore_targets):
def generate_project_ld_script(sdk_config, ignore_targets=None):
ignore_targets = ignore_targets or []
linker_script_fragments = extract_linker_script_fragments(
os.path.join(FRAMEWORK_DIR, "components"), sdk_config
os.path.join(BUILD_DIR, "build.ninja"),
os.path.join(FRAMEWORK_DIR, "components"),
sdk_config
)

# Create a new file to avoid automatically generated library entry as files from
# this library are built internally by PlatformIO
# Create a new file to avoid automatically generated library entry as files
# from this library are built internally by PlatformIO
libraries_list = create_custom_libraries_list(
os.path.join(BUILD_DIR, "ldgen_libraries"), ignore_targets
)
Expand Down Expand Up @@ -691,7 +752,7 @@ def compile_source_files(
obj_path = os.path.join(obj_path, os.path.basename(src_path))

preserve_source_file_extension = board.get(
"build.esp-idf.preserve_source_file_extension", False
"build.esp-idf.preserve_source_file_extension", True
)

objects.append(
Expand Down
11 changes: 7 additions & 4 deletions builder/frameworks/ulp.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@
def prepare_ulp_env_vars(env):
ulp_env.PrependENVPath("IDF_PATH", FRAMEWORK_DIR)

toolchain_path = platform.get_package_dir(
"toolchain-xtensa-esp-elf"
if "arduino" not in env.subst("$PIOFRAMEWORK")
else "toolchain-xtensa-%s" % idf_variant
)

additional_packages = [
os.path.join(
platform.get_package_dir("toolchain-xtensa-%s" % idf_variant),
"bin",
),
toolchain_path,
os.path.join(
platform.get_package_dir("toolchain-esp32ulp"),
"bin",
Expand Down
1 change: 0 additions & 1 deletion examples/espidf-aws-iot/.gitignore

This file was deleted.

67 changes: 0 additions & 67 deletions examples/espidf-aws-iot/.travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions examples/espidf-aws-iot/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 79b5a07

Please sign in to comment.