Skip to content

Commit 8e1a98a

Browse files
ivankravetsCurclamas
authored andcommitted
Allow to pass a custom partition table
1 parent ddf179b commit 8e1a98a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: tools/platformio-build.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,18 @@ def _get_board_flash_mode(env):
181181
#
182182
# Generate partition table
183183
#
184+
185+
# Export path to the partitions table
186+
env.Replace(
187+
PARTITION_TABLE_CSV=join(
188+
FRAMEWORK_DIR, "tools", "partitions",
189+
"%s.csv" % env.BoardConfig().get("build.partitions", "default")
190+
)
191+
)
192+
184193
partition_table = env.Command(
185194
join("$BUILD_DIR", "partitions.bin"),
186-
join(FRAMEWORK_DIR, "tools", "partitions",
187-
"%s.csv" % env.BoardConfig().get("build.partitions", "default")),
195+
"$PARTITION_TABLE_CSV",
188196
env.VerboseAction('"$PYTHONEXE" "%s" -q $SOURCE $TARGET' % join(
189197
FRAMEWORK_DIR, "tools", "gen_esp32part.py"),
190198
"Generating partitions $TARGET"))

0 commit comments

Comments
 (0)