From a0a76fbc60c907677c103fce35b02637176a8c07 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sat, 10 Oct 2026 00:47:03 +0200 Subject: [PATCH] fix(watch13): build with -Os like the other nRF52 solo boards The Watch13 env still compiled with -Ofast and had run out of flash after the map, calendar and QR commits. -Os brings it to 70.7%. Co-Authored-By: Claude Opus 5.5 --- solo/gat562_mesh_watch13/platformio.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/solo/gat562_mesh_watch13/platformio.ini b/solo/gat562_mesh_watch13/platformio.ini index 32dfe132..7d6b53e3 100644 --- a/solo/gat562_mesh_watch13/platformio.ini +++ b/solo/gat562_mesh_watch13/platformio.ini @@ -13,10 +13,12 @@ extends = GAT562_Mesh_Watch13 board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld board_upload.maximum_size = 712704 +; Optimise for size, not speed, as the 30S and the L1 do: the nRF52 Arduino +; core defaults to -Ofast, which bloats flash by ~200 KB on this solo build. ; The offline queue (messages held for the phone app while it's away) at 128, ; not the board's 256: on the nRF52 the 256 x 177 B left ~5 KB of heap next to ; the on-device UI (which keeps its own history), too little for a sign buffer. -build_unflags = -D OFFLINE_QUEUE_SIZE=256 +build_unflags = -Ofast -D OFFLINE_QUEUE_SIZE=256 build_flags = ${GAT562_Mesh_Watch13.build_flags} -I examples/companion_radio/ui-new @@ -33,6 +35,7 @@ build_flags = ; GPS — re-enable (base undefines it); Serial1 pins 15/16 from variant -D ENV_INCLUDE_GPS=1 -D GPS_BAUD_RATE=9600 + -Os ; Buzzer available on IO3 (pin 21) — uncomment to enable ; -D PIN_BUZZER=21 ; -D PIN_VIBRATION=36