build: stamp the version in every nRF52 env, not in two of them
`ver` on a bench board reported the literal from the upstream header, so there was no way to tell which build was actually on it -- which is exactly what AGENTS.md says must never happen for a flashed env. The audit was worse than expected: of 585 envs in the repo, TWO stamped. The T1000-E only looks right because it is flashed from a local env in platformio.local.ini. So the stamping moved into [nrf52_base], where every nRF52 env inherits it, and the two per-env copies are gone (they would have run the script twice). Verified on hardware, not just in the ELF: after reflashing, x4 reports ver -> v1.17.1-tthec20d77+ (Build: 260819 1957) and x2's device query returns v1.17.1-tthec20d77+ / 260819 2003. The `+` marks a dirty tree, the sha is the commit that built it. ESP32/RP2040/STM32 bases can take the same one-liner if boards on those platforms ever get flashed from here; not done blind. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f80fcc0587
commit
1da521859c
2 files changed
+5
-3
No files matched your search
@@ -94,7 +94,12 @@ platform_packages =
|
||||
; 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
|
||||
; 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
|
||||
; literál z upstream headeru a z uzlu nešlo poznat, který build na něm je.
|
||||
; U flashované desky je to podmínka, ne komfort (AGENTS.md).
|
||||
extra_scripts = create-uf2.py
|
||||
pre:tools/build_version.py
|
||||
build_flags = ${arduino_base.build_flags}
|
||||
-D NRF52_PLATFORM
|
||||
-D LFS_NO_ASSERT=1
|
||||
|
||||
@@ -57,9 +57,6 @@ build_src_filter = ${SenseCap_Solar.build_src_filter}
|
||||
extends = SenseCap_Solar
|
||||
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
||||
board_upload.maximum_size = 708608
|
||||
; custom version + build timestamp for `ver` (see tools/build_version.py)
|
||||
extra_scripts = ${nrf52_base.extra_scripts}
|
||||
pre:tools/build_version.py
|
||||
build_flags =
|
||||
${SenseCap_Solar.build_flags}
|
||||
-D ADVERT_NAME='"SenseCap_Solar Repeater"'
|
||||
|
||||
Reference in new issue
Block a user