4 Units are talking, but LINK rarely works. Committing now for safety.
This commit is contained in:
parent
10498b57e1
commit
f1670a6123
21 changed files with 1440 additions and 0 deletions
|
|
@ -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}\\"'),
|
||||
]
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue