Skip to content

Commit 05fbda2

Browse files
authored
Merge branch 'master' into release/v3.3.x
2 parents 0f72681 + 016077e commit 05fbda2

File tree

44 files changed

+1427
-265
lines changed

Some content is hidden

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

44 files changed

+1427
-265
lines changed

.github/scripts/package_esptool.sh

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# Check version argument
6+
if [[ $# -ne 3 ]]; then
7+
echo "Usage: $0 <version> <base_folder> <json_path>"
8+
echo "Example: $0 5.0.dev1 /tmp/esptool /tmp/esptool-5.0.dev1.json"
9+
exit 1
10+
fi
11+
12+
VERSION=$1
13+
BASE_FOLDER=$2
14+
JSON_PATH=$3
15+
16+
export COPYFILE_DISABLE=1
17+
18+
shopt -s nullglob # So for loop doesn't run if no matches
19+
20+
# Function to update JSON for a given host
21+
function update_json_for_host {
22+
local host=$1
23+
local archive=$2
24+
25+
# Extract the old url from the JSON for this host, then replace only the filename
26+
old_url=$(jq -r --arg host "$host" '
27+
.packages[].tools[] | select(.name == "esptool_py") | .systems[] | select(.host == $host) | .url // empty
28+
' "$tmp_json")
29+
if [[ -n "$old_url" ]]; then
30+
base_url="${old_url%/*}"
31+
url="$base_url/$archive"
32+
else
33+
echo "No old url found for $host"
34+
exit 1
35+
fi
36+
37+
archiveFileName="$archive"
38+
checksum="SHA-256:$(shasum -a 256 "$archive" | awk '{print $1}')"
39+
size=$(stat -f%z "$archive")
40+
41+
# Use jq to update the JSON
42+
jq --arg host "$host" \
43+
--arg url "$url" \
44+
--arg archiveFileName "$archiveFileName" \
45+
--arg checksum "$checksum" \
46+
--arg size "$size" \
47+
'
48+
.packages[].tools[]
49+
|= if .name == "esptool_py" then
50+
.systems = (
51+
((.systems // []) | map(select(.host != $host))) + [{
52+
host: $host,
53+
url: $url,
54+
archiveFileName: $archiveFileName,
55+
checksum: $checksum,
56+
size: $size
57+
}]
58+
)
59+
else
60+
.
61+
end
62+
' "$tmp_json" > "$tmp_json.new" && mv "$tmp_json.new" "$tmp_json"
63+
}
64+
65+
cd "$BASE_FOLDER"
66+
67+
# Delete all archives before starting
68+
rm -f esptool-*.tar.gz esptool-*.zip
69+
70+
for dir in esptool-*; do
71+
# Check if directory exists and is a directory
72+
if [[ ! -d "$dir" ]]; then
73+
continue
74+
fi
75+
76+
base="${dir#esptool-}"
77+
78+
# Add 'linux-' prefix if base doesn't contain linux/macos/win64
79+
if [[ "$base" != *linux* && "$base" != *macos* && "$base" != *win64* ]]; then
80+
base="linux-${base}"
81+
fi
82+
83+
if [[ "$dir" == esptool-win* ]]; then
84+
# Windows zip archive
85+
zipfile="esptool-v${VERSION}-${base}.zip"
86+
echo "Creating $zipfile from $dir ..."
87+
zip -r "$zipfile" "$dir"
88+
else
89+
# Non-Windows: set permissions and tar.gz archive
90+
tarfile="esptool-v${VERSION}-${base}.tar.gz"
91+
echo "Setting permissions and creating $tarfile from $dir ..."
92+
chmod -R u=rwx,g=rx,o=rx "$dir"
93+
tar -cvzf "$tarfile" "$dir"
94+
fi
95+
done
96+
97+
# After the for loop, update the JSON for each archive
98+
# Create a temporary JSON file to accumulate changes
99+
tmp_json="${JSON_PATH}.tmp"
100+
cp "$JSON_PATH" "$tmp_json"
101+
102+
for archive in esptool-v"${VERSION}"-*.tar.gz esptool-v"${VERSION}"-*.zip; do
103+
[ -f "$archive" ] || continue
104+
105+
echo "Updating JSON for $archive"
106+
107+
# Determine host from archive name
108+
case "$archive" in
109+
*linux-amd64*) host="x86_64-pc-linux-gnu" ;;
110+
*linux-armv7*) host="arm-linux-gnueabihf" ;;
111+
*linux-aarch64*) host="aarch64-linux-gnu" ;;
112+
*macos-amd64*) host="x86_64-apple-darwin" ;;
113+
*macos-arm64*) host="arm64-apple-darwin" ;;
114+
*win64*) hosts=("x86_64-mingw32" "i686-mingw32") ;;
115+
*) echo "Unknown host for $archive"; continue ;;
116+
esac
117+
118+
# For win64, loop over both hosts; otherwise, use a single host
119+
if [[ "$archive" == *win64* ]]; then
120+
for host in "${hosts[@]}"; do
121+
update_json_for_host "$host" "$archive"
122+
done
123+
else
124+
update_json_for_host "$host" "$archive"
125+
fi
126+
done
127+
128+
# After all archives are processed, move the temporary JSON to the final file
129+
mv "$tmp_json" "$JSON_PATH"

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ set(ARDUINO_LIBRARY_LittleFS_SRCS libraries/LittleFS/src/LittleFS.cpp)
165165
set(ARDUINO_LIBRARY_NetBIOS_SRCS libraries/NetBIOS/src/NetBIOS.cpp)
166166

