fix: fit the wio-e5-mini repeater with library LTO

The fork's code pushes wio-e5-mini_repeater ~4.5 KB over its 224 KB
flash region. Build that target with -flto for the framework/libraries
and -fno-lto for project sources: it now uses 225,284 bytes (4,092
under the limit) and still emits the .su files the stack gate checks.
The override lives in the release script so the upstream variant stays
untouched.
This commit is contained in:
github-actions[bot] committed 2026-10-28 15:28:06 -05:00
1 parent 059ea01214
commit 9a49211633
1 file changed
+9
+9
View File
@@ -147,6 +147,15 @@ if [[ ${1:-} == __worker ]]; then
# (codegen unchanged, consumed by the stack gate below) + version string
export PLATFORMIO_BUILD_FLAGS="-fstack-usage -DFIRMWARE_BUILD_DATE='\"${firmware_build_date}\"' -DFIRMWARE_VERSION='\"${firmware_version_string}\"'"
# wio-e5-mini_repeater is ~4.5 KB over its 224 KB flash region. LTO on the
# framework/libraries recovers the space; project sources stay non-LTO so
# the stack gate below still gets their .su files. Fork-owned override: the
# upstream variant does not carry it.
if [[ $target == wio-e5-mini_repeater ]]; then
export PLATFORMIO_BUILD_FLAGS="$PLATFORMIO_BUILD_FLAGS -flto"
export PLATFORMIO_BUILD_SRC_FLAGS="${PLATFORMIO_BUILD_SRC_FLAGS:-} -fno-lto"
fi
file_base="${target}-${firmware_version_string}"
mkdir -p out