From e7d39cc6ee10d52506fe8f9baff1d0479a1cda6c Mon Sep 17 00:00:00 2001 From: Thijs van Liempd <33570639+thijses@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:25:11 +0200 Subject: [PATCH] Update platformio-build.py this fixes a spaces-in-path error i got, because: lines 371~373 produce (in my case): '$PROJECT_DIR\boards/variants\BKS_H2O_1003400D\ldscript.ld' which then gets translated to a full/absolute path, where the spaces in my windows username are not accounted for. I added some quotes around the whole thing, which fixes it for me. (some of the other path strings (which include an absolute path early on) do not suffer from this issue, so i suspect that someone has already attempted to prevent spaces-in-path errors by dynamically adding quotes at some point, but has not accounted for unparsed paths ('$PROJECT_DIR') when checking for spaces.) Signed-off-by: Thijs van Liempd <33570639+thijses@users.noreply.github.com> --- tools/platformio/platformio-build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/platformio/platformio-build.py b/tools/platformio/platformio-build.py index 9d347ef818..ba92c8c53e 100644 --- a/tools/platformio/platformio-build.py +++ b/tools/platformio/platformio-build.py @@ -368,10 +368,10 @@ def get_arduino_board_id(board_config, mcu): LINKFLAGS=[ ( "-Wl,--default-script", - join( + ('"'+join( inc_variant_dir, board_config.get("build.arduino.ldscript", "ldscript.ld"), - ), + )+'"'), ) ] )