Reduce nRF52 infrastructure flash usage without trimming sensors

Keep Companion and Terminal Chat profiles unchanged; retain full-sensor and reduced-sensor OTA builds. Add compact crypto and OTA names, qualified display asset compression, font license packaging, and scope regression tests.
This commit is contained in:
mikecarper committed 2026-10-02 15:52:23 -07:00
1 parent 010374d7db
commit 8a69e73226
44 files changed
+11150 -14

No files matched your search

+9 -2
View File
@@ -6,6 +6,10 @@ import hashlib
import json
from pathlib import Path
import re
import sys
sys.path.insert(0, str(Path(__file__).resolve().parent))
from package_nrf52_font_license import validate_artifact_notice
def digest(path):
@@ -37,15 +41,17 @@ def validate_build(directory):
def artifact_files(stem):
stem = Path(stem)
candidates = [stem.parent / (stem.name + suffix)
for suffix in (".bin", "-merged.bin", ".uf2", ".zip", ".hex", ".capabilities.json")]
for suffix in (".bin", "-merged.bin", ".uf2", ".zip", ".hex", ".capabilities.json",
".font-license.txt")]
return [p for p in candidates if p.is_file()]
def package_report(directory, stem):
stem = Path(stem)
report = validate_build(directory)
validate_artifact_notice(stem)
files = artifact_files(stem)
if len(files) < 2 or not any(p.suffix != ".json" for p in files):
if len(files) < 2 or not any(p.suffix in (".bin", ".uf2", ".zip", ".hex") for p in files):
raise ValueError("cannot qualify an empty firmware package")
manifest = json.loads((stem.parent / (stem.name + ".capabilities.json")).read_text())
report.update(target=manifest["target"], artifact_target=manifest["artifact_target"],
@@ -57,6 +63,7 @@ def package_report(directory, stem):
def validate_package(stem):
stem = Path(stem)
validate_artifact_notice(stem)
report = passing_report(stem.parent / (stem.name + ".memory.json"))
actual = {p.name: digest(p) for p in artifact_files(stem)}
if len(actual) < 2 or actual != report.get("files"):