Skip to content

Commit 3a7e883

Browse files
committed
Merge branch 'release/v1.5.0'
2 parents a5d2e62 + 9bcc86a commit 3a7e883

File tree

9 files changed

+88
-41
lines changed

9 files changed

+88
-41
lines changed

boards/maple.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,18 @@
99
["0x1EAF", "0x0004"]
1010
],
1111
"ldscript": "flash.ld",
12-
"mcu": "stm32f103rb_maple",
12+
"mcu": "stm32f103rb",
1313
"variant": "maple"
1414
},
1515
"frameworks": ["arduino"],
16-
"name": "Olimexino STM32 (Maple)",
16+
"name": "Maple",
1717
"upload": {
18-
"disable_flushing": false,
19-
"maximum_ram_size": 17000,
20-
"maximum_size": 108000,
18+
"maximum_ram_size": 17408,
19+
"maximum_size": 110592,
2120
"protocol": "dfu",
2221
"boot_version": 1,
23-
"require_upload_port": true,
24-
"use_1200bps_touch": false,
25-
"wait_for_upload_port": false
22+
"require_upload_port": true
2623
},
27-
"url": "https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/",
28-
"vendor": "Olimex"
24+
"url": "http://www.leaflabs.com/maple/",
25+
"vendor": "LeafLabs"
2926
}

boards/maple_mini_b20.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"build": {
3+
"core": "maple",
4+
"cpu": "cortex-m3",
5+
"extra_flags": "-DARDUINO_MAPLE_MINI -DMCU_STM32F103CB",
6+
"f_cpu": "72000000L",
7+
"hwids": [
8+
["0x1EAF", "0x0003"],
9+
["0x1EAF", "0x0004"]
10+
],
11+
"ldscript": "flash.ld",
12+
"mcu": "stm32f103cb",
13+
"variant": "maple_mini"
14+
},
15+
"frameworks": ["arduino"],
16+
"name": "Maple Mini Bootloader 2.0",
17+
"upload": {
18+
"maximum_ram_size": 20480,
19+
"maximum_size": 122880,
20+
"protocol": "dfu",
21+
"boot_version": 2,
22+
"require_upload_port": true
23+
},
24+
"url": "http://www.leaflabs.com/maple/",
25+
"vendor": "LeafLabs"
26+
}

boards/maple_mini_origin.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"build": {
3+
"core": "maple",
4+
"cpu": "cortex-m3",
5+
"extra_flags": "-DARDUINO_MAPLE_MINI -DMCU_STM32F103CB",
6+
"f_cpu": "72000000L",
7+
"hwids": [
8+
["0x1EAF", "0x0003"],
9+
["0x1EAF", "0x0004"]
10+
],
11+
"ldscript": "flash.ld",
12+
"mcu": "stm32f103cb",
13+
"variant": "maple_mini"
14+
},
15+
"frameworks": ["arduino"],
16+
"name": "Maple Mini Original",
17+
"upload": {
18+
"maximum_ram_size": 17408,
19+
"maximum_size": 110592,
20+
"protocol": "dfu",
21+
"boot_version": 1,
22+
"require_upload_port": true
23+
},
24+
"url": "http://www.leaflabs.com/maple/",
25+
"vendor": "LeafLabs"
26+
}

builder/frameworks/arduino.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
],
4949

5050
CPPDEFINES=[
51-
"ARDUINO=10611",
51+
("ARDUINO", 10610),
5252
"BOARD_%s" % board.get("build.variant"),
53-
"ERROR_LED_PORT=GPIOB",
54-
"ERROR_LED_PIN=1",
55-
"DEBUG_LEVEL=DEBUG_NONE",
53+
("ERROR_LED_PORT", "GPIOB"),
54+
("ERROR_LED_PIN", 1),
55+
("DEBUG_LEVEL", "DEBUG_NONE"),
5656
"__STM32F1__",
5757
"ARDUINO_ARCH_STM32F1"
5858
],
@@ -77,21 +77,20 @@
7777
if item in env['LINKFLAGS']:
7878
env['LINKFLAGS'].remove(item)
7979

80-
ld = board.get("build.ldscript")
8180

