mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
build(solo-dual): optimise for size (-Os), not -Ofast
The nRF52 Arduino core compiles with -Ofast (≈ -O3 + -ffast-math) by default, which had pushed this feature-rich solo build to ~90% flash. Unflag -Ofast and build with -Os: flash drops 90.1% → 60.9% (638 KB → 431 KB, ~200 KB reclaimed) with no loss of functionality and a negligible speed cost for a UI/mesh workload. -Os also avoids fast-math float reassociation, so it's marginally safer for the geo/distance maths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -152,9 +152,15 @@ extra_scripts = post:create-uf2.py
|
||||
|
||||
[env:WioTrackerL1_companion_solo_dual]
|
||||
extends = WioTrackerL1CompanionDual
|
||||
; Optimise for size, not speed: the nRF52 Arduino core defaults to -Ofast
|
||||
; (≈ -O3 + -ffast-math), which bloats flash by ~200 KB on this feature-rich
|
||||
; solo build. -Os keeps every feature, fits comfortably, and is actually safer
|
||||
; for float (no fast-math reassociation). Speed is irrelevant for the UI/mesh.
|
||||
build_unflags = -Ofast
|
||||
build_flags = ${WioTrackerL1CompanionDual.build_flags}
|
||||
-D UI_HAS_JOYSTICK_UPDOWN=1
|
||||
-D ENABLE_SCREENSHOT
|
||||
-Os
|
||||
extra_scripts = post:create-uf2.py
|
||||
|
||||
[env:WioTrackerL1_companion_dual_dev]
|
||||
|
||||
Reference in New Issue
Block a user