From 557f32e82e0a996dff6e43640369b3a50242da59 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 11 Oct 2016 19:31:27 +0300 Subject: [PATCH 1/6] Fix linker error "undefined reference to _sbrk" for STM32Duino // Resolve #10 --- builder/frameworks/arduino.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/frameworks/arduino.py b/builder/frameworks/arduino.py index baab9aa..53c735c 100644 --- a/builder/frameworks/arduino.py +++ b/builder/frameworks/arduino.py @@ -80,7 +80,10 @@ env.Append( LIBPATH=[ join(FRAMEWORK_DIR, "variants", board.get("build.variant"), "ld") - ] + ], + + # hook for https://github.com/platformio/platform-ststm32/issues/10 + LIBS=["c"] ) for item in ("-nostartfiles", "-nostdlib"): From 012d7eb9392fdc59dfdbbbad88be97b535efb4f4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 11 Oct 2016 19:33:19 +0300 Subject: [PATCH 2/6] Use "serial" protocol by default for STM32Duino-based boards // Resolve #14 --- builder/main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/builder/main.py b/builder/main.py index ff628f6..fb68100 100644 --- a/builder/main.py +++ b/builder/main.py @@ -147,15 +147,17 @@ if "arduino" in env.subst("$PIOFRAMEWORK"): uploadPlatform = "macosx" else: uploadPlatform = "win" - if env.subst("$UPLOAD_PROTOCOL") == "serial": - uploadProtocol = "serial_upload" - uploadParams = "{upload.altID} {upload.usbID} $PROJECT_DIR/$SOURCES" - elif env.subst("$UPLOAD_PROTOCOL") == "dfu": + + if env.subst("$UPLOAD_PROTOCOL") == "dfu": uploadProtocol = "maple_upload" usbids = env.BoardConfig().get("build.hwids") usbid = '2 %s:%s' % (usbids[0][0], usbids[0][1]) env.Replace(UPLOADERFLAGS=usbid) uploadParams = usbid + else: + uploadProtocol = "serial_upload" + uploadParams = "{upload.altID} {upload.usbID} $PROJECT_DIR/$SOURCES" + env.Replace( UPLOADER=join( env.PioPlatform().get_package_dir( From 3f6dbd1b74524d415cc2269f2866b3beb5655c11 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Oct 2016 01:36:48 +0300 Subject: [PATCH 3/6] Refactor support for STM32Duino // Resolve #9 --- boards/genericSTM32F103C8.json | 34 ++++++++++++------------ boards/genericSTM32F103CB.json | 34 ++++++++++++------------ boards/genericSTM32F103R8.json | 34 ++++++++++++------------ boards/genericSTM32F103RB.json | 34 ++++++++++++------------ boards/genericSTM32F103RC.json | 34 ++++++++++++------------ boards/genericSTM32F103RE.json | 34 ++++++++++++------------ boards/maple.json | 34 ++++++++++++------------ builder/frameworks/arduino.py | 47 +++++++++++++--------------------- builder/main.py | 44 ++++++++++++------------------- platform.json | 21 ++++++--------- 10 files changed, 161 insertions(+), 189 deletions(-) diff --git a/boards/genericSTM32F103C8.json b/boards/genericSTM32F103C8.json index f5843ff..93d7c86 100644 --- a/boards/genericSTM32F103C8.json +++ b/boards/genericSTM32F103C8.json @@ -1,28 +1,28 @@ { "build": { - "core": "maple", - "cpu": "cortex-m3", - "extra_flags": "-DMCU_STM32F103C8", - "f_cpu": "72000000L", + "core": "maple", + "cpu": "cortex-m3", + "extra_flags": "-DARDUINO_GENERIC_STM32F103C -DMCU_STM32F103C8", + "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], - "ldscript": "jtag_c8.ld", - "mcu": "stm32f103c8", + "ldscript": "jtag_c8.ld", + "mcu": "stm32f103c8", "variant": "generic_stm32f103c" - }, - "frameworks": ["arduino"], - "name": "STM32F103C8 (20k RAM. 64k Flash)", + }, + "frameworks": ["arduino"], + "name": "STM32F103C8 (20k RAM. 64k Flash)", "upload": { - "disable_flushing": false, - "maximum_ram_size": 20480, - "maximum_size": 65536, - "protocol": "maple_serial", - "require_upload_port": true, - "use_1200bps_touch": false, + "disable_flushing": false, + "maximum_ram_size": 20480, + "maximum_size": 65536, + "protocol": "serial", + "require_upload_port": true, + "use_1200bps_touch": false, "wait_for_upload_port": false - }, - "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html", + }, + "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html", "vendor": "Generic" } \ No newline at end of file diff --git a/boards/genericSTM32F103CB.json b/boards/genericSTM32F103CB.json index 47ef822..7132a0b 100644 --- a/boards/genericSTM32F103CB.json +++ b/boards/genericSTM32F103CB.json @@ -1,28 +1,28 @@ { "build": { - "core": "maple", - "cpu": "cortex-m3", - "extra_flags": "-DMCU_STM32F103CB", - "f_cpu": "72000000L", + "core": "maple", + "cpu": "cortex-m3", + "extra_flags": "-DARDUINO_GENERIC_STM32F103C -DMCU_STM32F103CB", + "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], - "ldscript": "jtag.ld", - "mcu": "stm32f103cb", + "ldscript": "jtag.ld", + "mcu": "stm32f103cb", "variant": "generic_stm32f103c" - }, - "frameworks": ["arduino"], - "name": "STM32F103CB (20k RAM. 128k Flash)", + }, + "frameworks": ["arduino"], + "name": "STM32F103CB (20k RAM. 128k Flash)", "upload": { - "disable_flushing": false, - "maximum_ram_size": 20480, - "maximum_size": 131072, - "protocol": "maple_serial", - "require_upload_port": true, - "use_1200bps_touch": false, + "disable_flushing": false, + "maximum_ram_size": 20480, + "maximum_size": 131072, + "protocol": "serial", + "require_upload_port": true, + "use_1200bps_touch": false, "wait_for_upload_port": false - }, - "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103cb.html", + }, + "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103cb.html", "vendor": "Generic" } \ No newline at end of file diff --git a/boards/genericSTM32F103R8.json b/boards/genericSTM32F103R8.json index 5fd9c9a..878c478 100644 --- a/boards/genericSTM32F103R8.json +++ b/boards/genericSTM32F103R8.json @@ -1,28 +1,28 @@ { "build": { - "core": "maple", - "cpu": "cortex-m3", - "extra_flags": "-DMCU_STM32F103R8", - "f_cpu": "72000000L", + "core": "maple", + "cpu": "cortex-m3", + "extra_flags": "-DARDUINO_GENERIC_STM32F103R -DMCU_STM32F103R8", + "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], - "ldscript": "stm32f103r8.ld", - "mcu": "stm32f103r8", + "ldscript": "stm32f103r8.ld", + "mcu": "stm32f103r8", "variant": "generic_stm32f103r8" - }, - "frameworks": ["arduino"], - "name": "STM32F103R8 (20k RAM. 64 Flash)", + }, + "frameworks": ["arduino"], + "name": "STM32F103R8 (20k RAM. 64 Flash)", "upload": { - "disable_flushing": false, - "maximum_ram_size": 20480, - "maximum_size": 65536, - "protocol": "maple_serial", - "require_upload_port": true, - "use_1200bps_touch": false, + "disable_flushing": false, + "maximum_ram_size": 20480, + "maximum_size": 65536, + "protocol": "serial", + "require_upload_port": true, + "use_1200bps_touch": false, "wait_for_upload_port": false - }, - "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103r8.html", + }, + "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103r8.html", "vendor": "Generic" } \ No newline at end of file diff --git a/boards/genericSTM32F103RB.json b/boards/genericSTM32F103RB.json index 051898e..5d3a3bc 100644 --- a/boards/genericSTM32F103RB.json +++ b/boards/genericSTM32F103RB.json @@ -1,28 +1,28 @@ { "build": { - "core": "maple", - "cpu": "cortex-m3", - "extra_flags": "-DMCU_STM32F103RB", - "f_cpu": "72000000L", + "core": "maple", + "cpu": "cortex-m3", + "extra_flags": "-DARDUINO_GENERIC_STM32F103R -DMCU_STM32F103RB", + "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], - "ldscript": "stm32f103rb.ld", - "mcu": "stm32f103rb", + "ldscript": "stm32f103rb.ld", + "mcu": "stm32f103rb", "variant": "generic_stm32f103r8" - }, - "frameworks": ["arduino"], - "name": "STM32F103RB (20k RAM. 128k Flash)", + }, + "frameworks": ["arduino"], + "name": "STM32F103RB (20k RAM. 128k Flash)", "upload": { - "disable_flushing": false, - "maximum_ram_size": 20480, - "maximum_size": 131072, - "protocol": "maple_serial", - "require_upload_port": true, - "use_1200bps_touch": false, + "disable_flushing": false, + "maximum_ram_size": 20480, + "maximum_size": 131072, + "protocol": "serial", + "require_upload_port": true, + "use_1200bps_touch": false, "wait_for_upload_port": false - }, - "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103rb.html", + }, + "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103rb.html", "vendor": "Generic" } \ No newline at end of file diff --git a/boards/genericSTM32F103RC.json b/boards/genericSTM32F103RC.json index ad90515..ca3d9ca 100644 --- a/boards/genericSTM32F103RC.json +++ b/boards/genericSTM32F103RC.json @@ -1,28 +1,28 @@ { "build": { - "core": "maple", - "cpu": "cortex-m3", - "extra_flags": "-DMCU_STM32F103RC", - "f_cpu": "72000000L", + "core": "maple", + "cpu": "cortex-m3", + "extra_flags": "-DARDUINO_GENERIC_STM32F103R -DMCU_STM32F103RC", + "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], - "ldscript": "stm32f103rc.ld", - "mcu": "stm32f103rc", + "ldscript": "stm32f103rc.ld", + "mcu": "stm32f103rc", "variant": "generic_stm32f103r" - }, - "frameworks": ["arduino"], - "name": "STM32F103RC (48k RAM. 256k Flash)", + }, + "frameworks": ["arduino"], + "name": "STM32F103RC (48k RAM. 256k Flash)", "upload": { - "disable_flushing": false, - "maximum_ram_size": 49152, - "maximum_size": 262144, - "protocol": "maple_serial", - "require_upload_port": true, - "use_1200bps_touch": false, + "disable_flushing": false, + "maximum_ram_size": 49152, + "maximum_size": 262144, + "protocol": "serial", + "require_upload_port": true, + "use_1200bps_touch": false, "wait_for_upload_port": false - }, - "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103rc.html", + }, + "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103rc.html", "vendor": "Generic" } \ No newline at end of file diff --git a/boards/genericSTM32F103RE.json b/boards/genericSTM32F103RE.json index 3599f26..d8b0cdf 100644 --- a/boards/genericSTM32F103RE.json +++ b/boards/genericSTM32F103RE.json @@ -1,28 +1,28 @@ { "build": { - "core": "maple", - "cpu": "cortex-m3", - "extra_flags": "-DMCU_STM32F103RE", - "f_cpu": "72000000L", + "core": "maple", + "cpu": "cortex-m3", + "extra_flags": "-DARDUINO_GENERIC_STM32F103R -DMCU_STM32F103RE", + "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], - "ldscript": "stm32f103re.ld", - "mcu": "stm32f103re", + "ldscript": "stm32f103re.ld", + "mcu": "stm32f103re", "variant": "generic_stm32f103r" - }, - "frameworks": ["arduino"], - "name": "STM32F103RE (64k RAM. 512k Flash)", + }, + "frameworks": ["arduino"], + "name": "STM32F103RE (64k RAM. 512k Flash)", "upload": { - "disable_flushing": false, - "maximum_ram_size": 65536, - "maximum_size": 524288, - "protocol": "maple_serial", - "require_upload_port": true, - "use_1200bps_touch": false, + "disable_flushing": false, + "maximum_ram_size": 65536, + "maximum_size": 524288, + "protocol": "serial", + "require_upload_port": true, + "use_1200bps_touch": false, "wait_for_upload_port": false - }, - "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103re.html", + }, + "url": "http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103re.html", "vendor": "Generic" } \ No newline at end of file diff --git a/boards/maple.json b/boards/maple.json index 4f913bd..76e45bd 100644 --- a/boards/maple.json +++ b/boards/maple.json @@ -1,28 +1,28 @@ { "build": { - "core": "maple", - "cpu": "cortex-m3", - "extra_flags": "-DMCU_STM32F103RB", - "f_cpu": "72000000L", + "core": "maple", + "cpu": "cortex-m3", + "extra_flags": "-DARDUINO_MAPLE_REV3 -DMCU_STM32F103RB", + "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], - "ldscript": "flash.ld", - "mcu": "stm32f103rb_maple", + "ldscript": "flash.ld", + "mcu": "stm32f103rb_maple", "variant": "maple" - }, - "frameworks": ["arduino"], - "name": "Olimexino STM32", + }, + "frameworks": ["arduino"], + "name": "Olimexino STM32", "upload": { - "disable_flushing": false, - "maximum_ram_size": 17000, - "maximum_size": 108000, - "protocol": "dfu", - "require_upload_port": true, - "use_1200bps_touch": false, + "disable_flushing": false, + "maximum_ram_size": 17000, + "maximum_size": 108000, + "protocol": "dfu", + "require_upload_port": true, + "use_1200bps_touch": false, "wait_for_upload_port": false - }, - "url": "https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/", + }, + "url": "https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/", "vendor": "Olimex" } diff --git a/builder/frameworks/arduino.py b/builder/frameworks/arduino.py index 53c735c..88bc910 100644 --- a/builder/frameworks/arduino.py +++ b/builder/frameworks/arduino.py @@ -35,38 +35,30 @@ if board.id == "bluepill_f103c8": env['LDSCRIPT_PATH'] = board.get("build.ldscript") env.ProcessFlags(board.get("build.extra_flags")) -if "stm32f103" in board.get("build.mcu", ""): - FRAMEWORK_DIR = join(platform.get_package_dir( - "framework-arduinoststm32"), "STM32F1") - env.Append( - CPPDEFINES=[ - "ERROR_LED_PORT=GPIOB", - "ERROR_LED_PIN=1", - "ARDUINO_ARCH_STM32F1" - ] - ) - if "stm32f103r8" or "stm32f103rb" in board.get( - "build.mcu", ""): - env.Append(CPPDEFINES=[ - "BOARD_generic_stm32f103r8", "ARDUINO_GENERIC_STM32F103R"]) - elif "stm32f103rc" or "stm32f103re" in board.get( - "build.mcu", ""): - env.Append(CPPDEFINES=[ - "BOARD_generic_stm32f103r", "ARDUINO_GENERIC_STM32F103R"]) - elif "stm32f103c" in board.get("build.mcu", ""): - env.Append(CPPDEFINES=[ - "BOARD_generic_stm32f103c", "ARDUINO_GENERIC_STM32F103C"]) - elif "stm32f103rb_maple" in board.get("build.mcu", ""): - env.Append(CPPDEFINES=["BOARD_maple", "ARDUINO_MAPLE_REV3"]) +FRAMEWORK_DIR = join(platform.get_package_dir( + "framework-arduinoststm32"), "STM32F1") FRAMEWORK_VERSION = platform.get_package_version("framework-arduinoststm32") assert isdir(FRAMEWORK_DIR) -ARDUINO_VERSION = int(FRAMEWORK_VERSION.replace(".", "").strip()) +env.Replace( + LIBS=["m", "gcc"] +) env.Append( + CCFLAGS=[ + "--param", "max-inline-insns-single=500", + "-march=armv7-m" + ], + CPPDEFINES=[ - "ARDUINO=%s" % FRAMEWORK_VERSION.split(".")[1] + "ARDUINO=10611", + "BOARD_%s" % board.get("build.variant"), + "ERROR_LED_PORT=GPIOB", + "ERROR_LED_PIN=1", + "DEBUG_LEVEL=DEBUG_NONE", + "__STM32F1__", + "ARDUINO_ARCH_STM32F1" ], CPPPATH=[ @@ -80,10 +72,7 @@ env.Append( LIBPATH=[ join(FRAMEWORK_DIR, "variants", board.get("build.variant"), "ld") - ], - - # hook for https://github.com/platformio/platform-ststm32/issues/10 - LIBS=["c"] + ] ) for item in ("-nostartfiles", "-nostdlib"): diff --git a/builder/main.py b/builder/main.py index fb68100..2fc9e52 100644 --- a/builder/main.py +++ b/builder/main.py @@ -12,12 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from os.path import isfile, join +from os.path import basename, isfile, join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, DefaultEnvironment) -from platformio import util env = DefaultEnvironment() @@ -139,34 +138,18 @@ if env.subst("$UPLOAD_PROTOCOL") == "gdb": ) if "arduino" in env.subst("$PIOFRAMEWORK"): - uploadProtocol = "" - uploadParams = "" - if "linux" in util.get_systype(): - uploadPlatform = "linux" - elif "darwin" in util.get_systype(): - uploadPlatform = "macosx" - else: - uploadPlatform = "win" - - if env.subst("$UPLOAD_PROTOCOL") == "dfu": - uploadProtocol = "maple_upload" - usbids = env.BoardConfig().get("build.hwids") - usbid = '2 %s:%s' % (usbids[0][0], usbids[0][1]) - env.Replace(UPLOADERFLAGS=usbid) - uploadParams = usbid - else: - uploadProtocol = "serial_upload" - uploadParams = "{upload.altID} {upload.usbID} $PROJECT_DIR/$SOURCES" + _upload_tool = "serial_upload" + _upload_flags = ["{upload.altID}", "{upload.usbID}"] + if "dfu" in env.subst("$UPLOAD_PROTOCOL"): + _upload_tool = "maple_upload" + _usbids = env.BoardConfig().get("build.hwids") + _upload_flags = ["2", "%s:%s" % (_usbids[0][0][2:], _usbids[0][1][2:])] env.Replace( - UPLOADER=join( - env.PioPlatform().get_package_dir( - "framework-arduinoststm32") or "", - "tools", uploadPlatform, uploadProtocol), - UPLOADERFLAGS=["$UPLOAD_PORT"], - UPLOADERPARAMS=uploadParams, + UPLOADER=_upload_tool, + UPLOADERFLAGS=["$UPLOAD_PORT"] + _upload_flags, UPLOADCMD=( - '$UPLOADER $UPLOADERFLAGS $UPLOADERPARAMS $PROJECT_DIR/$SOURCES')) + '$UPLOADER $UPLOADERFLAGS $PROJECT_DIR/$SOURCES')) # # Target: Build executable and linkable firmware @@ -202,9 +185,14 @@ if "mbed" in env.subst("$PIOFRAMEWORK") and not env.subst("$UPLOAD_PROTOCOL"): "Looking for upload disk..."), env.VerboseAction(env.UploadToDisk, "Uploading $SOURCE")]) elif "arduino" in env.subst("$PIOFRAMEWORK"): + + def BeforeUpload(target, source, env): + env.AutodetectUploadPort() + env.Replace(UPLOAD_PORT=basename(env.subst("$UPLOAD_PORT"))) + target_upload = env.Alias( "upload", target_firm, - [env.VerboseAction(env.AutodetectUploadPort, + [env.VerboseAction(BeforeUpload, "Looking for upload disk..."), env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]) else: diff --git a/platform.json b/platform.json index ebe125e..e43729c 100644 --- a/platform.json +++ b/platform.json @@ -13,21 +13,11 @@ "type": "git", "url": "https://github.com/platformio/platform-ststm32.git" }, - "version": "1.2.0", + "version": "1.3.0-alpha1", "packageRepositories": [ "https://dl.bintray.com/platformio/dl-packages/manifest.json", "https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download", - "http://dl.platformio.org/packages/manifest.json", - { - "framework-arduinoststm32": [ - { - "url": "https://github.com/ubis/Arduino_STM32/archive/v1.0.0.tar.gz", - "sha1": "36f26069b70ef6b7ceae2a91e3c23be74cc79337", - "version": "1.0.0", - "system": "*" - } - ] - } + "http://dl.platformio.org/packages/manifest.json" ], "frameworks": { "mbed": { @@ -79,12 +69,17 @@ "framework-arduinoststm32": { "type": "framework", "optional": true, - "version": "~1.0.0" + "version": "~2.0.0" }, "tool-stlink": { "type": "uploader", "optional": true, "version": "~1.10200.0" + }, + "tool-stm32duino": { + "type": "uploader", + "optional": true, + "version": "~1.0.0" } } } From d3bd98072f11a9ecf8f7139095fe7b45944c9f77 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Oct 2016 15:47:58 +0300 Subject: [PATCH 4/6] Use Boot v1 for Maple board // Resolve #17 --- boards/maple.json | 1 + builder/main.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/boards/maple.json b/boards/maple.json index 76e45bd..ef12c60 100644 --- a/boards/maple.json +++ b/boards/maple.json @@ -19,6 +19,7 @@ "maximum_ram_size": 17000, "maximum_size": 108000, "protocol": "dfu", + "boot_version": 1, "require_upload_port": true, "use_1200bps_touch": false, "wait_for_upload_port": false diff --git a/builder/main.py b/builder/main.py index 2fc9e52..e41d8d7 100644 --- a/builder/main.py +++ b/builder/main.py @@ -143,7 +143,8 @@ if "arduino" in env.subst("$PIOFRAMEWORK"): if "dfu" in env.subst("$UPLOAD_PROTOCOL"): _upload_tool = "maple_upload" _usbids = env.BoardConfig().get("build.hwids") - _upload_flags = ["2", "%s:%s" % (_usbids[0][0][2:], _usbids[0][1][2:])] + _upload_flags = [env.BoardConfig().get("upload.boot_version", 2), + "%s:%s" % (_usbids[0][0][2:], _usbids[0][1][2:])] env.Replace( UPLOADER=_upload_tool, From 0b85ef49fc9c2272c94f9aae289016a4b11bf03d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Oct 2016 18:13:42 +0300 Subject: [PATCH 5/6] Add Maple to title --- boards/maple.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/maple.json b/boards/maple.json index ef12c60..33212c5 100644 --- a/boards/maple.json +++ b/boards/maple.json @@ -13,7 +13,7 @@ "variant": "maple" }, "frameworks": ["arduino"], - "name": "Olimexino STM32", + "name": "Olimexino STM32 (Maple)", "upload": { "disable_flushing": false, "maximum_ram_size": 17000, From 5bfc30fadeafbaad272dc281668e847127dd99c5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Oct 2016 18:17:11 +0300 Subject: [PATCH 6/6] Bump version to v1.3.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index e43729c..00f25f7 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-alpha1", + "version": "1.3.0", "packageRepositories": [ "https://dl.bintray.com/platformio/dl-packages/manifest.json", "https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download",