Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.0.18 with ESP-IDF v4.4.8 #7814

Closed
wants to merge 148 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
18c0a6c
Update toolchains and openocd for ESP-IDF v4.4.4
me-no-dev Feb 8, 2023
0ee74ee
Update get.py to support Apple ARM64
me-no-dev Feb 8, 2023
e531341
Update package version
me-no-dev Feb 8, 2023
1376ee0
Update ESP-IDF libs to v4.4.4
me-no-dev Feb 8, 2023
997542c
Fix compilation issue caused by ESP-Insights
me-no-dev Feb 9, 2023
3324aff
Update esptool to v4.4
me-no-dev Feb 9, 2023
8a458d1
Update esptool to v4.5
me-no-dev Feb 13, 2023
1ca741e
Merge branch 'master' into release/v2.x
me-no-dev Feb 15, 2023
0da8ecb
Merge branch 'master' into release/v2.x
me-no-dev Feb 20, 2023
213f976
Merge branch 'master' into release/v2.x
me-no-dev Feb 20, 2023
d6a850b
Update package_esp32_index.template.json
me-no-dev Feb 20, 2023
50269f6
Update esptool to v4.5.1
me-no-dev Mar 1, 2023
a069764
Add setMode function HardwareSerial.c to set the esp32 uart mode for …
jamesarm97 Mar 31, 2023
93903fc
Fix the F_CPU frequency definition for the ESP32-S3 in esp32-hal.h (#…
devrim-oguz Mar 31, 2023
e7d3a2f
Merge branch 'master' into release/v2.x
me-no-dev Mar 31, 2023
540ab86
Merge branch 'master' into release/v2.x
me-no-dev Apr 7, 2023
8fca365
Add support for esp-elf-gdb
me-no-dev Apr 7, 2023
2d7218b
WFG Crashfix (#8043)
mrengineer7777 Apr 10, 2023
2ff2b43
Update RainMaker and components
me-no-dev Apr 10, 2023
788a4ca
Merge branch 'master' into release/v2.x
me-no-dev Apr 10, 2023
483bebf
WiFiUDF Low memory fix (#8065)
mrengineer7777 Apr 11, 2023
bdbfc45
Merge branch 'master' into release/v2.x
me-no-dev Apr 18, 2023
16cee61
Enable DFU
me-no-dev Apr 19, 2023
a115594
Add required callbacks for TinyUSB DFU
me-no-dev Apr 19, 2023
71113c3
Merge branch 'master' into release/v2.x
me-no-dev Apr 19, 2023
d3254f7
Update version to 2.0.8
me-no-dev Apr 20, 2023
f42cba9
Merge branch 'master' into release/v2.x
me-no-dev May 3, 2023
f89df42
BugFix FlashStringHelper Macros (#8143)
mrengineer7777 May 3, 2023
362a81b
Merge branch 'master' into release/v2.x
me-no-dev May 3, 2023
3670e2b
Update version to 2.0.9
me-no-dev May 3, 2023
447f6db
Merge branch 'master' into release/v2.x
me-no-dev May 31, 2023
be40b3b
Update ESP-IDF to v4.4.5
me-no-dev Jun 12, 2023
cc3590c
Remove insights component since it's provided by RainMaker
me-no-dev Jun 12, 2023
ac814ee
Update core version to 2.0.10
me-no-dev Jun 12, 2023
0f51c88
Merge branch 'master' into release/v2.x
me-no-dev Jun 29, 2023
1577701
Merge branch 'master' into release/v2.x
me-no-dev Jul 17, 2023
9b4622d
Add Arduino Nano ESP32 target (#8417)
facchinm Jul 17, 2023
4c27949
Fix escaping issues in 2.0.10 (#8433)
pillo79 Jul 20, 2023
e814feb
Merge branch 'master' into release/v2.x
me-no-dev Jul 24, 2023
ae9dae4
Update version to 2.0.11
me-no-dev Jul 24, 2023
ebb4123
Merge branch 'master' into release/v2.x
me-no-dev Aug 4, 2023
369e974
io_pin_remap fixes for the Arduino Nano ESP32 (#8489)
pillo79 Aug 4, 2023
bd40349
fix attach pin for S3
P-R-O-C-H-Y Aug 11, 2023
7d607bf
Merge pull request #8512 from P-R-O-C-H-Y/SPI_SPI-pins_fix
me-no-dev Aug 12, 2023
9e8b5ac
I2S - Revert espressif/esp-idf@73ca054 to fix I2S crackling (#8583)
lucasssvaz Aug 29, 2023
8c7841c
Nano ESP32: add pin numbering option (#8565)
pillo79 Aug 29, 2023
43b700a
Nano ESP32 file system option (#8566)
pillo79 Aug 29, 2023
738be45
Nano ESP32: add debug support (#8567)
pillo79 Aug 30, 2023
9817b09
Nano ESP32: fix digital, analog and GPIO pin counts (#8586)
pillo79 Aug 30, 2023
165595b
Update toolchains and openocd for ESP-IDF v4.4.4
me-no-dev Feb 8, 2023
91420a3
Update get.py to support Apple ARM64
me-no-dev Feb 8, 2023
e8906a2
Update package version
me-no-dev Feb 8, 2023
a86c752
Update ESP-IDF libs to v4.4.4
me-no-dev Feb 8, 2023
7032aea
Fix compilation issue caused by ESP-Insights
me-no-dev Feb 9, 2023
790aeca
Update esptool to v4.4
me-no-dev Feb 9, 2023
ccbd88a
Update esptool to v4.5
me-no-dev Feb 13, 2023
8c78f47
Update package_esp32_index.template.json
me-no-dev Feb 20, 2023
a5b0839
Update esptool to v4.5.1
me-no-dev Mar 1, 2023
aa1f60e
Add setMode function HardwareSerial.c to set the esp32 uart mode for …
jamesarm97 Mar 31, 2023
13f15e9
Add support for esp-elf-gdb
me-no-dev Apr 7, 2023
32f38f0
WFG Crashfix (#8043)
mrengineer7777 Apr 10, 2023
5ebe01f
Update RainMaker and components
me-no-dev Apr 10, 2023
3bf1e07
WiFiUDF Low memory fix (#8065)
mrengineer7777 Apr 11, 2023
8ab01f5
Enable DFU
me-no-dev Apr 19, 2023
d56406b
Add required callbacks for TinyUSB DFU
me-no-dev Apr 19, 2023
91974e8
Update version to 2.0.8
me-no-dev Apr 20, 2023
6b2dbad
BugFix FlashStringHelper Macros (#8143)
mrengineer7777 May 3, 2023
0ce7408
Update version to 2.0.9
me-no-dev May 3, 2023
45546e7
Update ESP-IDF to v4.4.5
me-no-dev Jun 12, 2023
9fc32dc
Remove insights component since it's provided by RainMaker
me-no-dev Jun 12, 2023
88dc590
Update core version to 2.0.10
me-no-dev Jun 12, 2023
8105c75
Add Arduino Nano ESP32 target (#8417)
facchinm Jul 17, 2023
9fdcb6e
Fix escaping issues in 2.0.10 (#8433)
pillo79 Jul 20, 2023
55d3aa1
Update version to 2.0.11
me-no-dev Jul 24, 2023
d0635d0
io_pin_remap fixes for the Arduino Nano ESP32 (#8489)
pillo79 Aug 4, 2023
1a209a0
fix attach pin for S3
P-R-O-C-H-Y Aug 11, 2023
754635a
I2S - Revert espressif/esp-idf@73ca054 to fix I2S crackling (#8583)
lucasssvaz Aug 29, 2023
fd30949
Nano ESP32: add pin numbering option (#8565)
pillo79 Aug 29, 2023
58761be
Nano ESP32 file system option (#8566)
pillo79 Aug 29, 2023
7d1dd85
Nano ESP32: add debug support (#8567)
pillo79 Aug 30, 2023
8e2af4b
Nano ESP32: fix digital, analog and GPIO pin counts (#8586)
pillo79 Aug 30, 2023
725146d
Fix pin attachInterrupt(digitalPinToInterrupt(48)) on all S3 based SO…
SuGlider Sep 5, 2023
fe70e9b
Merge branch 'release/v2.x' of https://github.com/espressif/arduino-e…
P-R-O-C-H-Y Sep 5, 2023
d048e21
Uart detach 2.0.13 (#8629)
SuGlider Sep 13, 2023
fff900d
Disable Ethernet library if CONFIG_ETH_ENABLED not defined in sdkconf…
arkhipenko Sep 13, 2023
fc26b5b
Set ref to 2.0.13 (#8615)
SuGlider Sep 13, 2023
b65d1c7
Merge branch 'master' into release/v2.x
me-no-dev Sep 13, 2023
6dfcdef
HTTPClient - Fix case sensitiveness for header keys (#8632)
lucasssvaz Sep 15, 2023
e3cbd23
Merge branch 'master' into release/v2.x
me-no-dev Sep 15, 2023
16668c7
Merge branch 'master' into release/v2.x
me-no-dev Sep 15, 2023
d943db6
Update ESP-IDF to v4.4.6 (with I2S Rollback) (#8701)
me-no-dev Oct 4, 2023
d8706e6
Update core version to 2.0.14
me-no-dev Oct 4, 2023
93d8ad2
Merge branch 'master' into release/v2.x
me-no-dev Oct 4, 2023
44da992
Merge branch 'master' into release/v2.x
me-no-dev Oct 4, 2023
a17c673
fixes setPins return (#8644)
SuGlider Oct 5, 2023
b435bf1
Rename variants/heltec_wifi_kit_32_V3 to match entry in boards.txt. (…
audiophyl Nov 17, 2023
04d9e33
Support relative paths in UNIX search PATH (#8622)
me-no-dev Nov 29, 2023
b87d525
fix(adc): Always use default read resolution in __analogReadMilliVolt…
bkari02 Dec 15, 2023
7d08804
Fixes ESP32-S2 CDC Debug Logging (#7284)
SuGlider Dec 20, 2023
e8bb0db
Fixes EspClass::deepSleep(64 bits) (#9077)
SuGlider Jan 8, 2024
5d321a8
Fix AP DHCPS not properly working on recent IDF
me-no-dev Jan 11, 2024
84f2a3c
Backport fix linker failure (#9121)
Jason2866 Jan 17, 2024
911061c
Add and init new LittleFS options (#9122)
Jason2866 Jan 17, 2024
7696dcc
WebServer: use MD5Builder instead of mbedtls (#9123)
Jason2866 Jan 17, 2024
5bf60b7
SD library: Fix format (#9124)
Jason2866 Jan 17, 2024
7c344cc
Added isKey documentation for the Preferences library (#9142)
Viproz Jan 19, 2024
de1774b
simplifying webserver file uploads via form POST (#9211)
Jason2866 Feb 5, 2024
fda21f3
fix(platform): use numbers in all recipe hooks (#9219)
pillo79 Feb 7, 2024
0c0bd86
Backport: ArduinoOTA upload intermittent failure fixed (#9215)
Jason2866 Feb 7, 2024
99ceccd
Backport: Fix ESP32-Solo WDT on HTTP OTA update (#9223)
Jason2866 Feb 7, 2024
03da972
Implement official Arduino IDE debugger API on 2.x (#9118)
pillo79 Feb 9, 2024
607fb44
Remove -Werror=all from build flags, but enable it in CI
me-no-dev Feb 21, 2024
381d7ef
add senseBox MCU-S2 (#9263)
mariopesch Feb 21, 2024
43b15f3
feat: adds baudrate detection to S3 and C3 using LL API for all SoC (…
SuGlider Feb 21, 2024
0d37055
Add support for the MotorGo Mini board (#9269)
SwapnilPande Feb 22, 2024
622ddc5
Updated led pins to match latest board revision (#9298)
SwapnilPande Feb 28, 2024
d75795f
ESP32-S3 PowerFeather Support for v2.x (#9325)
powerfeatherdev Mar 5, 2024
fd49a0a
IDF 38eeba213a (#9339)
me-no-dev Mar 5, 2024
ccff800
Update core version to 2.0.15
me-no-dev Mar 5, 2024
995d3e9
fix: HWCDC removed clearing USB Serial/JTAG interrupts during begin (…
kiran-desilva Mar 7, 2024
75b7f4b
feat(uart): backports UART pin attachment from 3.0.0 to 2.0.15 (#9176)
SuGlider Mar 11, 2024
2dcb28f
Update esp32-hal-rgb-led.c (#9374)
SuGlider Mar 18, 2024
5e89e50
fix: UART0 boot pin setup (#9373)
SuGlider Mar 18, 2024
651a14c
backport: variants from 3.0.0 + fixes (#9381)
SuGlider Mar 18, 2024
9da60f4
Define Wire1 pins for ESP32-S3 PowerFeather (#9398)
powerfeatherdev Mar 21, 2024
c2a8e25
Adjust Update Library license (#9448)
SuGlider Apr 2, 2024
7d911b9
Handle large octet-stream (#9430)
nathannau Apr 8, 2024
94746ab
fix(sd): AquireSPI lock in sdcard_uninit (#9469)
P-R-O-C-H-Y Apr 9, 2024
4465cac
backports HWCDC to v2.0.15 (#9462)
SuGlider Apr 9, 2024
83372a3
fix: USB HID Keyboard raw report (#9473)
SuGlider Apr 10, 2024
627ffe6
Restore 2.x RX1/TX1 RX2/TX2 pins
SuGlider Apr 13, 2024
b49cfc2
roll back HardwareSerial.h
SuGlider Apr 13, 2024
5424f91
fix: restores UART1/2 pins as in 2.0.14 (#9502)
SuGlider Apr 15, 2024
69fbcf4
Update version and prevent the release script from updating the jsons
me-no-dev Apr 19, 2024
5613767
Enable JSON upload to releases page
me-no-dev Apr 19, 2024
d5a7072
feat(uart): changed buffer size to 32bits
SuGlider Apr 24, 2024
58962d2
fix(merging): roll back to create a proper PR
SuGlider Apr 24, 2024
5492733
feat (uart): uses the same IDF 32bits size for TX/RX buffers (#9561)
SuGlider Apr 29, 2024
b0a7973
feat(hwcdc): Fixes HWCDC fw uploading (#9660)
SuGlider May 22, 2024
f364155
Update version to 2.0.17
me-no-dev May 22, 2024
5e19e08
fix: remove "programmer.default" from Nano ESP32 (#9665)
pillo79 May 22, 2024
dcc1105
fix(release): Update merge_package.py
me-no-dev May 27, 2024
557792c
fix(release): install missing 'packaging' package
me-no-dev May 27, 2024
dc596f1
Update .github/workflows/release.yml
me-no-dev May 27, 2024
12d4226
ci(2.x): Save sizes to gh-pages
P-R-O-C-H-Y Jun 2, 2024
a6df1f5
fix(esp): Fix getFlashChipMode breaking on S3 and C3 (#9826)
Jason2866 Jun 12, 2024
4a6ab62
ci(push): Fix sizes upload if there is no changes (2.x) (#9839)
lucasssvaz Jun 12, 2024
b25c1b2
IDF release/v4.4 (#9672)
me-no-dev Jun 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions .github/scripts/merge_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# Written by Ivan Grokhotkov, 2015
#
from __future__ import print_function
from distutils.version import LooseVersion
#from distutils.version import LooseVersion
from packaging.version import Version
import re
import json
import sys
Expand Down Expand Up @@ -33,7 +34,7 @@ def merge_objects(versions, obj):
def pkgVersionNormalized(versionString):

verStr = str(versionString)
verParts = re.split('\.|-rc', verStr, flags=re.IGNORECASE)
verParts = re.split('\.|-rc|-alpha', verStr, flags=re.IGNORECASE)

if len(verParts) == 3:
if (sys.version_info > (3, 0)): # Python 3
Expand Down Expand Up @@ -74,7 +75,8 @@ def main(args):
print("Adding platform {0}-{1}".format(name, version), file=sys.stderr)
pkg1['platforms'].append(platforms[name][version])

pkg1['platforms'] = sorted(pkg1['platforms'], key=lambda k: LooseVersion(pkgVersionNormalized(k['version'])), reverse=True)
#pkg1['platforms'] = sorted(pkg1['platforms'], key=lambda k: LooseVersion(pkgVersionNormalized(k['version'])), reverse=True)
pkg1['platforms'] = sorted(pkg1['platforms'], key=lambda k: Version(pkgVersionNormalized(k['version'])), reverse=True)

json.dump({'packages':[pkg1]}, sys.stdout, indent=2)

Expand Down
36 changes: 31 additions & 5 deletions .github/scripts/on-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ set -e

export ARDUINO_BUILD_DIR="$HOME/.arduino/build.tmp"

# Relative path test
export PATH="./bin:$PATH"

function build(){
local target=$1
local fqbn=$2
local chunk_index=$3
local chunks_cnt=$4
shift; shift; shift; shift;
local build_log=$5
shift; shift; shift; shift; shift;
local sketches=$*

local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
Expand All @@ -22,6 +26,9 @@ function build(){
if [ "$OS_IS_LINUX" == "1" ]; then
args+=" -p $ARDUINO_ESP32_PATH/libraries"
args+=" -i $chunk_index -m $chunks_cnt"
if [ $build_log -eq 1 ]; then
args+=" -l $build_log"
fi
${BUILD_SKETCHES} ${args}
else
for sketch in ${sketches}; do
Expand All @@ -45,6 +52,7 @@ fi

CHUNK_INDEX=$1
CHUNKS_CNT=$2
BUILD_LOG=$3
BUILD_PIO=0
if [ "$#" -lt 2 ] || [ "$CHUNKS_CNT" -le 0 ]; then
CHUNK_INDEX=0
Expand All @@ -55,6 +63,10 @@ elif [ "$CHUNK_INDEX" -eq "$CHUNKS_CNT" ]; then
BUILD_PIO=1
fi

if [ -z "$BUILD_LOG" ] || [ "$BUILD_LOG" -le 0 ]; then
BUILD_LOG=0
fi

#echo "Updating submodules ..."
#git -C "$GITHUB_WORKSPACE" submodule update --init --recursive > /dev/null 2>&1

Expand All @@ -81,11 +93,25 @@ if [ "$BUILD_PIO" -eq 0 ]; then
$ARDUINO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino\
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
"
#create sizes_file
sizes_file="$GITHUB_WORKSPACE/cli_compile_$CHUNK_INDEX.json"

build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
if [ "$BUILD_LOG" -eq 1 ]; then
#create sizes_file and echo start of JSON array with "boards" key
echo "{\"boards\": [" > $sizes_file
fi

build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32XX
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32XX
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32

if [ "$BUILD_LOG" -eq 1 ]; then
#remove last comma from the last JSON object
sed -i '$ s/.$//' "$sizes_file"
#echo end of JSON array
echo "]}" >> $sizes_file
fi
else
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
# PlatformIO ESP32 Test
Expand Down
53 changes: 39 additions & 14 deletions .github/scripts/on-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ echo "Event: $GITHUB_EVENT_NAME, Repo: $GITHUB_REPOSITORY, Path: $GITHUB_WORKSPA
echo "Action: $action, Branch: $RELEASE_BRANCH, ID: $RELEASE_ID"
echo "Tag: $RELEASE_TAG, Draft: $draft, Pre-Release: $RELEASE_PRE"

# Try extracting something like a JSON with a "boards" array/element and "vendor" fields
BOARDS=`echo $RELEASE_BODY | grep -Pzo '(?s){.*}' | jq -r '.boards[]? // .boards? // empty' | xargs echo -n 2>/dev/null`
VENDOR=`echo $RELEASE_BODY | grep -Pzo '(?s){.*}' | jq -r '.vendor? // empty' | xargs echo -n 2>/dev/null`
if ! [ -z "${BOARDS}" ]; then echo "Releasing board(s): $BOARDS" ; fi
if ! [ -z "${VENDOR}" ]; then echo "Setting packager: $VENDOR" ; fi

function get_file_size(){
local file="$1"
if [[ "$OSTYPE" == "darwin"* ]]; then
Expand Down Expand Up @@ -171,12 +177,26 @@ mkdir -p "$PKG_DIR/tools"

# Copy all core files to the package folder
echo "Copying files for packaging ..."
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
if [ -z "${BOARDS}" ]; then
# Copy all variants
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
else
# Remove all entries not starting with any board code or "menu." from boards.txt
cat "$GITHUB_WORKSPACE/boards.txt" | grep "^menu\." > "$PKG_DIR/boards.txt"
for board in ${BOARDS} ; do
cat "$GITHUB_WORKSPACE/boards.txt" | grep "^${board}\." >> "$PKG_DIR/boards.txt"
done
# Copy only relevant variant files
mkdir "$PKG_DIR/variants/"
for variant in `cat ${PKG_DIR}/boards.txt | grep "\.variant=" | cut -d= -f2` ; do
cp -Rf "$GITHUB_WORKSPACE/variants/${variant}" "$PKG_DIR/variants/"
done
fi
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"
Expand All @@ -196,17 +216,22 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
# Replace tools locations in platform.txt
echo "Generating platform.txt..."
cat "$GITHUB_WORKSPACE/platform.txt" | \
sed "s/version=.*/version=$ver$extent/g" | \
sed 's/tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
sed 's/tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
sed 's/tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
sed 's/tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\{runtime.tools.riscv32-esp-elf-gcc.path\}/g' | \
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' | \
sed 's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g' | \
sed 's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g' | \
sed 's/debug.server.openocd.scripts_dir.windows={runtime.platform.path}\\tools\\openocd-esp32\\share\\openocd\\scripts\\/debug.server.openocd.scripts_dir.windows=\{runtime.tools.openocd-esp32.path\}\\share\\openocd\\scripts\\/g' \
sed "s/version=.*/version=$RELEASE_TAG/g" | \
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32s2-elf/\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32s3-elf/\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
sed 's/{runtime\.platform\.path}.tools.riscv32-esp-elf-gdb/\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
sed "s/{runtime\.platform\.path}.tools.riscv32-esp-elf/\\{runtime.tools.riscv32-esp-elf-gcc.path\\}/g" | \
sed 's/{runtime\.platform\.path}.tools.esptool/\{runtime.tools.esptool_py.path\}/g' | \
sed 's/{runtime\.platform\.path}.tools.openocd-esp32/\{runtime.tools.openocd-esp32.path\}/g' \
> "$PKG_DIR/platform.txt"

if ! [ -z ${VENDOR} ]; then
# Append vendor name to platform.txt to create a separate section
sed -i "/^name=.*/s/$/ ($VENDOR)/" "$PKG_DIR/platform.txt"
fi

# Add header with version information
echo "Generating core_version.h ..."
ver_define=`echo $RELEASE_TAG | tr "[:lower:].\055" "[:upper:]_"`
Expand Down Expand Up @@ -301,15 +326,15 @@ if [ "$RELEASE_PRE" == "false" ]; then
fi
fi

# Upload package JSONs
# Upload package JSONs (temporary halted, until json generation is fixed)
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 "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
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 "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_REL" "$OUTPUT_DIR/$PACKAGE_JSON_REL"`
echo
fi

Expand Down
76 changes: 74 additions & 2 deletions .github/scripts/sketch_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
shift
sketchdir=$1
;;
-i )
shift
chunk_index=$1
;;
-l )
shift
log_compilation=$1
;;
* )
break
;;
Expand Down Expand Up @@ -127,6 +135,9 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
fi

output_file="$HOME/.arduino/cli_compile_output.txt"
sizes_file="$GITHUB_WORKSPACE/cli_compile_$chunk_index.json"

mkdir -p "$ARDUINO_CACHE_DIR"
for i in `seq 0 $(($len - 1))`
do
Expand All @@ -148,9 +159,43 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
--fqbn "$currfqbn" \
--board-options "$curroptions" \
--warnings "all" \
--build-property "compiler.warning_flags.all=-Wall -Werror=all -Wextra" \
--build-cache-path "$ARDUINO_CACHE_DIR" \
--build-path "$build_dir" \
$xtra_opts "${sketchdir}"
$xtra_opts "${sketchdir}" \
> $output_file

exit_status=$?
if [ $exit_status -ne 0 ]; then
echo ""ERROR: Compilation failed with error code $exit_status""
exit $exit_status
fi

if [ $log_compilation ]; then
#Extract the program storage space and dynamic memory usage in bytes and percentage in separate variables from the output, just the value without the string
flash_bytes=$(grep -oE 'Sketch uses ([0-9]+) bytes' $output_file | awk '{print $3}')
flash_percentage=$(grep -oE 'Sketch uses ([0-9]+) bytes \(([0-9]+)%\)' $output_file | awk '{print $5}' | tr -d '(%)')
ram_bytes=$(grep -oE 'Global variables use ([0-9]+) bytes' $output_file | awk '{print $4}')
ram_percentage=$(grep -oE 'Global variables use ([0-9]+) bytes \(([0-9]+)%\)' $output_file | awk '{print $6}' | tr -d '(%)')

# Extract the directory path excluding the filename
directory_path=$(dirname "$sketch")
# Define the constant part
constant_part="/home/runner/Arduino/hardware/espressif/esp32/libraries/"
# Extract the desired substring using sed
lib_sketch_name=$(echo "$directory_path" | sed "s|$constant_part||")
#append json file where key is fqbn, sketch name, sizes -> extracted values
echo "{\"name\": \"$lib_sketch_name\",
\"sizes\": [{
\"flash_bytes\": $flash_bytes,
\"flash_percentage\": $flash_percentage,
\"ram_bytes\": $ram_bytes,
\"ram_percentage\": $ram_percentage
}]
}," >> "$sizes_file"
fi


elif [ -f "$ide_path/arduino-builder" ]; then
echo "Building $sketchname with arduino-builder and FQBN=$currfqbn"
echo "Build path = $build_dir"
Expand Down Expand Up @@ -252,6 +297,10 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
shift
chunk_max=$1
;;
-l )
shift
log_compilation=$1
;;
* )
break
;;
Expand Down Expand Up @@ -315,8 +364,19 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
echo "Start Sketch: $start_num"
echo "End Sketch : $end_index"

sizes_file="$GITHUB_WORKSPACE/cli_compile_$chunk_index.json"
if [ $log_compilation ]; then
#echo board,target and start of sketches to sizes_file json
echo "{ \"board\": \"$fqbn\",
\"target\": \"$target\",
\"sketches\": [" >> "$sizes_file"
fi

local sketchnum=0
args+=" -ai $ide_path -au $user_path"
args+=" -ai $ide_path -au $user_path -i $chunk_index"
if [ $log_compilation ]; then
args+=" -l $log_compilation"
fi
for sketch in $sketches; do
local sketchdir=$(dirname $sketch)
local sketchdirname=$(basename $sketchdir)
Expand All @@ -333,6 +393,18 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
return $result
fi
done

if [ $log_compilation ]; then
#remove last comma from json
if [ $i -eq $(($len - 1)) ]; then
sed -i '$ s/.$//' "$sizes_file"
fi
#echo end of sketches sizes_file json
echo "]" >> "$sizes_file"
#echo end of board sizes_file json
echo "}," >> "$sizes_file"
fi

return 0
}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ jobs:

- name: Push to github repo
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
git commit -m "Generated External Libraries Test Results"
git push origin HEAD:gh-pages

event_file:
name: "Event File"
if: |
Expand All @@ -126,4 +126,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Event File
path: ${{github.event_path}}
path: ${{github.event_path}}
Loading
Loading