From 29dedf250d7aa5e019f020cef4892f72c6fee43d Mon Sep 17 00:00:00 2001 From: TeTeHacko Date: Sun, 6 Sep 2026 00:07:38 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20opravit=20nRF52=20buildy=20na=20GH=20(lok?= =?UTF-8?q?=C3=A1ln=C3=AD=20symlink=20leakl=20do=20trackovan=C3=A9ho=20con?= =?UTF-8?q?figu)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nRF52 CI buildy (RAK_4631*, wio_wm1110) padaly na `PackageException: Can not create a symbolic link for /home/user/projects/meshcore-nrf52-fw` — lokální build hack (`framework-...@ symlink:///home/user/...`) byl commitnutý v platformio.ini a na runneru ta cesta neexistuje. Pre-existing, ne antispam změna; buildovalo jen lokálně. - [nrf52_fw] pkg proměnná: committed default = fetchable git pin (plný SHA d541301…, tip meshcore-dev fork masteru s BLE patchem). Plný SHA schválně — shallow fetch krátkého SHA byl důvod symlinku. - Symlink override přesunut do gitignorovaného platformio.local.ini ([nrf52_fw] pkg = symlink://…), takže lokální build jede dál a hack už neleakne do CI. - TxtDataHelpers.cpp: `ltoa` (nedeklarované na STM32/newlib-nano, rozbíjelo wio-e5 build) → přenositelné `sprintf("%lu")`. int_part je nezáporná magnituda, znaménko se řeší zvlášť výš. Co-Authored-By: Claude Fable 5 --- platformio.ini | 19 +++++++++++++------ src/helpers/TxtDataHelpers.cpp | 11 +++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/platformio.ini b/platformio.ini index c859ea30..1af9addc 100644 --- a/platformio.ini +++ b/platformio.ini @@ -95,16 +95,23 @@ platform = https://github.com/pioarduino/platform-espressif32/releases/download/ ; ----------------- NRF52 --------------------- +; nRF52 Adafruit framework package. Committed DEFAULT is a fetchable git pin +; (works on CI and on any clone). d541301 is the tip of meshcore-dev's fork +; master and carries the BLE-stack patch against rapid connect/disconnect +; lockup (MeshCore PRs #1177, #1295). The full 40-char SHA is used on purpose: +; PlatformIO's shallow fetch choked on the SHORT SHA, which is the whole reason +; the local build used a full clone + symlink. That symlink hack now lives ONLY +; in the gitignored platformio.local.ini (it redefines [nrf52_fw].pkg), so it +; never leaks into the tracked tree and breaks CI again -- it did: a committed +; `symlink:///home/user/...` gave PackageException on every nRF52 runner build. +[nrf52_fw] +pkg = https://github.com/meshcore-dev/Adafruit_nRF52_Arduino#d541301665b40959682252911e57b11df3ee651a + [nrf52_base] extends = arduino_base platform = nordicnrf52 platform_packages = - ; use internal fork that includes patch to ble stack to prevent firmware lockup during rapid connect/disconnect - ; https://github.com/meshcore-dev/MeshCore/pull/1177 - ; https://github.com/meshcore-dev/MeshCore/pull/1295 - ; LOKÁLNÍ build hack (TeTeHacko): shallow git fetch krátkého SHA neumí, tak plný klon + symlink. - ; upstream: framework-arduinoadafruitnrf52 @ https://github.com/meshcore-dev/Adafruit_nRF52_Arduino#d541301 - framework-arduinoadafruitnrf52 @ symlink:///home/user/projects/meshcore-nrf52-fw + framework-arduinoadafruitnrf52 @ ${nrf52_fw.pkg} platformio/toolchain-gccarmnoneeabi@^1.140201.0 ; Stamping verze pro KAŽDÝ nRF52 env, ne po jednom: 19. 8. 2026 se ukázalo, že ; z 585 envů v repu stampovaly DVA, takže `ver` na lavičních deskách hlásil diff --git a/src/helpers/TxtDataHelpers.cpp b/src/helpers/TxtDataHelpers.cpp index d327931f..f5e9b92b 100644 --- a/src/helpers/TxtDataHelpers.cpp +++ b/src/helpers/TxtDataHelpers.cpp @@ -100,12 +100,11 @@ static void _ftoa(float f, char *p, int *status) *p++ = '-'; if (int_part == 0) *p++ = '0'; - else - { - ltoa(int_part, p, 10); - while (*p) - p++; - } + else + // ltoa() is not declared on every toolchain (STM32/newlib-nano lacks it, + // breaking the wio-e5 build); sprintf %lu is portable. int_part is the + // non-negative magnitude here -- the sign was already emitted above. + p += sprintf(p, "%lu", (unsigned long)int_part); *p++ = '.'; if (frac_part == 0) *p++ = '0';