Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: asund/arduino-esp32
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: espressif/arduino-esp32
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 20, 2025

  1. Copy the full SHA
    88cda9f View commit details
  2. Copy the full SHA
    bf90cbd View commit details
  3. Copy the full SHA
    af5abd5 View commit details
  4. Copy the full SHA
    0894d7d View commit details
  5. Copy the full SHA
    100ed8e View commit details
  6. add c5 bootloader location to pioarduino script (espressif#10889)

    * add c5 bootloader location to pioarduino script
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    2 people authored and me-no-dev committed Mar 20, 2025
    Copy the full SHA
    d9d3bf4 View commit details
  7. Copy the full SHA
    8af81cd View commit details
  8. Copy the full SHA
    9fbcb34 View commit details
  9. Copy the full SHA
    f45cd7b View commit details
  10. Copy the full SHA
    75de09e View commit details
  11. IDF master (espressif#10887)

    * feat(ci): Run sketches on ESP32-C5
    
    * IDF master 1160a86b
    
    * fix(zigbee): Remove RCP mode from ESP32-C5
    me-no-dev committed Mar 20, 2025
    Copy the full SHA
    6283c15 View commit details
  12. IDF master (espressif#10981)

    * IDF master 1160a86b
    
    * fix(ci): Do not compile RainMaker examples on ESP32
    me-no-dev committed Mar 20, 2025
    Copy the full SHA
    042015e View commit details
  13. IDF master (espressif#10999)

    * IDF master c71d74e2
    
    * IDF master 81e8b752
    
    * IDF master 877057db
    me-no-dev committed Mar 20, 2025
    Copy the full SHA
    e30e3c3 View commit details
  14. Copy the full SHA
    3fe2fe5 View commit details
  15. c5 flash base address is 0x2000 (espressif#11037)

    * c5 flash base address is 0x2000
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    2 people authored and me-no-dev committed Mar 20, 2025
    Copy the full SHA
    d66eeb7 View commit details
  16. feat(wifi): Add support for 2.4GHz and 5GHz band switching (espressif…

    …#11045)
    
    * feat(wifi): Add support for 2.4GHz and 5GHz band switching
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    me-no-dev and pre-commit-ci-lite[bot] committed Mar 20, 2025
    Copy the full SHA
    7c1ac1a View commit details

Commits on Mar 27, 2025

  1. Copy the full SHA
    d81c195 View commit details

Commits on Mar 28, 2025

  1. Copy the full SHA
    dac2dd9 View commit details
  2. IDF master (espressif#11150)

    * IDF master ee77c489
    
    * IDF master ee77c489
    
    * IDF master 50be9735
    
    * IDF master 23c73cdc
    
    * IDF master a45d713b
    me-no-dev authored Mar 28, 2025
    Copy the full SHA
    a61961d View commit details

Commits on Mar 29, 2025

  1. Copy the full SHA
    998bf80 View commit details

Commits on Apr 14, 2025

  1. Copy the full SHA
    ae2ae8d View commit details

Commits on Apr 21, 2025

  1. Copy the full SHA
    42ae242 View commit details

Commits on Apr 22, 2025

  1. Copy the full SHA
    5d0c4b3 View commit details

Commits on Apr 23, 2025

  1. IDF master (espressif#11204)

    * fix(esp-now): Update TX Callback
    
    * IDF master d930a386
    
    ---------
    
    Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
    me-no-dev and Jason2866 authored Apr 23, 2025
    Copy the full SHA
    03e9c45 View commit details
  2. Copy the full SHA
    23f3600 View commit details

Commits on Apr 29, 2025

  1. Copy the full SHA
    c9efce6 View commit details

Commits on Apr 30, 2025

  1. IDF master (espressif#11289)

    * fix(libs): Ensure compilation with ESP32-C5
    
    * fix(i2c): Update I2C Slave init call
    
    * IDF master 465b159c
    
    * ci(simple_ble): Add check for BLE supported
    
    * IDF master 38628f98
    
    ---------
    
    Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
    me-no-dev and lucasssvaz authored Apr 30, 2025
    Copy the full SHA
    b115ace View commit details

Commits on May 7, 2025

  1. IDF master (espressif#11342)

    * fix(ci): ESP32-P4 hosted compile fail (espressif#11341)
    
    * fix(ci): Update changes for P4 and C5 builds with latest IDF
    
    * IDF master aaebc374
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    3 people authored May 7, 2025
    Copy the full SHA
    602f1f6 View commit details

Commits on May 13, 2025

  1. Copy the full SHA
    a83bb93 View commit details
  2. Copy the full SHA
    bc08c49 View commit details

Commits on May 15, 2025

  1. Copy the full SHA
    69cd5a0 View commit details
  2. Copy the full SHA
    d69ad5e View commit details
  3. Copy the full SHA
    5540afa View commit details

Commits on May 19, 2025

  1. Copy the full SHA
    3f63a49 View commit details

Commits on May 27, 2025

  1. Copy the full SHA
    15038e6 View commit details

Commits on May 30, 2025

  1. Copy the full SHA
    b769846 View commit details
  2. IDF release/v5.5 (espressif#11369)

    * IDF release/v5.5 719b1b2b
    
    * fix(build): Add dependency on esp_http_client
    
    * fix(build): Add dependency on esp_https_ota
    
    * IDF release/v5.5 28ac0243
    me-no-dev authored May 30, 2025
    Copy the full SHA
    6ce7e25 View commit details
  3. Copy the full SHA
    a6bba43 View commit details

Commits on Jun 4, 2025

  1. feat(codeowners): Initial CODEOWNERS setup (espressif#11397)

    * feat(codeowners): Initial CODEOWNERS setup
    
    * fix(comment): Improve comment
    
    * fix(codeowners): Add teams
    
    * fix(codeowners): Apply suggestions
    
    * fix(codeowners): Add missing libraries
    lucasssvaz authored Jun 4, 2025
    Copy the full SHA
    6f56df2 View commit details
  2. Support HTTP 204 (espressif#11408)

    HTTP 204 is a successful return code which indicates No Content. While it's appropriate to return a 304 if the server has content for a device but it hasn't change, it is more accurate for a server to return a 204 if it simply doesn't have any firmware files for a particular device.
    
    Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
    sidwarkd and me-no-dev authored Jun 4, 2025
    Copy the full SHA
    b5c5655 View commit details
  3. feat(ap): Add support for DHCP Captive Portal (opt 114) (espressif#11412

    )
    
    * feat(ap): Add support for DHCP Captive Portal (opt 114)
    
    * feat(ap): No need to guard the function
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    me-no-dev and pre-commit-ci-lite[bot] authored Jun 4, 2025
    Copy the full SHA
    a2880a4 View commit details
  4. make BT core code execution conditional from include esp_bt.h (espres…

    …sif#11413)
    
    * make code execution conditional from include esp_bt.h.h
    
    * only one if
    
    * Update esp32-hal-bt.c
    Jason2866 authored Jun 4, 2025
    Copy the full SHA
    460b892 View commit details
  5. Copy the full SHA
    375f2c0 View commit details
  6. feat(zigbee): Add endpoint identification in read handlers + command …

    …structures fix (espressif#11425)
    
    * feat(zigbee): Add endpoint identification in read handlers
    
    * fix(zigbee): initialize Zigbee command structures with zeros
    
    * fix(zigbee): Spelling correction
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    P-R-O-C-H-Y and pre-commit-ci-lite[bot] authored Jun 4, 2025
    Copy the full SHA
    cae66e6 View commit details
  7. feat(zigbee): Add method to set/get/report analog output (espressif#1…

    …1431)
    
    * feat(zigbee): Add methot to set,get,report analog output
    
    * fix(ci): Update json file for example
    
    * fix(zigbee): Add missing keywords
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    P-R-O-C-H-Y and pre-commit-ci-lite[bot] authored Jun 4, 2025
    Copy the full SHA
    e3018b6 View commit details
  8. feat(zigbee): Update to esp-zigbee-sdk 1.6.5 and fix ci.json files (e…

    …spressif#11436)
    
    * feat(zigbee): Update esp-zigbee-sdk and fix ci.json files
    
    * fix(ci): Check if LED_BUILTIN exist
    
    * ci(pre-commit): Apply automatic fixes
    
    ---------
    
    Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
    P-R-O-C-H-Y and pre-commit-ci-lite[bot] authored Jun 4, 2025
    Copy the full SHA
    0ab9a0f View commit details
  9. fix: change geekble nano board setting (espressif#11432)

    add PSRAM Setting
    syong0921 authored Jun 4, 2025
    Copy the full SHA
    31d22e6 View commit details
  10. Copy the full SHA
    e9813c6 View commit details

Commits on Jun 10, 2025

  1. fix: Updated the tools options for Geekble Mini (espressif#11437)

    fix: Updated the tools options for Geekble Mini
    syong0921 authored Jun 10, 2025
    Copy the full SHA
    1bac8de View commit details
  2. Copy the full SHA
    610d951 View commit details
Showing 409 changed files with 22,540 additions and 4,732 deletions.
80 changes: 80 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# CODEOWNERS for ESP32 Arduino Core

# This file is used to specify the code owners for the ESP32 Arduino Core.
# Read more about CODEOWNERS:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# Note that order matters. The last matching pattern will be used.

# The default owners are the active developers of the ESP32 Arduino Core.
# Refrain from using @espressif/arduino-esp32 to avoid spamming non-developers with review requests.
* @espressif/arduino-devs

# CI
/.github/ @lucasssvaz @me-no-dev @P-R-O-C-H-Y
/.gitlab/ @lucasssvaz
/tests/ @lucasssvaz @P-R-O-C-H-Y

# Tools
/tools/ @me-no-dev
/tools/pre-commit/ @lucasssvaz
/tools/add_lib.sh @P-R-O-C-H-Y

# Pre-commit
/.* @lucasssvaz # Files in root directory that start with a dot.

# Git Files
/.gitignore @espressif/arduino-devs
/.gitmodules @espressif/arduino-devs

# Documentation
/docs/ @pedrominatel
/.github/ISSUE_TEMPLATE/ @pedrominatel
/.github/PULL_REQUEST_TEMPLATE.md @pedrominatel
/.readthedocs.yaml @pedrominatel
/*.md @pedrominatel

# Boards
/variants/ @P-R-O-C-H-Y
/boards.txt @P-R-O-C-H-Y

# Arduino as Component
/idf_component_examples/ @SuGlider
/idf_component.yml @SuGlider @me-no-dev
/CMakeLists.txt @SuGlider @me-no-dev
/Kconfig.projbuild @SuGlider @me-no-dev

# Build System
/package.json @me-no-dev
/platform.txt @me-no-dev
/programmers.txt @me-no-dev
/package/ @me-no-dev

# Libraries
/libraries/ArduinoOTA/ @me-no-dev
/libraries/AsyncUDP/ @me-no-dev
/libraries/BLE/ @lucasssvaz @SuGlider
/libraries/ESP_I2S/ @me-no-dev
/libraries/ESP_NOW/ @P-R-O-C-H-Y @lucasssvaz
/libraries/ESP_SR/ @me-no-dev
/libraries/ESPmDNS/ @me-no-dev
/libraries/Ethernet/ @me-no-dev
/libraries/Matter/ @SuGlider
/libraries/NetBIOS/ @me-no-dev
/libraries/Network/ @me-no-dev
/libraries/OpenThread/ @SuGlider
/libraries/PPP/ @me-no-dev
/libraries/SPI/ @me-no-dev
/libraries/Update/ @me-no-dev
/libraries/USB/ @SuGlider @me-no-dev
/libraries/WiFi/ @me-no-dev
/libraries/WiFiProv/ @me-no-dev
/libraries/Wire/ @me-no-dev
/libraries/Zigbee/ @P-R-O-C-H-Y

# CI JSON
# Keep this after other libraries and tests to avoid being overridden.
**/ci.json @lucasssvaz

# The CODEOWNERS file should be owned by the developers of the ESP32 Arduino Core.
# Leave this entry as the last one to avoid being overridden.
/.github/CODEOWNERS @espressif/arduino-devs
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/Issue-report.yml
Original file line number Diff line number Diff line change
@@ -43,6 +43,8 @@ body:
- latest stable Release (if not listed below)
- latest development Release Candidate (RC-X)
- latest master (checkout manually)
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.3
- v3.1.2
16 changes: 8 additions & 8 deletions .github/scripts/merge_packages.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
# Usage:
# python merge_packages.py package_esp8266com_index.json version/new/package_esp8266com_index.json
# Written by Ivan Grokhotkov, 2015
# Updated by lucasssvaz to handle Chinese version sorting, 2025
#

from __future__ import print_function
@@ -36,20 +37,19 @@ def merge_objects(versions, obj):


# Normalize ESP release version string (x.x.x) by adding '-rc<MAXINT>' (x.x.x-rc9223372036854775807)
# to ensure having REL above any RC
# to ensure having REL above any RC. CN version will be sorted after the official version if they happen
# to be mixed (normally, CN and non-CN versions should not be mixed)
# Dummy approach, functional anyway for current ESP package versioning
# (unlike NormalizedVersion/LooseVersion/StrictVersion & similar crap)
def pkgVersionNormalized(versionString):

verStr = str(versionString)
verStr = str(versionString).replace("-cn", "")
verParts = re.split(r"\.|-rc|-alpha", verStr, flags=re.IGNORECASE)

if len(verParts) == 3:
if sys.version_info > (3, 0): # Python 3
verStr = str(versionString) + "-rc" + str(sys.maxsize)
else: # Python 2
verStr = str(versionString) + "-rc" + str(sys.maxint)

if "-cn" in str(versionString):
verStr = verStr + "-rc" + str(sys.maxsize // 2)
else:
verStr = verStr + "-rc" + str(sys.maxsize)
elif len(verParts) != 4:
print("pkgVersionNormalized WARNING: unexpected version format: {0})".format(verStr), file=sys.stderr)

1 change: 1 addition & 0 deletions .github/scripts/on-push.sh
Original file line number Diff line number Diff line change
@@ -90,6 +90,7 @@ if [ "$BUILD_LOG" -eq 1 ]; then
fi

#build sketches for different targets
build "esp32c5" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
build "esp32p4" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
build "esp32s3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
build "esp32s2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
10 changes: 6 additions & 4 deletions .github/scripts/on-release.sh
Original file line number Diff line number Diff line change
@@ -342,12 +342,14 @@ jq_arg=".packages[0].platforms[0].version = \"$RELEASE_TAG\" | \
echo "Generating $PACKAGE_JSON_DEV ..."
cat "$PACKAGE_JSON_TEMPLATE" | jq "$jq_arg" > "$OUTPUT_DIR/$PACKAGE_JSON_DEV"
# On MacOS the sed command won't skip the first match. Use gsed instead.
sed '0,/github\.com\/espressif\//!s|github\.com/espressif/|dl.espressif.cn/github_assets/espressif/|g' "$OUTPUT_DIR/$PACKAGE_JSON_DEV" > "$OUTPUT_DIR/$PACKAGE_JSON_DEV_CN"
sed '0,/github\.com\//!s|github\.com/|dl.espressif.cn/github_assets/|g' "$OUTPUT_DIR/$PACKAGE_JSON_DEV" > "$OUTPUT_DIR/$PACKAGE_JSON_DEV_CN"
python "$SCRIPTS_DIR/release_append_cn.py" "$OUTPUT_DIR/$PACKAGE_JSON_DEV_CN"
if [ "$RELEASE_PRE" == "false" ]; then
echo "Generating $PACKAGE_JSON_REL ..."
cat "$PACKAGE_JSON_TEMPLATE" | jq "$jq_arg" > "$OUTPUT_DIR/$PACKAGE_JSON_REL"
# On MacOS the sed command won't skip the first match. Use gsed instead.
sed '0,/github\.com\/espressif\//!s|github\.com/espressif/|dl.espressif.cn/github_assets/espressif/|g' "$OUTPUT_DIR/$PACKAGE_JSON_REL" > "$OUTPUT_DIR/$PACKAGE_JSON_REL_CN"
sed '0,/github\.com\//!s|github\.com/|dl.espressif.cn/github_assets/|g' "$OUTPUT_DIR/$PACKAGE_JSON_REL" > "$OUTPUT_DIR/$PACKAGE_JSON_REL_CN"
python "$SCRIPTS_DIR/release_append_cn.py" "$OUTPUT_DIR/$PACKAGE_JSON_REL_CN"
fi

# Figure out the last release or pre-release
@@ -456,14 +458,14 @@ echo "Uploading $PACKAGE_JSON_DEV ..."
echo "Download URL: $(git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_DEV")"
echo "Pages URL: $(git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV")"
echo "Download CN URL: $(git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_DEV_CN")"
echo "Pages CN URL: $(git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV_CN")"
echo "Pages CN URL: $(git_safe_upload_to_pages "$PACKAGE_JSON_DEV_CN" "$OUTPUT_DIR/$PACKAGE_JSON_DEV_CN")"
echo
if [ "$RELEASE_PRE" == "false" ]; then
echo "Uploading $PACKAGE_JSON_REL ..."
echo "Download URL: $(git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_REL")"
echo "Pages URL: $(git_safe_upload_to_pages "$PACKAGE_JSON_REL" "$OUTPUT_DIR/$PACKAGE_JSON_REL")"
echo "Download CN URL: $(git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_REL_CN")"
echo "Pages CN URL: $(git_safe_upload_to_pages "$PACKAGE_JSON_REL" "$OUTPUT_DIR/$PACKAGE_JSON_REL_CN")"
echo "Pages CN URL: $(git_safe_upload_to_pages "$PACKAGE_JSON_REL_CN" "$OUTPUT_DIR/$PACKAGE_JSON_REL_CN")"
echo
fi

57 changes: 57 additions & 0 deletions .github/scripts/release_append_cn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

#!/usr/bin/env python3

# Arduino IDE provides by default a package file for the ESP32. This causes version conflicts
# when the user tries to use the JSON file with the Chinese mirrors.
#
# The downside is that the Arduino IDE will always warn the user that updates are available as it
# will consider the version from the Chinese mirrors as a pre-release version.
#
# This script is used to append "-cn" to all versions in the package_esp32_index_cn.json file so that
# the user can select the Chinese mirrors without conflicts.
#
# If Arduino ever stops providing the package_esp32_index.json file by default,
# this script can be removed and the tags reverted.

import json

def append_cn_to_versions(obj):
if isinstance(obj, dict):
# Skip tools that are not from the esp32 package
packager = obj.get("packager")
if packager is not None and packager != "esp32":
return

for key, value in obj.items():
if key == "version" and isinstance(value, str):
if not value.endswith("-cn"):
obj[key] = value + "-cn"
else:
append_cn_to_versions(value)

elif isinstance(obj, list):
for item in obj:
append_cn_to_versions(item)

def process_json_file(input_path, output_path=None):
with open(input_path, "r", encoding="utf-8") as f:
data = json.load(f)

append_cn_to_versions(data)

if output_path is None:
output_path = input_path

with open(output_path, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2)

print(f"Updated JSON written to {output_path}")

if __name__ == "__main__":
import sys
if len(sys.argv) < 2:
print("Usage: python release_append_cn.py input.json [output.json]")
else:
input_file = sys.argv[1]
output_file = sys.argv[2] if len(sys.argv) > 2 else None
process_json_file(input_file, output_file)
5 changes: 5 additions & 0 deletions .github/scripts/sketch_utils.sh
Original file line number Diff line number Diff line change
@@ -156,6 +156,7 @@ function build_sketch { # build_sketch <ide_path> <user_path> <path-to-ino> [ext
esp32c6_opts=$(echo "$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')
esp32h2_opts=$(echo "$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')
esp32p4_opts=$(echo "PSRAM=enabled,USBMode=default,$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')
esp32c5_opts=$(echo "$debug_level,$fqbn_append" | sed 's/^,*//;s/,*$//;s/,\{2,\}/,/g')

# Select the common part of the FQBN based on the target. The rest will be
# appended depending on the passed options.
@@ -191,6 +192,10 @@ function build_sketch { # build_sketch <ide_path> <user_path> <path-to-ino> [ext
[ -n "${options:-$esp32p4_opts}" ] && opt=":${options:-$esp32p4_opts}"
fqbn="espressif:esp32:esp32p4$opt"
;;
"esp32c5")
[ -n "${options:-$esp32c5_opts}" ] && opt=":${options:-$esp32c5_opts}"
fqbn="espressif:esp32:esp32c5$opt"
;;
*)
echo "ERROR: Invalid chip: $target"
exit 1
19 changes: 19 additions & 0 deletions .github/scripts/update-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# Disable shellcheck warning about using 'cat' to read a file.
# shellcheck disable=SC2002

# For reference: add tools for all boards by replacing one line in each board
@@ -23,14 +24,32 @@ ESP_ARDUINO_VERSION_MINOR="$2"
ESP_ARDUINO_VERSION_PATCH="$3"
ESP_ARDUINO_VERSION="$ESP_ARDUINO_VERSION_MAJOR.$ESP_ARDUINO_VERSION_MINOR.$ESP_ARDUINO_VERSION_PATCH"

# Get ESP-IDF version from push.yml (this way we can ensure that the version is correct even if the local libs are not up to date)
ESP_IDF_VERSION=$(grep "idf_ver:" .github/workflows/push.yml | sed 's/.*release-v\([^"]*\).*/\1/')
if [ -z "$ESP_IDF_VERSION" ]; then
echo "Error: ESP-IDF version not found in push.yml" >&2
exit 1
fi

echo "New Arduino Version: $ESP_ARDUINO_VERSION"
echo "ESP-IDF Version: $ESP_IDF_VERSION"

echo "Updating platform.txt..."
cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platform.txt && mv __platform.txt platform.txt

echo "Updating package.json..."
cat package.json | sed "s/.*\"version\":.*/ \"version\": \"$ESP_ARDUINO_VERSION\",/g" > __package.json && mv __package.json package.json

echo "Updating docs/conf_common.py..."
cat docs/conf_common.py | \
sed "s/.. |version| replace:: .*/.. |version| replace:: $ESP_ARDUINO_VERSION/g" | \
sed "s/.. |idf_version| replace:: .*/.. |idf_version| replace:: $ESP_IDF_VERSION/g" > docs/__conf_common.py && mv docs/__conf_common.py docs/conf_common.py

echo "Updating .gitlab/workflows/common.yml..."
cat .gitlab/workflows/common.yml | \
sed "s/ESP_IDF_VERSION:.*/ESP_IDF_VERSION: \"$ESP_IDF_VERSION\"/g" | \
sed "s/ESP_ARDUINO_VERSION:.*/ESP_ARDUINO_VERSION: \"$ESP_ARDUINO_VERSION\"/g" > .gitlab/workflows/__common.yml && mv .gitlab/workflows/__common.yml .gitlab/workflows/common.yml

echo "Updating cores/esp32/esp_arduino_version.h..."
cat cores/esp32/esp_arduino_version.h | \
sed "s/#define ESP_ARDUINO_VERSION_MAJOR.*/#define ESP_ARDUINO_VERSION_MAJOR $ESP_ARDUINO_VERSION_MAJOR/g" | \
Loading