From bfed6eb07292821602238280776ddea6a995fa7f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 7 May 2018 23:47:22 +0300 Subject: [PATCH] Allow to pass a custom partition table --- tools/platformio-build.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/platformio-build.py b/tools/platformio-build.py index 3bc9ebb5..30178597 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -181,10 +181,18 @@ env.Prepend(LIBS=libs) # # Generate partition table # + +# Export path to the partitions table +env.Replace( + PARTITION_TABLE_CSV=join( + FRAMEWORK_DIR, "tools", "partitions", + "%s.csv" % env.BoardConfig().get("build.partitions", "default") + ) +) + partition_table = env.Command( join("$BUILD_DIR", "partitions.bin"), - join(FRAMEWORK_DIR, "tools", "partitions", - "%s.csv" % env.BoardConfig().get("build.partitions", "default")), + "$PARTITION_TABLE_CSV", env.VerboseAction('"$PYTHONEXE" "%s" -q $SOURCE $TARGET' % join( FRAMEWORK_DIR, "tools", "gen_esp32part.py"), "Generating partitions $TARGET"))