mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Merge branch 'release/v2.10.2'
This commit is contained in:
13
HISTORY.rst
13
HISTORY.rst
@ -4,6 +4,19 @@ Release Notes
|
||||
PlatformIO 2.0
|
||||
--------------
|
||||
|
||||
2.10.2 (2016-06-15)
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Added support for ST Nucleo L031K6 board to ARM mbed framework
|
||||
* Process ``build_unflags`` option for ARM mbed framework
|
||||
* Updated Intel ARC32 Arduino framework to v1.0.6
|
||||
(`issue #695 <https://github.com/platformio/platformio/issues/695>`_)
|
||||
* Improved a check of program size before uploading to the board
|
||||
* Fixed issue with ARM mbed framework ``-u _printf_float`` and
|
||||
``-u _scanf_float`` when parsing ``$LINKFLAGS``
|
||||
* Fixed issue with ARM mbed framework and extra includes for the custom boards,
|
||||
such as Seeeduino Arch Pro
|
||||
|
||||
2.10.1 (2016-06-13)
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -629,6 +629,13 @@ ST
|
||||
- 512 Kb
|
||||
- 128 Kb
|
||||
|
||||
* - ``nucleo_l031k6``
|
||||
- `ST Nucleo L031K6 <https://developer.mbed.org/platforms/ST-Nucleo-L031K6/>`_
|
||||
- STM32L031K6T6
|
||||
- 32 MHz
|
||||
- 32 Kb
|
||||
- 8 Kb
|
||||
|
||||
* - ``nucleo_l053r8``
|
||||
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
||||
- STM32L053R8T6
|
||||
|
@ -2013,6 +2013,13 @@ ST
|
||||
- 512 Kb
|
||||
- 128 Kb
|
||||
|
||||
* - ``nucleo_l031k6``
|
||||
- `ST Nucleo L031K6 <https://developer.mbed.org/platforms/ST-Nucleo-L031K6/>`_
|
||||
- STM32L031K6T6
|
||||
- 32 MHz
|
||||
- 32 Kb
|
||||
- 8 Kb
|
||||
|
||||
* - ``nucleo_l053r8``
|
||||
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
||||
- STM32L053R8T6
|
||||
|
@ -357,6 +357,13 @@ ST
|
||||
- 512 Kb
|
||||
- 128 Kb
|
||||
|
||||
* - ``nucleo_l031k6``
|
||||
- `ST Nucleo L031K6 <https://developer.mbed.org/platforms/ST-Nucleo-L031K6/>`_
|
||||
- STM32L031K6T6
|
||||
- 32 MHz
|
||||
- 32 Kb
|
||||
- 8 Kb
|
||||
|
||||
* - ``nucleo_l053r8``
|
||||
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
||||
- STM32L053R8T6
|
||||
|
2
examples
2
examples
Submodule examples updated: a5498135ba...ed668f6e31
@ -14,7 +14,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
VERSION = (2, 10, 1)
|
||||
VERSION = (2, 10, 2)
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@ -6,6 +6,7 @@
|
||||
"f_cpu": "32000000L",
|
||||
"ldscript": "flash.ld",
|
||||
"mcu": "ARCv2EM",
|
||||
"cpu": "quarkse_em",
|
||||
"usb_product": "Genuino 101",
|
||||
"variant": "arduino_101",
|
||||
"hwids": [
|
||||
@ -17,11 +18,13 @@
|
||||
"platform": "intel_arc32",
|
||||
"upload": {
|
||||
"maximum_ram_size": 81920,
|
||||
"maximum_size": 196608,
|
||||
"maximum_size": 155648,
|
||||
"protocol": "script",
|
||||
"require_upload_port" : true
|
||||
"require_upload_port" : true,
|
||||
"use_1200bps_touch": true
|
||||
},
|
||||
"url": "https://www.arduino.cc/en/Main/ArduinoBoard101",
|
||||
"vendor": "Intel"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,18 +145,23 @@ def add_mbedlib(libname, libar):
|
||||
"lwip-sys"
|
||||
)
|
||||
|
||||
target_map = {
|
||||
"nxplpc": "NXP",
|
||||
"freescalekinetis": "Freescale",
|
||||
"ststm32": "STM"
|
||||
}
|
||||
|
||||
target_includes = (
|
||||
"TARGET_%s" % target_map.get(env.subst("$PLATFORM"), ""),
|
||||
"TARGET_%s" % variant,
|
||||
"TARGET_CORTEX_M"
|
||||
)
|
||||
|
||||
for root, _, files in walk(lib_dir):
|
||||
if (not any(f.endswith(".h") for f in files) and
|
||||
basename(root) not in sysincdirs):
|
||||
continue
|
||||
|
||||
target_includes = (
|
||||
"TARGET_%s" % env.get(
|
||||
"BOARD_OPTIONS", {}).get("vendor", "").upper(),
|
||||
"TARGET_%s" % variant,
|
||||
"TARGET_CORTEX_M"
|
||||
)
|
||||
|
||||
if "TARGET_" in root:
|
||||
if all([p not in root.upper() for p in target_includes]):
|
||||
continue
|
||||
@ -195,6 +200,11 @@ def parse_eix_file(filename):
|
||||
result[key].append(
|
||||
node.get(_nkeys[0]) if len(_nkeys) == 1 else node.attrib)
|
||||
|
||||
if "LINKFLAGS" in result:
|
||||
for i, flag in enumerate(result["LINKFLAGS"]):
|
||||
if flag.startswith("-u "):
|
||||
result["LINKFLAGS"][i] = result["LINKFLAGS"][i].split(" ")
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@ -211,7 +221,7 @@ def get_build_flags(data):
|
||||
|
||||
def _mbed_whole_archive_hook(libs_):
|
||||
if (not isinstance(libs_, list) or
|
||||
env.get("BOARD_OPTIONS", {}).get("platform") == "nordicnrf51"):
|
||||
env.subst("$PLATFORM") == "nordicnrf51"):
|
||||
return libs_
|
||||
|
||||
_dynlibs = []
|
||||
@ -255,9 +265,12 @@ env.Replace(
|
||||
|
||||
# restore external build flags
|
||||
env.ProcessFlags([
|
||||
env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags"),
|
||||
env.get("BUILD_FLAGS")
|
||||
env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags")
|
||||
])
|
||||
# remove base flags
|
||||
env.ProcessUnFlags(env.get("BUILD_UNFLAGS"))
|
||||
# apply user flags
|
||||
env.ProcessFlags([env.get("BUILD_FLAGS")])
|
||||
|
||||
# Hook for K64F and K22F
|
||||
if board_type in ("frdm_k22f", "frdm_k64f"):
|
||||
|
@ -23,6 +23,14 @@ from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
|
||||
|
||||
env = DefaultEnvironment()
|
||||
|
||||
|
||||
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
||||
|
||||
if env.get("BOARD_OPTIONS", {}).get("upload", {}).get(
|
||||
"use_1200bps_touch", False):
|
||||
env.TouchSerialPort("$UPLOAD_PORT", 1200)
|
||||
|
||||
|
||||
env.Replace(
|
||||
AR="arc-elf32-ar",
|
||||
AS="arc-elf32-as",
|
||||
@ -42,9 +50,8 @@ env.Replace(
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-Wall",
|
||||
"-mav2em",
|
||||
"-mlittle-endian",
|
||||
"-m${BOARD_OPTIONS['build']['mcu']}",
|
||||
"-mcpu=${BOARD_OPTIONS['build']['cpu']}",
|
||||
"-fno-reorder-functions",
|
||||
"-fno-asynchronous-unwind-tables",
|
||||
"-fno-omit-frame-pointer",
|
||||
@ -82,7 +89,7 @@ env.Replace(
|
||||
"-Wl,--gc-sections",
|
||||
"-Wl,-X",
|
||||
"-Wl,-N",
|
||||
"-Wl,-m${BOARD_OPTIONS['build']['mcu']}",
|
||||
"-Wl,-mcpu=${BOARD_OPTIONS['build']['cpu']}",
|
||||
"-Wl,-marcelf",
|
||||
"-static",
|
||||
"-nostdlib",
|
||||
@ -93,7 +100,7 @@ env.Replace(
|
||||
"-Wl,--no-whole-archive"
|
||||
],
|
||||
|
||||
LIBS=["c", "m", "gcc"],
|
||||
LIBS=["nsim", "c", "m", "gcc"],
|
||||
|
||||
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES',
|
||||
|
||||
@ -179,7 +186,7 @@ AlwaysBuild(target_size)
|
||||
#
|
||||
|
||||
upload = env.Alias(["upload", "uploadlazy"], target_firm,
|
||||
[env.AutodetectUploadPort, "$UPLOADCMD"])
|
||||
[env.AutodetectUploadPort, BeforeUpload, "$UPLOADCMD"])
|
||||
AlwaysBuild(upload)
|
||||
|
||||
#
|
||||
|
@ -37,13 +37,15 @@ def FlushSerialBuffer(env, port):
|
||||
|
||||
|
||||
def TouchSerialPort(env, port, baudrate):
|
||||
port = env.subst(port)
|
||||
print "Forcing reset using %dbps open/close on port %s" % (baudrate, port)
|
||||
if system() != "Windows":
|
||||
try:
|
||||
s = Serial(env.subst(port))
|
||||
s = Serial(port)
|
||||
s.close()
|
||||
except: # pylint: disable=W0702
|
||||
pass
|
||||
s = Serial(port=env.subst(port), baudrate=baudrate)
|
||||
s = Serial(port=port, baudrate=baudrate)
|
||||
s.setDTR(False)
|
||||
s.close()
|
||||
sleep(0.4)
|
||||
@ -155,7 +157,7 @@ def CheckUploadSize(_, target, source, env): # pylint: disable=W0613,W0621
|
||||
print "Check program size..."
|
||||
sysenv = environ.copy()
|
||||
sysenv['PATH'] = str(env['ENV']['PATH'])
|
||||
cmd = [env.subst("$SIZETOOL"), "-B", str(source[0])]
|
||||
cmd = [env.subst("$SIZETOOL"), "-B", str(target[0])]
|
||||
result = util.exec_command(cmd, env=sysenv)
|
||||
if result['returncode'] != 0:
|
||||
return
|
||||
|
@ -35,10 +35,13 @@ SRC_DEFAULT_FILTER = " ".join([
|
||||
|
||||
def BuildProgram(env):
|
||||
|
||||
env.Append(
|
||||
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
||||
*pioversion_to_intstr())],
|
||||
)
|
||||
def _append_pio_macros():
|
||||
env.AppendUnique(
|
||||
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
||||
*pioversion_to_intstr())],
|
||||
)
|
||||
|
||||
_append_pio_macros()
|
||||
|
||||
# fix ASM handling under non-casitive OS
|
||||
if not case_sensitive_suffixes(".s", ".S"):
|
||||
@ -60,6 +63,9 @@ def BuildProgram(env):
|
||||
env.BuildFrameworks([
|
||||
f.lower().strip() for f in env.get("FRAMEWORK", "").split(",")])
|
||||
|
||||
# restore PIO macros if it was deleted by framework
|
||||
_append_pio_macros()
|
||||
|
||||
# build dependent libs
|
||||
deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR")
|
||||
|
||||
|
Reference in New Issue
Block a user