Add support for Maple Mini Original and Maple Mini Bootloader 2.0 // Resolve #22
This commit is contained in:
parent
883b603b11
commit
58858dacba
|
@ -9,21 +9,18 @@
|
||||||
["0x1EAF", "0x0004"]
|
["0x1EAF", "0x0004"]
|
||||||
],
|
],
|
||||||
"ldscript": "flash.ld",
|
"ldscript": "flash.ld",
|
||||||
"mcu": "stm32f103rb_maple",
|
"mcu": "stm32f103rb",
|
||||||
"variant": "maple"
|
"variant": "maple"
|
||||||
},
|
},
|
||||||
"frameworks": ["arduino"],
|
"frameworks": ["arduino"],
|
||||||
"name": "Olimexino STM32 (Maple)",
|
"name": "Maple",
|
||||||
"upload": {
|
"upload": {
|
||||||
"disable_flushing": false,
|
"maximum_ram_size": 17408,
|
||||||
"maximum_ram_size": 17000,
|
"maximum_size": 110592,
|
||||||
"maximum_size": 108000,
|
|
||||||
"protocol": "dfu",
|
"protocol": "dfu",
|
||||||
"boot_version": 1,
|
"boot_version": 1,
|
||||||
"require_upload_port": true,
|
"require_upload_port": true
|
||||||
"use_1200bps_touch": false,
|
|
||||||
"wait_for_upload_port": false
|
|
||||||
},
|
},
|
||||||
"url": "https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/",
|
"url": "http://www.leaflabs.com/maple/",
|
||||||
"vendor": "Olimex"
|
"vendor": "LeafLabs"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"core": "maple",
|
||||||
|
"cpu": "cortex-m3",
|
||||||
|
"extra_flags": "-DARDUINO_MAPLE_MINI -DMCU_STM32F103CB",
|
||||||
|
"f_cpu": "72000000L",
|
||||||
|
"hwids": [
|
||||||
|
["0x1EAF", "0x0003"],
|
||||||
|
["0x1EAF", "0x0004"]
|
||||||
|
],
|
||||||
|
"ldscript": "flash.ld",
|
||||||
|
"mcu": "stm32f103cb",
|
||||||
|
"variant": "maple_mini"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino"],
|
||||||
|
"name": "Maple Mini Bootloader 2.0",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 20480,
|
||||||
|
"maximum_size": 122880,
|
||||||
|
"protocol": "dfu",
|
||||||
|
"boot_version": 2,
|
||||||
|
"require_upload_port": true
|
||||||
|
},
|
||||||
|
"url": "http://www.leaflabs.com/maple/",
|
||||||
|
"vendor": "LeafLabs"
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"core": "maple",
|
||||||
|
"cpu": "cortex-m3",
|
||||||
|
"extra_flags": "-DARDUINO_MAPLE_MINI -DMCU_STM32F103CB",
|
||||||
|
"f_cpu": "72000000L",
|
||||||
|
"hwids": [
|
||||||
|
["0x1EAF", "0x0003"],
|
||||||
|
["0x1EAF", "0x0004"]
|
||||||
|
],
|
||||||
|
"ldscript": "flash.ld",
|
||||||
|
"mcu": "stm32f103cb",
|
||||||
|
"variant": "maple_mini"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino"],
|
||||||
|
"name": "Maple Mini Original",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 17408,
|
||||||
|
"maximum_size": 110592,
|
||||||
|
"protocol": "dfu",
|
||||||
|
"boot_version": 1,
|
||||||
|
"require_upload_port": true
|
||||||
|
},
|
||||||
|
"url": "http://www.leaflabs.com/maple/",
|
||||||
|
"vendor": "LeafLabs"
|
||||||
|
}
|
|
@ -77,19 +77,18 @@ for item in ("-nostartfiles", "-nostdlib"):
|
||||||
if item in env['LINKFLAGS']:
|
if item in env['LINKFLAGS']:
|
||||||
env['LINKFLAGS'].remove(item)
|
env['LINKFLAGS'].remove(item)
|
||||||
|
|
||||||
ld = board.get("build.ldscript")
|
|
||||||
|
|
||||||
if env.subst("$UPLOAD_PROTOCOL") == "dfu":
|
if env.subst("$UPLOAD_PROTOCOL") == "dfu":
|
||||||
if "stm32f103c" in board.get("build.mcu", ""):
|
if board.id in ("maple", "maple_mini_origin"):
|
||||||
ld = "bootloader_20.ld"
|
|
||||||
elif "stm32f103r" in board.get("build.mcu", ""):
|
|
||||||
ld = "bootloader.ld"
|
|
||||||
if "stm32f103rb_maple" in board.get("build.mcu", ""):
|
|
||||||
env.Append(CPPDEFINES=["VECT_TAB_ADDR=0x8005000", "SERIAL_USB"])
|
env.Append(CPPDEFINES=["VECT_TAB_ADDR=0x8005000", "SERIAL_USB"])
|
||||||
else:
|
else:
|
||||||
env.Append(CPPDEFINES=[
|
env.Append(CPPDEFINES=[
|
||||||
"VECT_TAB_ADDR=0x8002000", "SERIAL_USB", "GENERIC_BOOTLOADER"])
|
"VECT_TAB_ADDR=0x8002000", "SERIAL_USB", "GENERIC_BOOTLOADER"])
|
||||||
env.Replace(LDSCRIPT_PATH=ld)
|
|
||||||
|
if "stm32f103r" in board.get("build.mcu", ""):
|
||||||
|
env.Replace(LDSCRIPT_PATH="bootloader.ld")
|
||||||
|
elif board.get("upload.boot_version", 0) == 2:
|
||||||
|
env.Replace(LDSCRIPT_PATH="bootloader_20.ld")
|
||||||
else:
|
else:
|
||||||
env.Append(CPPDEFINES=["VECT_TAB_ADDR=0x8000000"])
|
env.Append(CPPDEFINES=["VECT_TAB_ADDR=0x8000000"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue