Skip to content

Commit fa7787f

Browse files
committed
Add the ability to specify an encryption key via custom_secure_key
1 parent d8a0dba commit fa7787f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

builder/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,17 @@
129129
)
130130

131131
if build_core == "teensy4":
132+
# Get the key and default to an empty string
133+
custom_secure_key = env.GetProjectConfig().get("env:" + env["PIOENV"], "custom_secure_key", "")
132134
env.Append(
133135
BUILDERS=dict(
134136
HexToEhex=Builder(
135137
action=env.VerboseAction(" ".join([
136138
"$TEENSYSECURE",
137139
"encrypthex",
138140
board_config.id.upper(),
139-
"$SOURCES"
141+
"$SOURCES",
142+
custom_secure_key
140143
]), "Encrypting $TARGET"),
141144
suffix=".ehex"
142145
)

0 commit comments

Comments
 (0)