diff --git a/builder/frameworks/arduino.py b/builder/frameworks/arduino.py index 88bc910..8fad636 100644 --- a/builder/frameworks/arduino.py +++ b/builder/frameworks/arduino.py @@ -41,10 +41,6 @@ FRAMEWORK_DIR = join(platform.get_package_dir( FRAMEWORK_VERSION = platform.get_package_version("framework-arduinoststm32") assert isdir(FRAMEWORK_DIR) -env.Replace( - LIBS=["m", "gcc"] -) - env.Append( CCFLAGS=[ "--param", "max-inline-insns-single=500", @@ -72,7 +68,9 @@ env.Append( LIBPATH=[ join(FRAMEWORK_DIR, "variants", board.get("build.variant"), "ld") - ] + ], + + LIBS=["c"] ) for item in ("-nostartfiles", "-nostdlib"): diff --git a/builder/main.py b/builder/main.py index e41d8d7..0d7d064 100644 --- a/builder/main.py +++ b/builder/main.py @@ -137,10 +137,11 @@ if env.subst("$UPLOAD_PROTOCOL") == "gdb": UPLOADCMD='$UPLOADER $UPLOADERFLAGS' ) -if "arduino" in env.subst("$PIOFRAMEWORK"): +elif env.subst("$UPLOAD_PROTOCOL") in ("serial", "dfu") \ + and "arduino" in env.subst("$PIOFRAMEWORK"): _upload_tool = "serial_upload" _upload_flags = ["{upload.altID}", "{upload.usbID}"] - if "dfu" in env.subst("$UPLOAD_PROTOCOL"): + if env.subst("$UPLOAD_PROTOCOL") == "dfu": _upload_tool = "maple_upload" _usbids = env.BoardConfig().get("build.hwids") _upload_flags = [env.BoardConfig().get("upload.boot_version", 2), @@ -164,7 +165,7 @@ else: target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf) AlwaysBuild(env.Alias("nobuild", target_firm)) -target_buildprog = env.Alias("buildprog", target_firm) +target_buildprog = env.Alias("buildprog", target_firm, target_firm) # # Target: Print binary size diff --git a/platform.json b/platform.json index 00f25f7..d5b527e 100644 --- a/platform.json +++ b/platform.json @@ -13,7 +13,7 @@ "type": "git", "url": "https://github.com/platformio/platform-ststm32.git" }, - "version": "1.3.0", + "version": "1.3.1", "packageRepositories": [ "https://dl.bintray.com/platformio/dl-packages/manifest.json", "https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download",