4 Units are talking, but LINK rarely works. Committing now for safety.

This commit is contained in:
John Poole 2026-05-28 16:44:41 -07:00
commit f1670a6123
21 changed files with 1440 additions and 0 deletions

View file

@ -0,0 +1,23 @@
import binascii
import time
from pathlib import Path
Import("env")
pioenv = env.subst("$PIOENV").upper()
identity_path = Path(env.subst("$PROJECT_DIR")) / "identities" / f"{pioenv}.identity"
if not identity_path.exists():
raise RuntimeError(f"Missing identity file for {pioenv}: {identity_path}")
identity_hex = binascii.hexlify(identity_path.read_bytes()).decode("ascii")
epoch = int(time.time())
utc_tag = time.strftime("%Y%m%d_%H%M%S", time.gmtime(epoch))
env.Append(
CPPDEFINES=[
("LOCAL_IDENTITY_HEX", f'\\"{identity_hex}\\"'),
("FW_BUILD_EPOCH", str(epoch)),
("FW_BUILD_UTC", f'\\"{utc_tag}\\"'),
]
)