8281
if env.subst("$UPLOAD_PROTOCOL") == "dfu":
83-
if "stm32f103c" in board.get("build.mcu", ""):
84-
ld = "bootloader_20.ld"
85-
elif "stm32f103r" in board.get("build.mcu", ""):
86-
ld = "bootloader.ld"
87-
if "stm32f103rb_maple" in board.get("build.mcu", ""):
88-
env.Append(CPPDEFINES=["VECT_TAB_ADDR=0x8005000", "SERIAL_USB"])
82+
if board.id in ("maple", "maple_mini_origin"):
83+
env.Append(CPPDEFINES=[("VECT_TAB_ADDR", 0x8005000), "SERIAL_USB"])
8984
else:
9085
env.Append(CPPDEFINES=[
91-
"VECT_TAB_ADDR=0x8002000", "SERIAL_USB", "GENERIC_BOOTLOADER"])
92-
env.Replace(LDSCRIPT_PATH=ld)
86+
("VECT_TAB_ADDR", 0x8002000), "SERIAL_USB", "GENERIC_BOOTLOADER"])
87+
88+
if "stm32f103r" in board.get("build.mcu", ""):
89+
env.Replace(LDSCRIPT_PATH="bootloader.ld")
90+
elif board.get("upload.boot_version", 0) == 2:
91+
env.Replace(LDSCRIPT_PATH="bootloader_20.ld")
9392
else:
94-
env.Append(CPPDEFINES=["VECT_TAB_ADDR=0x8000000"])
93+
env.Append(CPPDEFINES=[("VECT_TAB_ADDR", 0x8000000)])
9594

9695
#
9796
# Lookup for specific core's libraries

builder/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
],
5050

5151
CPPDEFINES=[
52-
"F_CPU=$BOARD_F_CPU"
52+
("F_CPU", "$BOARD_F_CPU")
5353
],
5454

5555
LINKFLAGS=[

examples/mbed-blink/platformio.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ platform = ststm32
2222
framework = mbed
2323
board = disco_f100rb
2424

25-
; [env:nucleo_f030r8]
26-
; platform = ststm32
27-
; framework = mbed
28-
; board = nucleo_f030r8
25+
[env:nucleo_f030r8]
26+
platform = ststm32
27+
framework = mbed
28+
board = nucleo_f030r8
2929

3030
[env:nucleo_f103rb]
3131
platform = ststm32

examples/mbed-dsp/platformio.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ platform = ststm32
2222
framework = mbed
2323
board = disco_f100rb
2424

25-
; [env:nucleo_f030r8]
26-
; platform = ststm32
27-
; framework = mbed
28-
; board = nucleo_f030r8
25+
[env:nucleo_f030r8]
26+
platform = ststm32
27+
framework = mbed
28+
board = nucleo_f030r8
2929

3030
[env:nucleo_f103rb]
3131
platform = ststm32

examples/mbed-serial/platformio.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ platform = ststm32
2222
framework = mbed
2323
board = disco_f100rb
2424

25-
; [env:nucleo_f030r8]
26-
; platform = ststm32
27-
; framework = mbed
28-
; board = nucleo_f030r8
25+
[env:nucleo_f030r8]
26+
platform = ststm32
27+
framework = mbed
28+
board = nucleo_f030r8
2929

3030
[env:nucleo_f103rb]
3131
platform = ststm32

platform.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
"homepage": "http://platformio.org/platforms/ststm32",
77
"license": "Apache-2.0",
88
"engines": {
9-
"platformio": "^3.0.0",
10-
"scons": ">=2.3.0,<2.6.0"
9+
"platformio": "^3.0.0"
1110
},
1211
"repository": {
1312
"type": "git",
1413
"url": "https://github.com/platformio/platform-ststm32.git"
1514
},
16-
"version": "1.4.0",
15+
"version": "1.5.0",
1716
"packageRepositories": [
1817
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1918
"https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download",
@@ -49,7 +48,7 @@
4948
"framework-mbed": {
5049
"type": "framework",
5150
"optional": true,
52-
"version": "~3.127.0"
51+
"version": "~3.126.0"
5352
},
5453
"framework-cmsis": {
5554
"type": "framework",

0 commit comments

Comments
 (0)