mirror of
https://github.com/jhuebert/MeshCore.git
synced 2026-12-02 02:18:36 +00:00
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:
1 parent
059ea01214
commit
9a49211633
1 file changed
+9
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user