|
@@ -12,7 +12,7 @@ env.AddPostAction(
|
12
|
12
|
join("$BUILD_DIR","${PROGNAME}.elf"),
|
13
|
13
|
env.VerboseAction(" ".join([
|
14
|
14
|
"$OBJCOPY", "-O ihex", "$TARGET", # TARGET=.pio/build/fysetc_STM32F1/firmware.elf
|
15
|
|
- "'" + join("$BUILD_DIR","${PROGNAME}.hex") + "'", # Note: $BUILD_DIR is a full path
|
|
15
|
+ "\"" + join("$BUILD_DIR","${PROGNAME}.hex") + "\"", # Note: $BUILD_DIR is a full path
|
16
|
16
|
]), "Building $TARGET"))
|
17
|
17
|
|
18
|
18
|
# please keep $SOURCE variable, it will be replaced with a path to firmware
|
|
@@ -27,11 +27,11 @@ env.AddPostAction(
|
27
|
27
|
UPLOAD_TOOL="stm32flash"
|
28
|
28
|
platform = env.PioPlatform()
|
29
|
29
|
if platform.get_package_dir("tool-stm32duino") != None:
|
30
|
|
- UPLOAD_TOOL=expandvars("'" + join(platform.get_package_dir("tool-stm32duino"),"stm32flash","stm32flash") + "'")
|
|
30
|
+ UPLOAD_TOOL=expandvars("\"" + join(platform.get_package_dir("tool-stm32duino"),"stm32flash","stm32flash") + "\"")
|
31
|
31
|
|
32
|
32
|
env.Replace(
|
33
|
33
|
UPLOADER=UPLOAD_TOOL,
|
34
|
|
- UPLOADCMD=expandvars(UPLOAD_TOOL + " -v -i rts,-dtr,dtr $UPLOAD_PORT -R -w '" + join("$BUILD_DIR","${PROGNAME}.hex") + "'")
|
|
34
|
+ UPLOADCMD=expandvars(UPLOAD_TOOL + " -v -i rts,-dtr,dtr $UPLOAD_PORT -R -w \"" + join("$BUILD_DIR","${PROGNAME}.hex")+"\"")
|
35
|
35
|
)
|
36
|
36
|
|
37
|
37
|
# Python callback
|