Compare commits

..

29 Commits

Author SHA1 Message Date
Ivan Kravets
50f9186682 Merge branch 'release/v2.10.3' 2016-06-15 18:46:56 +03:00
Ivan Kravets
2cd22f725e Version bump to 2.10.3 2016-06-15 18:46:41 +03:00
Ivan Kravets
1cab0c168e Fix issue with appending PIO version to Build Defines 2016-06-15 18:42:56 +03:00
Ivan Kravets
5dac4e3af6 Add test for init --ide eclipse 2016-06-15 18:42:25 +03:00
Ivan Kravets
09032fb4a5 Merge branch 'release/v2.10.2' 2016-06-15 17:57:39 +03:00
Ivan Kravets
48a8086519 Merge branch 'release/v2.10.2' into develop 2016-06-15 17:57:39 +03:00
Ivan Kravets
c62a3f8ee6 Version bump to 2.10.2 (issues #695) 2016-06-15 17:57:28 +03:00
Ivan Kravets
682e435ded Fix firmware uploading to Arduino/Genuino 101 // Resolve #695 2016-06-15 16:02:04 +03:00
Ivan Kravets
cdcf075635 Use $PLATFORM from build environment instead from the board config 2016-06-15 14:56:31 +03:00
Ivan Kravets
7e027db02b Update Intel ARC32 Arduino framework to v1.0.6 // Issue #695 2016-06-15 14:52:11 +03:00
Ivan Kravets
4abaa67580 Update Intel ARC32 Arduino framework to v1.0.6 2016-06-15 14:48:46 +03:00
Ivan Kravets
13d43425e5 Add support for ST Nucleo L031K6 board to ARM mbed framework 2016-06-15 14:48:27 +03:00
Valeriy Koval
0ba315243b Revert mcu option for genuino101 2016-06-15 14:45:08 +03:00
Valeriy Koval
9655ca229f Update intel_arc32 platform 2016-06-15 14:31:07 +03:00
Ivan Kravets
b842a1d9b1 Update HISTORY.rst 2016-06-15 13:18:29 +03:00
Ivan Kravets
2978133862 Fix upload size checker 2016-06-15 00:59:44 +03:00
Ivan Kravets
7422b99b42 Process "$BUILD_UNFLAGS" variable 2016-06-14 20:53:30 +03:00
Ivan Kravets
d04a7de26b Restore PIO macros if it was deleted by framework 2016-06-14 20:48:56 +03:00
Ivan Kravets
68d834fba0 Add support for ST Nucleo L031K6 board to ARM mbed framework 2016-06-14 19:59:17 +03:00
Ivan Kravets
64c9004036 Fix typo 2016-06-14 19:54:27 +03:00
Valeriy Koval
350fb885b8 Fix pylint error 2016-06-14 19:44:57 +03:00
Ivan Kravets
8d03f2dc80 Update history 2016-06-14 19:41:34 +03:00
Valeriy Koval
220dcd0f5c Improve linker flags handling for mbed 2016-06-14 19:29:54 +03:00
Ivan Kravets
3671d7549d Update examples 2016-06-14 18:08:35 +03:00
Valeriy Koval
a38910b381 Improve include selection for mbed boards with a custom vendor 2016-06-14 13:00:51 +03:00
Ivan Kravets
941b8e84f5 Merge branch 'release/v2.10.1' 2016-06-13 21:32:07 +03:00
Ivan Kravets
382c860d9b Merge branch 'release/v2.10.1' into develop 2016-06-13 21:32:07 +03:00
Ivan Kravets
3dd51a442d Re-submit a package to PyPI 2016-06-13 21:31:17 +03:00
Ivan Kravets
2b6ba32b2c Merge branch 'release/v2.10.0' into develop 2016-06-13 19:49:55 +03:00
12 changed files with 111 additions and 26 deletions

View File

@@ -4,6 +4,29 @@ Release Notes
PlatformIO 2.0
--------------
2.10.3 (2016-06-15)
~~~~~~~~~~~~~~~~~~~
* Fixed issue with ``platformio init --ide`` command
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)
~~~~~~~~~~~~~~~~~~~
* Re-submit a package to PyPI
2.10.0 (2016-06-13)
~~~~~~~~~~~~~~~~~~~

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -14,7 +14,7 @@
import sys
VERSION = (2, 10, 0)
VERSION = (2, 10, 3)
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@@ -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"
}
}

View File

@@ -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"):

View File

@@ -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)
#

View File

@@ -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

View File

@@ -35,10 +35,15 @@ 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():
if any(["PLATFORMIO=" in str(d) for d in env.get("CPPDEFINES", [])]):
return
env.Append(
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 +65,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")

View File

@@ -42,6 +42,14 @@ def test_init_ext_folder(platformio_setup, clirunner, validate_cliresult):
validate_pioproject(join(getcwd(), ext_folder_name))
def test_init_ide_eclipse(platformio_setup, clirunner, validate_cliresult):
with clirunner.isolated_filesystem():
result = clirunner.invoke(cli, ["-b", "uno", "--ide", "eclipse"])
validate_cliresult(result)
validate_pioproject(getcwd())
assert all([isfile(f) for f in (".cproject", ".project")])
def test_init_special_board(platformio_setup, clirunner, validate_cliresult):
with clirunner.isolated_filesystem():
result = clirunner.invoke(cli, ["-b", "uno"])