From c9616ed0fab723fab69a4351a707e6390f1c54eb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Jan 2016 17:25:31 +0200 Subject: [PATCH 1/5] Exclude only "test" and "tests" folders from build process --- HISTORY.rst | 5 +++++ platformio/__init__.py | 2 +- platformio/builder/tools/platformio.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index ffc9b7f0..421ee665 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,11 @@ Release Notes PlatformIO 2.0 -------------- +2.8.2 (2016-01-??) +~~~~~~~~~~~~~~~~~~ + +* Exclude only ``test`` and ``tests`` folders from build process + 2.8.1 (2016-01-29) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 94a227fb..bfaec0e2 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 8, 1) +VERSION = (2, 8, "2.dev0") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index b1401944..423e31aa 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -28,7 +28,7 @@ SRC_BUILD_EXT = ["c", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"] SRC_HEADER_EXT = ["h", "hpp"] SRC_DEFAULT_FILTER = " ".join([ "+<*>", "-<.git%s>" % sep, "-" % sep, "-" % sep, - "-" % sep + "-" % sep, "-" % sep ]) From 9102a70e0424786d2c9ba6ee29f8ddfc28e8f155 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Jan 2016 17:52:54 +0200 Subject: [PATCH 2/5] More strictness to default src filter for builder --- docs/projectconf.rst | 7 ++++--- platformio/builder/tools/platformio.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/projectconf.rst b/docs/projectconf.rst index d026b33c..93aeabc4 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -205,7 +205,7 @@ format of this option is ``C-like long integer`` value with ``L`` suffix. The 1 Hertz is equal to ``1L``, then 16 Mhz (Mega Hertz) is equal to ``16000000L``. The full list of ``board_f_cpu`` for the popular embedded platforms you can -find in *Boards* section of :ref:`platforms`. See "Frequency" column. You can +find in *Boards* section of :ref:`platforms`. See "Frequency" column. You can overclock a board by specifying a ``board_f_cpu`` value other than the default. @@ -335,8 +335,9 @@ be applied in theirs order. `GLOB Patterns `_ are allowed. By default, ``src_filter`` is predefined to -``+<*> -<.git/> - -``, which means "includes ALL files, then -exclude ``.git`` and ``svn`` repository folders and exclude ``examples`` folder. +``+<*> -<.git/> - - - - -``, +which means "includes ALL files, then +exclude ``.git`` and ``svn`` repository folders, ``example`` ... folder. This option can be set by global environment variable :envvar:`PLATFORMIO_SRC_FILTER`. diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 423e31aa..7ecfa34e 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -27,7 +27,8 @@ from platformio.util import pioversion_to_intstr SRC_BUILD_EXT = ["c", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"] SRC_HEADER_EXT = ["h", "hpp"] SRC_DEFAULT_FILTER = " ".join([ - "+<*>", "-<.git%s>" % sep, "-" % sep, "-" % sep, + "+<*>", "-<.git%s>" % sep, "-" % sep, + "-" % sep, "-" % sep, "-" % sep, "-" % sep ]) From c036bde86cbd28e75a6fae5707930b74a16bc744 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Jan 2016 17:55:48 +0200 Subject: [PATCH 3/5] Reverted ``-Wl,-whole-archive`` hook for ST STM32 and mbed --- HISTORY.rst | 1 + platformio/builder/scripts/frameworks/mbed.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 421ee665..50e008aa 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,7 @@ PlatformIO 2.0 ~~~~~~~~~~~~~~~~~~ * Exclude only ``test`` and ``tests`` folders from build process +* Reverted ``-Wl,-whole-archive`` hook for ST STM32 and mbed 2.8.1 (2016-01-29) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 76903afd..84465d4a 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -195,6 +195,20 @@ def get_build_flags(data): return flags +def _mbed_whole_archive_hook(flags): + if (not isinstance(flags, list) or + env.get("BOARD_OPTIONS", {}).get("platform") != "ststm32"): + return flags + + for pos, flag in enumerate(flags[:]): + if isinstance(flag, basestring): + continue + flags.insert(pos, "-Wl,-whole-archive") + flags.insert(pos + 2, "-Wl,-no-whole-archive") + + return flags + + board_type = env.subst("$BOARD") variant = MBED_VARIANTS[ board_type] if board_type in MBED_VARIANTS else board_type.upper() @@ -205,6 +219,8 @@ build_flags = get_build_flags(eixdata) variant_dir = join("$PLATFORMFW_DIR", "variant", variant) env.Replace( + _mbed_whole_archive_hook=_mbed_whole_archive_hook, + _LIBFLAGS="${_mbed_whole_archive_hook(%s)}" % env.get("_LIBFLAGS")[2:-1], CPPFLAGS=build_flags.get("CPPFLAGS", []), CFLAGS=build_flags.get("CFLAGS", []), CXXFLAGS=build_flags.get("CXXFLAGS", []), From 131f1eb94333c123ed3e69f9e1c26653bdd16927 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Jan 2016 18:17:33 +0200 Subject: [PATCH 4/5] Correct RAM size for NXP LPC1768 based boards // Resolve #484 --- HISTORY.rst | 2 ++ platformio/boards/nxplpc.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 50e008aa..15cd39fd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,8 @@ PlatformIO 2.0 2.8.2 (2016-01-??) ~~~~~~~~~~~~~~~~~~ +* Corrected RAM size for NXP LPC1768 based boards + (`issue #484 `_) * Exclude only ``test`` and ``tests`` folders from build process * Reverted ``-Wl,-whole-archive`` hook for ST STM32 and mbed diff --git a/platformio/boards/nxplpc.json b/platformio/boards/nxplpc.json index f85f5302..de29b022 100644 --- a/platformio/boards/nxplpc.json +++ b/platformio/boards/nxplpc.json @@ -9,7 +9,7 @@ "name": "NXP mbed LPC1768", "platform": "nxplpc", "upload": { - "maximum_ram_size": 32768, + "maximum_ram_size": 65536, "maximum_size": 524288 }, "url": "http://developer.mbed.org/platforms/mbed-LPC1768/", @@ -105,7 +105,7 @@ "name": "u-blox C027", "platform": "nxplpc", "upload": { - "maximum_ram_size": 32768, + "maximum_ram_size": 65536, "maximum_size": 524288 }, "url": "https://developer.mbed.org/platforms/u-blox-C027/", From 8a269b1d24442a74c2e2e0c8188854212502fdcf Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Jan 2016 20:34:25 +0200 Subject: [PATCH 5/5] Version bump to 2.8.2 (issues #484) --- HISTORY.rst | 2 +- platformio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 15cd39fd..2c41f427 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release Notes PlatformIO 2.0 -------------- -2.8.2 (2016-01-??) +2.8.2 (2016-01-29) ~~~~~~~~~~~~~~~~~~ * Corrected RAM size for NXP LPC1768 based boards diff --git a/platformio/__init__.py b/platformio/__init__.py index bfaec0e2..234572c2 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 8, "2.dev0") +VERSION = (2, 8, 2) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"