167167
set(ARDUINO_LIBRARY_OpenThread_SRCS
168+
libraries/OpenThread/src/OThread.cpp
168169
libraries/OpenThread/src/OThreadCLI.cpp
169170
libraries/OpenThread/src/OThreadCLI_Util.cpp)
170171

boards.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36262,12 +36262,12 @@ XIAO_ESP32S3_Plus.build.cdc_on_boot=1
3626236262
XIAO_ESP32S3_Plus.build.msc_on_boot=0
3626336263
XIAO_ESP32S3_Plus.build.dfu_on_boot=0
3626436264
XIAO_ESP32S3_Plus.build.f_cpu=240000000L
36265-
XIAO_ESP32S3_Plus.build.flash_size=8MB
36265+
XIAO_ESP32S3_Plus.build.flash_size=16MB
3626636266
XIAO_ESP32S3_Plus.build.flash_freq=80m
3626736267
XIAO_ESP32S3_Plus.build.flash_mode=dio
3626836268
XIAO_ESP32S3_Plus.build.boot=qio
3626936269
XIAO_ESP32S3_Plus.build.boot_freq=80m
36270-
XIAO_ESP32S3_Plus.build.partitions=default_8MB
36270+
XIAO_ESP32S3_Plus.build.partitions=ffat
3627136271
XIAO_ESP32S3_Plus.build.defines=
3627236272
XIAO_ESP32S3_Plus.build.loop_core=
3627336273
XIAO_ESP32S3_Plus.build.event_core=
@@ -36304,8 +36304,6 @@ XIAO_ESP32S3_Plus.menu.FlashMode.dio.build.boot=dio
3630436304
XIAO_ESP32S3_Plus.menu.FlashMode.dio.build.boot_freq=80m
3630536305
XIAO_ESP32S3_Plus.menu.FlashMode.dio.build.flash_freq=80m
3630636306

36307-
XIAO_ESP32S3_Plus.menu.FlashSize.8M=8MB (64Mb)
36308-
XIAO_ESP32S3_Plus.menu.FlashSize.8M.build.flash_size=8MB
3630936307
XIAO_ESP32S3_Plus.menu.FlashSize.16M=16MB (128Mb)
3631036308
XIAO_ESP32S3_Plus.menu.FlashSize.16M.build.flash_size=16MB
3631136309

0 commit comments

Comments
 (0)