From a6bec539055c21191e49a47b6098b4c21afdafcb Mon Sep 17 00:00:00 2001 From: Eric Ptak Date: Mon, 22 Jul 2019 12:33:34 +0200 Subject: [PATCH] Fix FYSETC stm32flash usage (#14703) --- buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py b/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py index 80fc41314d..995f3d3bb0 100644 --- a/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py +++ b/buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py @@ -1,6 +1,8 @@ from os.path import join Import("env", "projenv") +platform = env.PioPlatform() + # Relocate firmware from 0x08000000 to 0x08002000 #env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) #env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) @@ -27,7 +29,8 @@ env.AddPostAction( # In-line command with arguments env.Replace( - UPLOADCMD="stm32flash -v -i rts,-dtr,dtr " + '$UPLOAD_PORT' + " -R -w $BUILD_DIR/${PROGNAME}.hex" + UPLOADER=platform.get_package_dir("tool-stm32duino") + '/stm32flash/stm32flash', + UPLOADCMD='"${UPLOADER}" -v -i rts,-dtr,dtr,-rts -R -b 115200 -g 0x8000000 -w "${BUILD_DIR}/${PROGNAME}.hex" ${UPLOAD_PORT}' )