# Debug Builds only: compiles in the Debug Console token from $RORO_DEBUG_TOKEN (set by _docker.sh # from ~/.config/roro9stack/debug-token). Refuses to build without one rather than use a default. import os import re import sys Import("env") # noqa: F821 (provided by PlatformIO) token = os.environ.get("RORO_DEBUG_TOKEN", "").strip() if not re.fullmatch(r"[0-9a-f]{32}", token): sys.exit("debug build: RORO_DEBUG_TOKEN is missing; build through scripts/ci.sh or scripts/flash.sh --debug") env.Append(CPPDEFINES=[("RORO_DEBUG_TOKEN", '\\"%s\\"' % token)]) # noqa: F821