diff --git a/platformio/builder/scripts/atmelsam.py b/platformio/builder/scripts/atmelsam.py index 8fe0a0c7..39440cb0 100644 --- a/platformio/builder/scripts/atmelsam.py +++ b/platformio/builder/scripts/atmelsam.py @@ -103,10 +103,6 @@ if "sam3x8e" in BOARD_OPTIONS.get("build", {}).get("mcu", ""): LINKFLAGS=[ "-Wl,--entry=Reset_Handler", "-Wl,--start-group" - ], - - UPLOADERFLAGS=[ - "--boot", ] ) @@ -174,6 +170,9 @@ elif upload_protocol == "sam-ba": UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES' ) + if "sam3x8e" in BOARD_OPTIONS.get("build", {}).get("mcu", ""): + env.Append(UPLOADERFLAGS=["--boot"]) + # # Target: Build executable and linkable firmware #