From df4560412d8334a22c119c87b60259f7ffa9a5c8 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 8 Sep 2016 13:50:45 +0300 Subject: [PATCH 01/52] Disable SSL Server-Name-Indication for Python < 2.7.9 --- HISTORY.rst | 5 +++++ platformio/__init__.py | 2 +- platformio/app.py | 3 ++- platformio/managers/lib.py | 6 +++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4b679f84..f1f50e0b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,11 @@ Release Notes PlatformIO 3.0 -------------- +3.0.2 (2016-09-??) +~~~~~~~~~~~~~~~~~~ + +* Disable SSL Server-Name-Indication for Python < 2.7.9 + 3.0.1 (2016-09-08) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 912874a0..38506192 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 0, 1) +VERSION = (3, 0, "2a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/app.py b/platformio/app.py index 1ca78ed6..6ca23013 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -14,6 +14,7 @@ import hashlib import json +import sys import uuid from copy import deepcopy from os import environ, getenv @@ -52,7 +53,7 @@ DEFAULT_SETTINGS = { }, "disable_ssl": { "description": "Disable SSL for PlatformIO services", - "value": True + "value": sys.version_info < (2, 7, 9) }, "enable_telemetry": { "description": diff --git a/platformio/managers/lib.py b/platformio/managers/lib.py index 2f8e6ad3..e441aaf3 100644 --- a/platformio/managers/lib.py +++ b/platformio/managers/lib.py @@ -20,7 +20,7 @@ from os.path import dirname, join import click import semantic_version -from platformio import commands, exception, util +from platformio import app, commands, exception, util from platformio.managers.package import BasePkgManager @@ -199,8 +199,8 @@ class LibraryManager(BasePkgManager): pkg_dir = None try: pkg_dir = self._install_from_url( - name, dl_data['url'].replace("http://", "https://"), - requirements) + name, dl_data['url'] if app.get_setting("disable_ssl") else + dl_data['url'].replace("http://", "https://"), requirements) except exception.APIRequestError: pkg_dir = self._install_from_url(name, dl_data['url'], requirements) From 80d74c608d6ab8b1ab54adeb8ae1ec929e9fb9f3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 8 Sep 2016 16:17:58 +0300 Subject: [PATCH 02/52] Return valid exit code from ``plaformio test`` command --- HISTORY.rst | 1 + platformio/pioplus.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f1f50e0b..b0b8d55a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,7 @@ PlatformIO 3.0 ~~~~~~~~~~~~~~~~~~ * Disable SSL Server-Name-Indication for Python < 2.7.9 +* Return valid exit code from ``plaformio test`` command 3.0.1 (2016-09-08) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/pioplus.py b/platformio/pioplus.py index edfc1166..3fe18eba 100644 --- a/platformio/pioplus.py +++ b/platformio/pioplus.py @@ -17,7 +17,7 @@ import subprocess from os.path import dirname, join from platform import system -from platformio import util +from platformio import exception, util from platformio.managers.package import PackageManager PACKAGE_PIOPLUS_NAME = "tool-pioplus" @@ -54,4 +54,5 @@ def pioplus_call(args, **kwargs): os.environ['LD_LIBRARY_PATH'] = dirname(pioplus_path) os.environ['PYTHONEXEPATH'] = util.get_pythonexe_path() util.copy_pythonpath_to_osenv() - subprocess.call([pioplus_path] + args, **kwargs) + if subprocess.call([pioplus_path] + args, **kwargs) != 0: + raise exception.ReturnErrorCode() From 160ae3fb604454650c8b4e8c0856dcde7ca94ae0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 8 Sep 2016 21:39:30 +0300 Subject: [PATCH 03/52] Add support for SparkFun Blynk Board --- HISTORY.rst | 4 ++++ docs/frameworks/arduino.rst | 7 +++++++ docs/platforms/embedded_boards.rst | 7 +++++++ docs/platforms/espressif8266.rst | 7 +++++++ examples | 2 +- 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index b0b8d55a..5c95a239 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,6 +10,10 @@ PlatformIO 3.0 * Disable SSL Server-Name-Indication for Python < 2.7.9 * Return valid exit code from ``plaformio test`` command +* Development platform `Espressif 8266 `__ + + + Add support for `SparkFun Blynk Board `_ + 3.0.1 (2016-09-08) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index d53926b3..611760c9 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -1590,6 +1590,13 @@ SparkFun - Flash - RAM + * - ``sparkfunBlynk`` + - `SparkFun Blynk Board `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + * - ``sparkfun_digitalsandbox`` - `SparkFun Digital Sandbox `_ - ATMEGA328P diff --git a/docs/platforms/embedded_boards.rst b/docs/platforms/embedded_boards.rst index 8353ed67..7c41f96d 100644 --- a/docs/platforms/embedded_boards.rst +++ b/docs/platforms/embedded_boards.rst @@ -2369,6 +2369,13 @@ SparkFun - Flash - RAM + * - ``sparkfunBlynk`` + - `SparkFun Blynk Board `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + * - ``sparkfun_digitalsandbox`` - `SparkFun Digital Sandbox `_ - ATMEGA328P diff --git a/docs/platforms/espressif8266.rst b/docs/platforms/espressif8266.rst index 8530ea18..3aaaa249 100644 --- a/docs/platforms/espressif8266.rst +++ b/docs/platforms/espressif8266.rst @@ -305,6 +305,13 @@ SparkFun - Flash - RAM + * - ``sparkfunBlynk`` + - `SparkFun Blynk Board `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + * - ``thing`` - `SparkFun ESP8266 Thing `_ - ESP8266 diff --git a/examples b/examples index 06275d78..98642d85 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 06275d78d16cf1c30ce26b71f387acf77408efe9 +Subproject commit 98642d857e4e34777b871041b69a3daa5cf926a6 From f186ad30c1f3642894e7111e36e2436417fe6744 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 9 Sep 2016 18:08:18 +0300 Subject: [PATCH 04/52] Notify about `version` field when creating library --- docs/librarymanager/config.rst | 2 +- docs/librarymanager/creating.rst | 55 ++++++++++++++++++++++++-------- docs/quickstart.rst | 2 +- docs/userguide/cmd_init.rst | 2 +- platformio/exception.py | 2 +- 5 files changed, 46 insertions(+), 17 deletions(-) diff --git a/docs/librarymanager/config.rst b/docs/librarymanager/config.rst index 67a5e6bb..a3a2edc1 100644 --- a/docs/librarymanager/config.rst +++ b/docs/librarymanager/config.rst @@ -196,7 +196,7 @@ dash. `Semantic Versioning `_ IS RECOMMENDED. field is defined. |PIOAPICR| will use the - `CVS `_ revision from + `VCS `_ revision from the latest commit as "current version". For example, ``13`` (*SVN*) or first 10 chars of *SHA* digest ``e4564b7da4`` (*Git*). If :ref:`libjson_repository` ``branch`` is not specified, then default branch will be used. diff --git a/docs/librarymanager/creating.rst b/docs/librarymanager/creating.rst index 8bdbf5b9..16051a8d 100644 --- a/docs/librarymanager/creating.rst +++ b/docs/librarymanager/creating.rst @@ -44,34 +44,63 @@ If a library source code is located at `GitHub `_, then you **need to specify** only these fields in the :ref:`library_config`: * :ref:`libjson_name` +* :ref:`libjson_version` (is not required, but highly recommended for new :ref:`librarymanager`) * :ref:`libjson_keywords` * :ref:`libjson_description` * :ref:`libjson_repository` -|PIOAPICR| will populate the rest fields, like :ref:`libjson_version` or -:ref:`libjson_authors` with an actual information from *GitHub*. +|PIOAPICR| will populate the rest fields, like :ref:`libjson_authors` with an +actual information from *GitHub*. -Example: +Example, `DallasTemperature `_: .. code-block:: javascript { - "name": "IRremote", - "keywords": "infrared, ir, remote", - "description": "Send and receive infrared signals with multiple protocols", - "repository": + "name": "DallasTemperature", + "keywords": "onewire, 1-wire, bus, sensor, temperature", + "description": "Arduino Library for Dallas Temperature ICs (DS18B20, DS18S20, DS1822, DS1820)", + "repository": + { + "type": "git", + "url": "https://github.com/milesburton/Arduino-Temperature-Control-Library.git" + }, + "authors": + [ { - "type": "git", - "url": "https://github.com/shirriff/Arduino-IRremote.git" + "name": "Miles Burton", + "email": "miles@mnetcs.com", + "url": "http://www.milesburton.com", + "maintainer": true }, - "frameworks": "arduino", - "platforms": "atmelavr" + { + "name": "Tim Newsome", + "email": "nuisance@casualhacker.net" + }, + { + "name": "Guil Barros", + "email": "gfbarros@bappos.com" + }, + { + "name": "Rob Tillaart", + "email": "rob.tillaart@gmail.com" + } + ], + "dependencies": + { + "name": "OneWire", + "authors": "Paul Stoffregen", + "frameworks": "arduino" + }, + "version": "3.7.7", + "frameworks": "arduino", + "platforms": "*" } -Under CVS (SVN/GIT) +Under VCS (SVN/GIT) ^^^^^^^^^^^^^^^^^^^ -|PIOAPICR| can operate with a library source code that is under *CVS* control. +|PIOAPICR| can operate with a library source code that is under *VCS* control. The list of **required** fields in the :ref:`library_config` will look like: * :ref:`libjson_name` diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 83442cb9..a1859629 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -133,7 +133,7 @@ next structure: (``*.h, *.c, *.cpp, *.S, *.ino, etc.``) * ``lib`` directory can be used for the project specific (private) libraries. More details are located in ``lib/readme.txt`` file. -* Miscellaneous files for CVS and :ref:`ci` support. +* Miscellaneous files for VCS and :ref:`ci` support. .. note:: diff --git a/docs/userguide/cmd_init.rst b/docs/userguide/cmd_init.rst index a9dcb194..c3c4ab87 100644 --- a/docs/userguide/cmd_init.rst +++ b/docs/userguide/cmd_init.rst @@ -37,7 +37,7 @@ This command will create: (``*.h, *.c, *.cpp, *.S, *.ino, etc.``) * ``lib`` directory can be used for the project specific (private) libraries. More details are located in ``lib/readme.txt`` file. -* Miscellaneous files for CVS and :ref:`ci` support. +* Miscellaneous files for VCS and :ref:`ci` support. Options ------- diff --git a/platformio/exception.py b/platformio/exception.py index 5d8f3b76..62b96b40 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -50,7 +50,7 @@ class PlatformNotInstalledYet(PlatformioException): class BoardNotDefined(PlatformioException): - MESSAGE = "You need to specify board type using `-b` or `--board` "\ + MESSAGE = "You need to specify board ID using `-b` or `--board` "\ "option. Supported boards list is available via "\ " `platformio boards` command" From 39a787b0d1f3fdf7127cc314613ae45bcb85675d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 9 Sep 2016 18:26:38 +0300 Subject: [PATCH 05/52] Fix unit test --- examples | 2 +- tests/commands/test_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples b/examples index 98642d85..f3e8a007 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 98642d857e4e34777b871041b69a3daa5cf926a6 +Subproject commit f3e8a0070a21d9659afd2b19644507c0f2e9815c diff --git a/tests/commands/test_test.py b/tests/commands/test_test.py index 173f8113..c725c780 100644 --- a/tests/commands/test_test.py +++ b/tests/commands/test_test.py @@ -23,7 +23,7 @@ def test_local_env(): result = util.exec_command(["platformio", "test", "-d", join("examples", "unit-testing", "calculator"), "-e", "local"]) - if result['returncode'] != 0: + if result['returncode'] != 1: pytest.fail(result) assert all( [s in result['out'] for s in ("[PASSED]", "[IGNORED]", "[FAILED]")]) From a42cf4ebdd5ca972a36fe246b15d4e642605c709 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 9 Sep 2016 18:49:58 +0300 Subject: [PATCH 06/52] Fix incorrect line order when converting from INO to CPP and pointer is used --- platformio/builder/tools/piomisc.py | 4 +++- tests/ino2cpp/basic/basic.ino | 2 ++ tests/test_ino2cpp.py | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index c38258af..811a8860 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -146,6 +146,8 @@ class InoToCPPConverter(object): def _get_total_lines(self, contents): total = 0 + if contents.endswith("\n"): + contents = contents[:-1] for line in contents.split("\n")[::-1]: linenum = self._parse_preproc_line_num(line) if linenum is not None: @@ -164,7 +166,7 @@ class InoToCPPConverter(object): ("|".join(prototype_names)), contents[:split_pos], re.M) if match_ptrs: - split_pos = contents.rfind("\n", 0, match_ptrs.start()) + split_pos = contents.rfind("\n", 0, match_ptrs.start()) + 1 result = [] result.append(contents[:split_pos].strip()) diff --git a/tests/ino2cpp/basic/basic.ino b/tests/ino2cpp/basic/basic.ino index 6f764fed..b5bd7f2c 100644 --- a/tests/ino2cpp/basic/basic.ino +++ b/tests/ino2cpp/basic/basic.ino @@ -40,6 +40,8 @@ void myFunction(struct Item *item) { } +#warning "Line number is 43" + void fooCallback(){ } diff --git a/tests/test_ino2cpp.py b/tests/test_ino2cpp.py index c8f411c0..f3ecb018 100644 --- a/tests/test_ino2cpp.py +++ b/tests/test_ino2cpp.py @@ -42,6 +42,8 @@ def test_warning_line(clirunner, validate_cliresult): validate_cliresult(result) assert ('basic.ino:16:14: warning: #warning "Line number is 16"' in result.output) + assert ('basic.ino:43:2: warning: #warning "Line number is 43"' in + result.output) result = clirunner.invoke( cmd_ci, [join(INOTEST_DIR, "strmultilines"), "-b", "uno"]) validate_cliresult(result) From 4328d311a5f7faa60164b83fd7d9b6a1954b98a2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 9 Sep 2016 23:18:00 +0300 Subject: [PATCH 07/52] Remove obsolete defines --- examples | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples b/examples index f3e8a007..aa8c45e2 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit f3e8a0070a21d9659afd2b19644507c0f2e9815c +Subproject commit aa8c45e2dbf438829efe8ed269c26ea4e16a5073 From 2a9ba3821a4bb72c207ecf8a243d2894c2f540cb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 10 Sep 2016 16:39:27 +0300 Subject: [PATCH 08/52] Support PlatformIO Plus --- platformio/maintenance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index cb169092..6df212e1 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -191,9 +191,9 @@ def after_upgrade(ctx): "try", fg="cyan"), click.style( "http://platformio.org/platformio-ide", fg="cyan"))) if not util.is_ci(): - click.echo("- %s to keep PlatformIO alive! > %s" % (click.style( - "donate", fg="cyan"), click.style( - "http://platformio.org/donate", fg="cyan"))) + click.echo("- %s us with PlatformIO Plus > %s" % (click.style( + "support", fg="cyan"), click.style( + "https://pioplus.com", fg="cyan"))) click.echo("*" * terminal_width) click.echo("") From 78c86446cf02d629ae1eea85d09183d81b1e4fd1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 10 Sep 2016 17:27:47 +0300 Subject: [PATCH 09/52] Fix RegExp for line error --- platformio/managers/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 82e41b08..e1b50b57 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -223,7 +223,7 @@ class PlatformPackagesMixin(object): class PlatformRunMixin(object): - LINE_ERROR_RE = re.compile(r"(\s+error|error[:\s]+)", re.I) + LINE_ERROR_RE = re.compile(r"(^|\s+)error:?\s+", re.I) def run(self, variables, targets, silent, verbose): assert isinstance(variables, dict) From d9d5ee15fd0c812e73688600c2f61a9994dad1ee Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 10 Sep 2016 18:49:59 +0300 Subject: [PATCH 10/52] Fix default package configurator --- platformio/managers/platform.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index e1b50b57..817c4a0f 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -353,12 +353,6 @@ class PlatformBase(PlatformPackagesMixin, PlatformRunMixin): def packages(self): if "packages" not in self._manifest: self._manifest['packages'] = {} - if "tool-scons" not in self._manifest['packages']: - self._manifest['packages']['tool-scons'] = { - "version": self._manifest.get("engines", {}).get( - "scons", ">=2.3.0,<2.6.0"), - "optional": False - } return self._manifest['packages'] def get_dir(self): @@ -457,6 +451,12 @@ class PlatformBase(PlatformPackagesMixin, PlatformRunMixin): "version": "~1.20302.1", "optional": False } + if "tool-scons" not in self.packages: + self.packages['tool-scons'] = { + "version": self._manifest.get("engines", {}).get( + "scons", ">=2.3.0,<2.6.0"), + "optional": False + } class PlatformBoardConfig(object): From 1bd893409d592a5cbb3c339178259c6385f85e50 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 10 Sep 2016 18:58:18 +0300 Subject: [PATCH 11/52] Install empty dev platform in processing mode --- platformio/commands/run.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 1b4899da..fedf0225 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -258,7 +258,9 @@ class EnvironmentProcessor(object): p = PlatformFactory.newPlatform(self.options['platform']) except exception.UnknownPlatform: self.cmd_ctx.invoke( - cmd_platform_install, platforms=[self.options['platform']]) + cmd_platform_install, + platforms=[self.options['platform']], + skip_default_package=True) p = PlatformFactory.newPlatform(self.options['platform']) return p.run(build_vars, build_targets, self.silent, self.verbose) From 72a18125ee4e997ce02d5a703e9dd93a177da6f8 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 10 Sep 2016 19:07:24 +0300 Subject: [PATCH 12/52] Fix test --- tests/commands/test_platform.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/commands/test_platform.py b/tests/commands/test_platform.py index ec618a90..2c38e41d 100644 --- a/tests/commands/test_platform.py +++ b/tests/commands/test_platform.py @@ -83,8 +83,7 @@ def test_complex(clirunner, validate_cliresult): validate_cliresult(result) assert all([ s in result.output - for s in ("teensy", "Downloading", "Unpacking", - "tool-scons") + for s in ("teensy", "Downloading", "Unpacking") ]) # show platform information From 7d10041727c1bc8e34d29664ac8ffe0e52ce09c7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 10 Sep 2016 23:42:51 +0300 Subject: [PATCH 13/52] Fix test --- tests/commands/test_platform.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/commands/test_platform.py b/tests/commands/test_platform.py index 2c38e41d..63b593a7 100644 --- a/tests/commands/test_platform.py +++ b/tests/commands/test_platform.py @@ -70,9 +70,7 @@ def test_install_uknown_version(clirunner, validate_cliresult): def test_complex(clirunner, validate_cliresult): items = [ "teensy", - "https://github.com/platformio/platform-teensy/archive/develop.zip", - "https://github.com/platformio/platform-teensy.git", - "platformio/platform-teensy", + "https://github.com/platformio/platform-teensy/archive/develop.zip" ] for item in items: with clirunner.isolated_filesystem(): @@ -100,7 +98,7 @@ def test_complex(clirunner, validate_cliresult): assert isinstance(list_result, list) assert len(list_result) == 1 assert list_result[0]["name"] == "teensy" - assert list_result[0]["packages"] == ["tool-scons"] + assert list_result[0]["packages"] == [] # try to install again result = clirunner.invoke(cli_platform.platform_install, @@ -112,7 +110,7 @@ def test_complex(clirunner, validate_cliresult): result = clirunner.invoke(cli_platform.platform_update) validate_cliresult(result) assert "teensy" in result.output - assert "Up-to-date" in result.output + # assert "Up-to-date" in result.output # try to uninstall result = clirunner.invoke(cli_platform.platform_uninstall, From ac7743e217c36bd5660b4472a281c6ea976952e6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 12 Sep 2016 02:11:04 +0300 Subject: [PATCH 14/52] Rename setting DISABLE_SSL to ENABLE_DISABLE and set it to No by default --- docs/envvars.rst | 4 ++-- docs/userguide/cmd_settings.rst | 8 ++++---- platformio/__init__.py | 2 +- platformio/app.py | 7 +++---- platformio/managers/lib.py | 13 ++++--------- platformio/managers/platform.py | 2 +- platformio/util.py | 2 +- 7 files changed, 16 insertions(+), 22 deletions(-) diff --git a/docs/envvars.rst b/docs/envvars.rst index 7749e9ce..b66813ee 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -163,6 +163,6 @@ Allows to override setting :ref:`setting_enable_telemetry`. Allows to override setting :ref:`setting_force_verbose`. -.. envvar:: PLATFORMIO_SETTING_DISABLE_SSL +.. envvar:: PLATFORMIO_SETTING_ENABLE_SSL -Allows to override setting :ref:`setting_disable_ssl`. +Allows to override setting :ref:`setting_enable_ssl`. diff --git a/docs/userguide/cmd_settings.rst b/docs/userguide/cmd_settings.rst index 2605ed74..ab8440bf 100644 --- a/docs/userguide/cmd_settings.rst +++ b/docs/userguide/cmd_settings.rst @@ -87,15 +87,15 @@ Check for the new PlatformIO interval. Check for the platform updates interval. -.. _setting_disable_ssl: +.. _setting_enable_ssl: -``disable_ssl`` -^^^^^^^^^^^^^^^ +``enable_ssl`` +^^^^^^^^^^^^^^ :Default: No :Values: Yes/No -Disable SSL for PlatformIO API (NOT RECOMMENDED, INSECURE) +Enable SSL for PlatformIO Services .. _setting_force_verbose: diff --git a/platformio/__init__.py b/platformio/__init__.py index 38506192..fc10a320 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 0, "2a1") +VERSION = (3, 0, "2a2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/app.py b/platformio/app.py index 6ca23013..013c0745 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -14,7 +14,6 @@ import hashlib import json -import sys import uuid from copy import deepcopy from os import environ, getenv @@ -51,9 +50,9 @@ DEFAULT_SETTINGS = { "description": "Force verbose output when processing environments", "value": False }, - "disable_ssl": { - "description": "Disable SSL for PlatformIO services", - "value": sys.version_info < (2, 7, 9) + "enable_ssl": { + "description": "Enable SSL for PlatformIO Services", + "value": False }, "enable_telemetry": { "description": diff --git a/platformio/managers/lib.py b/platformio/managers/lib.py index e441aaf3..45ba61f2 100644 --- a/platformio/managers/lib.py +++ b/platformio/managers/lib.py @@ -196,15 +196,10 @@ class LibraryManager(BasePkgManager): dl_data = util.get_api_result( "/lib/download/" + str(name[3:]), dict(version=version)) assert dl_data - pkg_dir = None - try: - pkg_dir = self._install_from_url( - name, dl_data['url'] if app.get_setting("disable_ssl") else - dl_data['url'].replace("http://", "https://"), requirements) - except exception.APIRequestError: - pkg_dir = self._install_from_url(name, dl_data['url'], - requirements) - return pkg_dir + + return self._install_from_url( + name, dl_data['url'].replace("http://", "https://") + if app.get_setting("enable_ssl") else dl_data['url'], requirements) def install(self, # pylint: disable=too-many-arguments name, diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 817c4a0f..8e8e0329 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -31,7 +31,7 @@ class PlatformManager(BasePkgManager): if not repositories: repositories = [ "{0}://dl.platformio.org/platforms/manifest.json".format( - "http" if app.get_setting("disable_ssl") else "https") + "https" if app.get_setting("enable_ssl") else "http") ] BasePkgManager.__init__(self, package_dir or join(util.get_home_dir(), "platforms"), diff --git a/platformio/util.py b/platformio/util.py index faf6a6bf..69316d1f 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -382,7 +382,7 @@ def _get_api_result( headers = get_request_defheaders() url = __apiurl__ - if get_setting("disable_ssl"): + if not get_setting("enable_ssl"): url = url.replace("https://", "http://") try: From 96f7c7c0b03f5f86d69b937952aeec9070728919 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 12 Sep 2016 19:24:24 +0300 Subject: [PATCH 15/52] Add new article by Pedro Minatel --- docs/articles.rst | 1 + docs/platforms/espressif8266_extra.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/articles.rst b/docs/articles.rst index 294922c7..89a2318e 100644 --- a/docs/articles.rst +++ b/docs/articles.rst @@ -23,6 +23,7 @@ Here are recent articles/reviews about PlatformIO: 2016 ^^^^ +* Sep 12, 2016 - **Pedro Minatel** - `OTA – Como programar o ESP8266 pelo WiFi no platformIO (OTA programming for ESP8266 via Wi-Fi using PlatformIO, Portuguese) `_ * Sep 2, 2016 - **Tinkerman** `ESP8266: Optimizing files for SPIFFS with Gulp `_ * Aug 28, 2016 - **Tom Parker** `Using the BBC micro:bit with PlatformIO `_ * Aug 24, 2016 - **Primal Cortex** `Cloud based continuous integration and delivery for IOT using PlatformIO `_ diff --git a/docs/platforms/espressif8266_extra.rst b/docs/platforms/espressif8266_extra.rst index 02db956f..983ef916 100644 --- a/docs/platforms/espressif8266_extra.rst +++ b/docs/platforms/espressif8266_extra.rst @@ -251,6 +251,7 @@ Using Arduino Framework with Staging version Articles -------- +* Sep 12, 2016 - **Pedro Minatel** - `OTA – Como programar o ESP8266 pelo WiFi no platformIO (OTA programming for ESP8266 via Wi-Fi using PlatformIO, Portuguese) `_ * Sep 2, 2016 - **Tinkerman** `Optimizing files for SPIFFS with Gulp `_ * Jul 15, 2016 - **Jaime** - `ESP8266 Mobile Rick Roll Captive Portal `_ * Jun 13, 2016 - **Daniel Eichhorn** - `New Weather Station Demo on Github `_ From 35cbbeb45711353ea3e29927199bfe36889b7523 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 12 Sep 2016 19:54:28 +0300 Subject: [PATCH 16/52] Fix downloader with Unicode path // Resolve #771 --- examples | 2 +- platformio/downloader.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples b/examples index aa8c45e2..2f79bc25 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit aa8c45e2dbf438829efe8ed269c26ea4e16a5073 +Subproject commit 2f79bc25f8be67961ef3bb2da4ee47cb9a1cf18e diff --git a/platformio/downloader.py b/platformio/downloader.py index f35aeda4..b96edda8 100644 --- a/platformio/downloader.py +++ b/platformio/downloader.py @@ -41,6 +41,7 @@ class FileDownloader(object): if disposition and "filename=" in disposition: self._fname = disposition[disposition.index("filename=") + 9:].replace('"', "").replace("'", "") + self._fname = self._fname.encode("utf8") else: self._fname = url.split("/")[-1] From eae152959b9de279b41332815512a7d34e5be9a8 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 13 Sep 2016 17:36:20 +0300 Subject: [PATCH 17/52] Minor change to BoardConfig() API --- platformio/managers/platform.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 8e8e0329..8331cd91 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -494,16 +494,20 @@ class PlatformBoardConfig(object): return False @property - def id_(self): + def id(self): return self._id + @property + def id_(self): + return self.id + @property def manifest(self): return self._manifest def get_brief_data(self): return { - "id": self.id_, + "id": self.id, "name": self._manifest['name'], "platform": self._manifest.get("platform"), "mcu": self._manifest.get("build", {}).get("mcu", "").upper(), From 33b5e18582fbc2adf09523f1b132ea9a79786b20 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 13 Sep 2016 17:36:36 +0300 Subject: [PATCH 18/52] Use stable documentation --- platformio/builder/tools/piolib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 6a357ba5..989b1897 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -549,7 +549,7 @@ def GetLibBuilders(env): if verbose and found_incompat: sys.stderr.write( "More details about \"Library Compatibility Mode\": " - "http://docs.platformio.org/en/latest/librarymanager/ldf.html#" + "http://docs.platformio.org/en/stable/librarymanager/ldf.html#" "ldf-compat-mode\n") return items From 8199272328aa81bc075c5d5d332c89aedfa66107 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 13 Sep 2016 18:53:17 +0300 Subject: [PATCH 19/52] Better checking of available package updates --- platformio/__init__.py | 2 +- platformio/managers/package.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index fc10a320..aa995d20 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 0, "2a2") +VERSION = (3, 0, "2a3") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/managers/package.py b/platformio/managers/package.py index c536a9e6..22ea8e25 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -544,9 +544,19 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): if not latest_version: click.echo("[%s]" % (click.style("Unknown", fg="yellow"))) return - if manifest['version'] == latest_version: + + up_to_date = False + try: + up_to_date = ( + semantic_version.Version.coerce(manifest['version']) >= + semantic_version.Version.coerce(latest_version)) + except ValueError: + up_to_date = latest_version == manifest['version'] + + if up_to_date: click.echo("[%s]" % (click.style("Up-to-date", fg="green"))) return + click.echo("[%s]" % (click.style("Out-of-date", fg="red"))) if only_check: return From 05bbd4a7f8b10b3f6d74fd0c86a7af16a3dd851b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 13 Sep 2016 19:22:19 +0300 Subject: [PATCH 20/52] Improve Project Generator when custom ``--project-option`` is passed to `platformio init` command --- HISTORY.rst | 3 +++ docs/userguide/cmd_ci.rst | 6 ++--- docs/userguide/cmd_init.rst | 45 +++++++++++++++++-------------------- platformio/commands/init.py | 23 ++++++++++++------- tests/commands/test_init.py | 17 ++++++++++++++ 5 files changed, 59 insertions(+), 35 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 5c95a239..315e5f7b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,9 @@ PlatformIO 3.0 3.0.2 (2016-09-??) ~~~~~~~~~~~~~~~~~~ +* Improved Project Generator when custom ``--project-option`` is passed to + `platformio init `_ + command * Disable SSL Server-Name-Indication for Python < 2.7.9 * Return valid exit code from ``plaformio test`` command diff --git a/docs/userguide/cmd_ci.rst b/docs/userguide/cmd_ci.rst index 87c3735b..c218373d 100644 --- a/docs/userguide/cmd_ci.rst +++ b/docs/userguide/cmd_ci.rst @@ -118,9 +118,9 @@ Buid project using pre-configured :ref:`projectconf`. .. option:: -O, --project-option -Pass additional options from :ref:`projectconf` to -:option:`platformio init --project-option` command. For example, -automatically install dependent libraries +Pass additional options from :ref:`projectconf` to :ref:`cmd_init` command. +Use multiple ``--project-option`` options to pass multiple options to +:ref:`cmd_init` command. For example, automatically install dependent libraries ``platformio ci --project-option="lib_deps=ArduinoJSON"`` or ignore specific library ``platformio ci --project-option="lib_ignore=SomeLib"``. diff --git a/docs/userguide/cmd_init.rst b/docs/userguide/cmd_init.rst index c3c4ab87..b365b779 100644 --- a/docs/userguide/cmd_init.rst +++ b/docs/userguide/cmd_init.rst @@ -89,11 +89,11 @@ be ``[env:teensy_31]``. Examples -------- -1. Create new project in the current working directory +1. Initialize new project in a current working directory -.. code-block:: bash +.. code:: - $ platformio init + > platformio init The current working directory *** will be used for the new project. You can specify another project directory via @@ -110,38 +110,35 @@ Examples `platformio run --target clean` - clean project (remove compiled files) -2. Create new project in the specified directory +2. Initialize new project in a specified directory -.. code-block:: bash +.. code:: - $ platformio init -d %PATH_TO_DIR% + > platformio init -d %PATH_TO_DIR% The next files/directories will be created in *** platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-| - src - Put your source files here - lib - Put here project specific (private) libraries - Project has been successfully initialized! - Useful commands: - `platformio run` - process/build project from the current directory - `platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board - `platformio run --target clean` - clean project (remove compiled files) + ... 3. Initialize project for Arduino Uno -.. code-block:: bash +.. code:: - $ platformio init --board uno + > platformio init --board uno + + The current working directory *** will be used for the new project. + You can specify another project directory via + `platformio init -d %PATH_TO_THE_PROJECT_DIR%` command. + ... + +4. Initialize project for Teensy 3.1 board with custom :ref:`framework_mbed` + +.. code:: + + > platformio init --board teensy31 --project-option "framework=mbed" The current working directory *** will be used for the new project. You can specify another project directory via `platformio init -d %PATH_TO_THE_PROJECT_DIR%` command. - The next files/directories will be created in *** - platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-| - src - Put your source files here - lib - Put here project specific (private) libraries - Project has been successfully initialized! - Useful commands: - `platformio run` - process/build project from the current directory - `platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board - `platformio run --target clean` - clean project (remove compiled files) + ... \ No newline at end of file diff --git a/platformio/commands/init.py b/platformio/commands/init.py index d7eee985..6318678e 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -317,18 +317,25 @@ def fill_project_envs( # pylint: disable=too-many-arguments,too-many-locals continue used_boards.append(id_) - content.append("") - content.append("[env:%s%s]" % (env_prefix, id_)) - content.append("platform = %s" % manifest['platform']) - + envopts = { + "platform": manifest['platform'], + "board": id_ + } # find default framework for board frameworks = manifest.get("frameworks") if frameworks: - content.append("framework = %s" % frameworks[0]) + envopts['framework'] = frameworks[0] - content.append("board = %s" % id_) - if project_option: - content.extend(project_option) + for item in project_option: + if "=" not in item: + continue + _name, _value = item.split("=", 1) + envopts[_name.strip()] = _value.strip() + + content.append("") + content.append("[env:%s%s]" % (env_prefix, id_)) + for name, value in envopts.items(): + content.append("%s = %s" % (name, value)) if force_download and used_platforms: _install_dependent_platforms(ctx, used_platforms) diff --git a/tests/commands/test_init.py b/tests/commands/test_init.py index 5f08c336..3f0cb3d7 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -132,6 +132,23 @@ def test_init_enable_auto_uploading(clirunner, validate_cliresult): set(config.items("env:uno")))) == 0 +def test_init_custom_framework(clirunner, validate_cliresult): + with clirunner.isolated_filesystem(): + result = clirunner.invoke( + cmd_init, ["-b", "teensy31", "--project-option", "framework=mbed"]) + validate_cliresult(result) + validate_pioproject(getcwd()) + config = util.load_project_config() + expected_result = [ + ("platform", "teensy"), ("framework", "mbed"), + ("board", "teensy31") + ] + assert config.has_section("env:teensy31") + assert len( + set(expected_result).symmetric_difference( + set(config.items("env:teensy31")))) == 0 + + def test_init_incorrect_board(clirunner): result = clirunner.invoke(cmd_init, ["-b", "missed_board"]) assert result.exit_code == 2 From d2a45245e28f165b5a82e6ee068e7340e18f4f74 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 13 Sep 2016 20:39:04 +0300 Subject: [PATCH 21/52] Fix linter warnings --- HISTORY.rst | 2 +- platformio/commands/init.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 315e5f7b..a0d0a645 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,7 +8,7 @@ PlatformIO 3.0 ~~~~~~~~~~~~~~~~~~ * Improved Project Generator when custom ``--project-option`` is passed to - `platformio init `_ + `platformio init `__ command * Disable SSL Server-Name-Indication for Python < 2.7.9 * Return valid exit code from ``plaformio test`` command diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 6318678e..9b32789b 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# pylint: disable=too-many-arguments,too-many-locals, too-many-branches + from os import getcwd, makedirs from os.path import isdir, isfile, join from shutil import copyfile @@ -287,9 +289,8 @@ def init_cvs_ignore(project_dir): fp.writelines(current) -def fill_project_envs( # pylint: disable=too-many-arguments,too-many-locals - ctx, project_dir, board_ids, project_option, env_prefix, - force_download): +def fill_project_envs(ctx, project_dir, board_ids, project_option, env_prefix, + force_download): installed_boards = PlatformManager().get_installed_boards() content = [] used_boards = [] @@ -317,10 +318,7 @@ def fill_project_envs( # pylint: disable=too-many-arguments,too-many-locals continue used_boards.append(id_) - envopts = { - "platform": manifest['platform'], - "board": id_ - } + envopts = {"platform": manifest['platform'], "board": id_} # find default framework for board frameworks = manifest.get("frameworks") if frameworks: From 7116deaf5401d7aa5972f386e56ae270c87fccfd Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 14:46:10 +0300 Subject: [PATCH 22/52] Allow to initialize project in off-line mode --- platformio/commands/ci.py | 3 +-- platformio/commands/init.py | 39 +++++++++++---------------------- platformio/managers/platform.py | 9 ++++++++ 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/platformio/commands/ci.py b/platformio/commands/ci.py index cdfc004c..de3349fa 100644 --- a/platformio/commands/ci.py +++ b/platformio/commands/ci.py @@ -21,8 +21,7 @@ from tempfile import mkdtemp import click from platformio import app, util -from platformio.commands.init import cli as cmd_init -from platformio.commands.init import validate_boards +from platformio.commands.init import cli as cmd_init, validate_boards from platformio.commands.run import cli as cmd_run from platformio.exception import CIBuildEnvsEmpty diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 9b32789b..11ae6932 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -29,19 +29,14 @@ from platformio.managers.platform import PlatformManager def validate_boards(ctx, param, value): # pylint: disable=W0613 pm = PlatformManager() - # check installed boards - known_boards = set([b['id'] for b in pm.get_installed_boards()]) - # if boards are not listed as installed, check registered boards - if set(value) - known_boards: - known_boards = set([b['id'] for b in pm.get_registered_boards()]) - unknown_boards = set(value) - known_boards - try: - assert not unknown_boards - return value - except AssertionError: - raise click.BadParameter("%s. Please search for the board ID using " - "`platformio boards` command" % - ", ".join(unknown_boards)) + for id_ in value: + try: + pm.board_config(id_) + except exception.UnknownBoard: + raise click.BadParameter( + "`%s`. Please search for board ID using `platformio boards` " + "command" % id_) + return value @click.command( @@ -291,7 +286,6 @@ def init_cvs_ignore(project_dir): def fill_project_envs(ctx, project_dir, board_ids, project_option, env_prefix, force_download): - installed_boards = PlatformManager().get_installed_boards() content = [] used_boards = [] used_platforms = [] @@ -303,24 +297,17 @@ def fill_project_envs(ctx, project_dir, board_ids, project_option, env_prefix, continue used_boards.append(config.get(section, "board")) + pm = PlatformManager() for id_ in board_ids: - manifest = None - for boards in (installed_boards, - PlatformManager.get_registered_boards()): - for b in boards: - if b['id'] == id_: - manifest = b - break - assert manifest is not None - - used_platforms.append(manifest['platform']) + board_config = pm.board_config(id_) + used_platforms.append(board_config['platform']) if id_ in used_boards: continue used_boards.append(id_) - envopts = {"platform": manifest['platform'], "board": id_} + envopts = {"platform": board_config['platform'], "board": id_} # find default framework for board - frameworks = manifest.get("frameworks") + frameworks = board_config.get("frameworks") if frameworks: envopts['framework'] = frameworks[0] diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 8331cd91..0c4d8a37 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -118,6 +118,15 @@ class PlatformManager(BasePkgManager): def get_registered_boards(): return util.get_api_result("/boards") + def board_config(self, id_): + for manifest in self.get_installed_boards(): + if manifest['id'] == id_: + return manifest + for manifest in self.get_registered_boards(): + if manifest['id'] == id_: + return manifest + raise exception.UnknownBoard(id_) + class PlatformFactory(object): From 37eb37e2a1f1ec3c602c66c99f6bea44e66cda2c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 14:55:07 +0300 Subject: [PATCH 23/52] Improve a work in off-line mode --- HISTORY.rst | 1 + platformio/maintenance.py | 4 +++- platformio/util.py | 10 ++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a0d0a645..f8d2a437 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ PlatformIO 3.0 3.0.2 (2016-09-??) ~~~~~~~~~~~~~~~~~~ +* Improved a work in off-line mode * Improved Project Generator when custom ``--project-option`` is passed to `platformio init `__ command diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 6df212e1..7b4c66a0 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -34,7 +34,9 @@ from platformio.managers.platform import PlatformManager from platformio.pioplus import pioplus_update -def in_silence(ctx): +def in_silence(ctx=None): + ctx = ctx or app.get_session_var("command_ctx") + assert ctx ctx_args = ctx.args or [] return (ctx_args and (ctx.args[0] == "upgrade" or "--json-output" in ctx_args)) diff --git a/platformio/util.py b/platformio/util.py index 69316d1f..98d18182 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -417,11 +417,13 @@ def get_api_result(path, params=None, data=None): return _get_api_result(path, params, data) except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e: + from platformio.maintenance import in_silence total += 1 - click.secho( - "[API] ConnectionError: {0} (incremented retry: max={1}, " - "total={2})".format(e, max_retries, total), - fg="yellow") + if not in_silence(): + click.secho( + "[API] ConnectionError: {0} (incremented retry: max={1}, " + "total={2})".format(e, max_retries, total), + fg="yellow") sleep(2 * total) raise exception.APIRequestError( From bd207667e3a4cac91b8b9c1e138ecdc51522be3b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 19:06:22 +0300 Subject: [PATCH 24/52] Implement LocalCache system for API and improve a work in off-line mode --- HISTORY.rst | 6 +-- platformio/__init__.py | 2 +- platformio/app.py | 84 ++++++++++++++++++++++++++++++++- platformio/commands/ci.py | 3 +- platformio/commands/lib.py | 9 ++-- platformio/commands/platform.py | 2 +- platformio/maintenance.py | 7 +++ platformio/util.py | 18 +++++-- 8 files changed, 117 insertions(+), 14 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f8d2a437..0f5f57d7 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,14 +4,14 @@ Release Notes PlatformIO 3.0 -------------- -3.0.2 (2016-09-??) +3.1.0 (2016-09-??) ~~~~~~~~~~~~~~~~~~ -* Improved a work in off-line mode +* Implemented LocalCache system for API and improved a work in off-line mode * Improved Project Generator when custom ``--project-option`` is passed to `platformio init `__ command -* Disable SSL Server-Name-Indication for Python < 2.7.9 +* Fixed SSL Server-Name-Indication for Python < 2.7.9 * Return valid exit code from ``plaformio test`` command * Development platform `Espressif 8266 `__ diff --git a/platformio/__init__.py b/platformio/__init__.py index aa995d20..d8d69720 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 0, "2a3") +VERSION = (3, 1, "0a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/app.py b/platformio/app.py index 013c0745..59e50e61 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -14,10 +14,11 @@ import hashlib import json +import os import uuid from copy import deepcopy -from os import environ, getenv -from os.path import getmtime, isfile, join +from os import environ, getenv, listdir, remove +from os.path import dirname, getmtime, isdir, isfile, join from time import time from lockfile import LockFile @@ -111,6 +112,85 @@ class State(object): self._lockfile.release() +class LocalCache(object): + + def __init__(self, cache_dir=None): + self.cache_dir = cache_dir or join(util.get_home_dir(), ".cache") + if not self.cache_dir: + os.makedirs(self.cache_dir) + self.db_path = join(self.cache_dir, "db.data") + + def __enter__(self): + if not isfile(self.db_path): + return self + newlines = [] + found = False + with open(self.db_path) as fp: + for line in fp.readlines(): + if "=" not in line: + continue + line = line.strip() + expire, path = line.split("=") + if time() < int(expire): + newlines.append(line) + continue + found = True + if isfile(path): + remove(path) + if not len(listdir(dirname(path))): + util.rmtree_(dirname(path)) + if found: + with open(self.db_path, "w") as fp: + fp.write("\n".join(newlines) + "\n") + return self + + def __exit__(self, type_, value, traceback): + pass + + def get_cache_path(self, key): + assert len(key) > 3 + return join(self.cache_dir, key[-2:], key) + + @staticmethod + def key_from_args(*args): + h = hashlib.md5() + for data in args: + h.update(str(data)) + return h.hexdigest() + + def get(self, key): + cache_path = self.get_cache_path(key) + if not isfile(cache_path): + return None + with open(cache_path) as fp: + data = fp.read() + if data[0] in ("{", "["): + return json.loads(data) + return data + + def set(self, key, data, valid): + if not data: + return + tdmap = {"s": 1, "m": 60, "h": 3600, "d": 86400} + assert valid.endswith(tuple(tdmap.keys())) + cache_path = self.get_cache_path(key) + if not isdir(dirname(cache_path)): + os.makedirs(dirname(cache_path)) + with open(cache_path, "w") as fp: + if isinstance(data, dict) or isinstance(data, list): + json.dump(data, fp) + else: + fp.write(str(data)) + expire_time = int(time() + tdmap[valid[-1]] * int(valid[:-1])) + with open(self.db_path, "w+") as fp: + fp.write("%s=%s\n" % (str(expire_time), cache_path)) + return True + + def clean(self): + if isdir(self.cache_dir): + util.rmtree_(self.cache_dir) + + def sanitize_setting(name, value): if name not in DEFAULT_SETTINGS: raise InvalidSettingName(name) diff --git a/platformio/commands/ci.py b/platformio/commands/ci.py index de3349fa..cdfc004c 100644 --- a/platformio/commands/ci.py +++ b/platformio/commands/ci.py @@ -21,7 +21,8 @@ from tempfile import mkdtemp import click from platformio import app, util -from platformio.commands.init import cli as cmd_init, validate_boards +from platformio.commands.init import cli as cmd_init +from platformio.commands.init import validate_boards from platformio.commands.run import cli as cmd_run from platformio.exception import CIBuildEnvsEmpty diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index 79a082c3..e087d061 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -180,8 +180,10 @@ def lib_search(query, json_output, page, noninteractive, **filters): query.append('%s:"%s"' % (key, value)) result = get_api_result( - "/lib/search", dict( - query=" ".join(query), page=page)) + "/lib/search", + dict( + query=" ".join(query), page=page), + cache_valid="3d") if json_output: click.echo(json.dumps(result)) @@ -232,7 +234,8 @@ def lib_search(query, json_output, page, noninteractive, **filters): result = get_api_result( "/lib/search", dict( - query=" ".join(query), page=int(result['page']) + 1)) + query=" ".join(query), page=int(result['page']) + 1), + cache_valid="3d") @cli.command("list", short_help="List installed libraries") diff --git a/platformio/commands/platform.py b/platformio/commands/platform.py index 825422cb..53bb5515 100644 --- a/platformio/commands/platform.py +++ b/platformio/commands/platform.py @@ -48,7 +48,7 @@ def _print_platforms(platforms): @click.option("--json-output", is_flag=True) def platform_search(query, json_output): platforms = [] - for platform in util.get_api_result("/platforms"): + for platform in util.get_api_result("/platforms", cache_valid="365d"): if query == "all": query = "" diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 7b4c66a0..4ca07c4e 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -42,6 +42,12 @@ def in_silence(ctx=None): (ctx.args[0] == "upgrade" or "--json-output" in ctx_args)) +def clean_cache(ctx): + if ctx.args and (ctx.args[0] == "upgrade" or "update" in ctx.args): + with app.LocalCache() as lc: + lc.clean() + + def on_platformio_start(ctx, force, caller): if not caller: if getenv("PLATFORMIO_CALLER"): @@ -52,6 +58,7 @@ def on_platformio_start(ctx, force, caller): app.set_session_var("command_ctx", ctx) app.set_session_var("force_option", force) app.set_session_var("caller_id", caller) + clean_cache(ctx) telemetry.on_command() if not in_silence(ctx): diff --git a/platformio/util.py b/platformio/util.py index 98d18182..19fb8e02 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -409,12 +409,24 @@ def _get_api_result( return result -def get_api_result(path, params=None, data=None): - max_retries = 5 +def get_api_result(path, params=None, data=None, cache_valid=None): + from platformio.app import LocalCache total = 0 + max_retries = 5 + cache_key = (LocalCache.key_from_args(path, params, data) + if cache_valid else None) while total < max_retries: try: - return _get_api_result(path, params, data) + with LocalCache() as lc: + if cache_key: + result = lc.get(cache_key) + if result is not None: + return result + result = _get_api_result(path, params, data) + if cache_valid: + with LocalCache() as lc: + lc.set(cache_key, result, cache_valid) + return result except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e: from platformio.maintenance import in_silence From 27df09533c57475a296a73f1e0bd479d4af654c3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 22:32:35 +0300 Subject: [PATCH 25/52] Clean cache before upgrade --- platformio/maintenance.py | 3 +-- platformio/managers/lib.py | 6 ++++-- platformio/managers/platform.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 4ca07c4e..6d457576 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -154,7 +154,7 @@ def after_upgrade(ctx): app.set_state_item("last_version", __version__) else: click.secho("Please wait while upgrading PlatformIO ...", fg="yellow") - + clean_cache() u = Upgrader(last_version, __version__) if u.run(ctx): app.set_state_item("last_version", __version__) @@ -162,7 +162,6 @@ def after_upgrade(ctx): # update development platforms pm = PlatformManager() for manifest in pm.get_installed(): - # @TODO Uncomment line below after first PIO3 release # pm.update(manifest['name'], "^" + manifest['version']) pm.update(manifest['name']) diff --git a/platformio/managers/lib.py b/platformio/managers/lib.py index 45ba61f2..986dd7c3 100644 --- a/platformio/managers/lib.py +++ b/platformio/managers/lib.py @@ -194,7 +194,9 @@ class LibraryManager(BasePkgManager): raise exception.UndefinedPackageVersion(requirements or "latest", util.get_systype()) dl_data = util.get_api_result( - "/lib/download/" + str(name[3:]), dict(version=version)) + "/lib/download/" + str(name[3:]), + dict(version=version), + cache_valid="30d") assert dl_data return self._install_from_url( @@ -268,7 +270,7 @@ class LibraryManager(BasePkgManager): lib_info = None result = util.get_api_result( - "/lib/search", dict(query=" ".join(query))) + "/lib/search", dict(query=" ".join(query)), cache_valid="3d") if result['total'] == 1: lib_info = result['items'][0] elif result['total'] > 1: diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 0c4d8a37..741493ba 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -116,7 +116,7 @@ class PlatformManager(BasePkgManager): @staticmethod @util.memoized def get_registered_boards(): - return util.get_api_result("/boards") + return util.get_api_result("/boards", cache_valid="365d") def board_config(self, id_): for manifest in self.get_installed_boards(): From 72084a2013df569cbe14dc0be76520ab6e27c17c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 22:50:14 +0300 Subject: [PATCH 26/52] Fix issue with cache cleaning --- platformio/__init__.py | 2 +- platformio/maintenance.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index d8d69720..32c14c03 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 1, "0a1") +VERSION = (3, 1, "0a2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 6d457576..0494eff4 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -43,9 +43,8 @@ def in_silence(ctx=None): def clean_cache(ctx): - if ctx.args and (ctx.args[0] == "upgrade" or "update" in ctx.args): - with app.LocalCache() as lc: - lc.clean() + with app.LocalCache() as lc: + lc.clean() def on_platformio_start(ctx, force, caller): @@ -58,9 +57,10 @@ def on_platformio_start(ctx, force, caller): app.set_session_var("command_ctx", ctx) app.set_session_var("force_option", force) app.set_session_var("caller_id", caller) - clean_cache(ctx) telemetry.on_command() + if ctx.args and (ctx.args[0] == "upgrade" or "update" in ctx.args): + clean_cache() if not in_silence(ctx): after_upgrade(ctx) From 92e69a60f4a44911808f88869130c245bc87f694 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 23:10:46 +0300 Subject: [PATCH 27/52] Fix typo --- platformio/maintenance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 0494eff4..f65e4b26 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -42,7 +42,7 @@ def in_silence(ctx=None): (ctx.args[0] == "upgrade" or "--json-output" in ctx_args)) -def clean_cache(ctx): +def clean_cache(): with app.LocalCache() as lc: lc.clean() From 3b6bda825bbe60af2c33c99763532607287393b6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 23:26:51 +0300 Subject: [PATCH 28/52] Update a complex test for `platform install` command --- tests/commands/test_platform.py | 86 ++++++++++++++++----------------- 1 file changed, 41 insertions(+), 45 deletions(-) diff --git a/tests/commands/test_platform.py b/tests/commands/test_platform.py index 63b593a7..829e5cdb 100644 --- a/tests/commands/test_platform.py +++ b/tests/commands/test_platform.py @@ -68,56 +68,52 @@ def test_install_uknown_version(clirunner, validate_cliresult): def test_complex(clirunner, validate_cliresult): - items = [ - "teensy", - "https://github.com/platformio/platform-teensy/archive/develop.zip" - ] - for item in items: - with clirunner.isolated_filesystem(): - os.environ["PLATFORMIO_HOME_DIR"] = os.getcwd() - try: - result = clirunner.invoke(cli_platform.platform_install, - [item]) - validate_cliresult(result) - assert all([ - s in result.output - for s in ("teensy", "Downloading", "Unpacking") - ]) + with clirunner.isolated_filesystem(): + os.environ["PLATFORMIO_HOME_DIR"] = os.getcwd() + try: + result = clirunner.invoke( + cli_platform.platform_install, + ["teensy", "--with-package", "framework-arduinoteensy"]) + validate_cliresult(result) + assert all([ + s in result.output + for s in ("teensy", "Downloading", "Unpacking") + ]) - # show platform information - result = clirunner.invoke(cli_platform.platform_show, - ["teensy"]) - validate_cliresult(result) - assert "teensy" in result.output + # show platform information + result = clirunner.invoke(cli_platform.platform_show, ["teensy"]) + validate_cliresult(result) + assert "teensy" in result.output - # list platforms - result = clirunner.invoke(cli_platform.platform_list, - ["--json-output"]) - validate_cliresult(result) - list_result = json.loads(result.output) - assert isinstance(list_result, list) - assert len(list_result) == 1 - assert list_result[0]["name"] == "teensy" - assert list_result[0]["packages"] == [] + # list platforms + result = clirunner.invoke(cli_platform.platform_list, + ["--json-output"]) + validate_cliresult(result) + list_result = json.loads(result.output) + assert isinstance(list_result, list) + assert len(list_result) == 1 + assert list_result[0]["name"] == "teensy" + assert list_result[0]["packages"] == ["framework-arduinoteensy"] - # try to install again - result = clirunner.invoke(cli_platform.platform_install, - ["teensy"]) - validate_cliresult(result) - assert "is already installed" in result.output + # try to install again + result = clirunner.invoke(cli_platform.platform_install, + ["teensy"]) + validate_cliresult(result) + assert "is already installed" in result.output - # try to update + # try to update + for _ in range(2): result = clirunner.invoke(cli_platform.platform_update) validate_cliresult(result) assert "teensy" in result.output - # assert "Up-to-date" in result.output + assert "Up-to-date" in result.output + assert "Out-of-date" not in result.output - # try to uninstall - result = clirunner.invoke(cli_platform.platform_uninstall, - ["teensy"]) - validate_cliresult(result) - for folder in ("platforms", "packages"): - assert len(os.listdir(join(util.get_home_dir(), - folder))) == 0 - finally: - del os.environ["PLATFORMIO_HOME_DIR"] + # try to uninstall + result = clirunner.invoke(cli_platform.platform_uninstall, + ["teensy"]) + validate_cliresult(result) + for folder in ("platforms", "packages"): + assert len(os.listdir(join(util.get_home_dir(), folder))) == 0 + finally: + del os.environ["PLATFORMIO_HOME_DIR"] From bd30de4f18271e15e91bcd9f0a52fe51f59f7386 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Sep 2016 23:42:26 +0300 Subject: [PATCH 29/52] ESP8266: Using Arduino Framework with Staging version --- HISTORY.rst | 4 ++++ docs/platforms/espressif8266_extra.rst | 19 +++++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 0f5f57d7..72000697 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,9 +14,13 @@ PlatformIO 3.0 * Fixed SSL Server-Name-Indication for Python < 2.7.9 * Return valid exit code from ``plaformio test`` command +------- + * Development platform `Espressif 8266 `__ + Add support for `SparkFun Blynk Board `_ + + Created `staging `__ + branch to work with development version of Arduino Framework 3.0.1 (2016-09-08) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/platforms/espressif8266_extra.rst b/docs/platforms/espressif8266_extra.rst index 983ef916..9855c687 100644 --- a/docs/platforms/espressif8266_extra.rst +++ b/docs/platforms/espressif8266_extra.rst @@ -220,20 +220,15 @@ Demo Using Arduino Framework with Staging version -------------------------------------------- -1. Clone/Copy `main repository `_ to - :ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif8266`` - and create new file ``packages/framework-arduinoespressif8266/package.json`` - with the next contents (you can specify own version if you want) +1. Install ``stage`` version of Espressif 8266 development platform - .. code-block:: json + .. code-block:: bash - { - "description":"Arduino Wiring-based Framework (ESP8266 Core)", - "name":"framework-arduinoespressif8266", - "system":"all", - "url":"https://github.com/esp8266/Arduino", - "version":"1.20300.0" - } + # uninstall existing (if you have it) + platformio platform uninstall espressif8266 + + # install from ``stage`` branch + platformio platform install https://github.com/platformio/platform-espressif8266.git#feature/stage 2. Try to build project 3. If you see build errors, then try to build this project using the same From 18153d416803a946a7c798e7ba29040ef9150302 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 15 Sep 2016 01:17:16 +0300 Subject: [PATCH 30/52] Cleanup platform name before initialization --- platformio/managers/platform.py | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 741493ba..b92ab239 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -132,6 +132,7 @@ class PlatformFactory(object): @staticmethod def get_clsname(name): + name = re.sub(r"[^\da-z]+", "", name, flags=re.I) return "%s%sPlatform" % (name.upper()[0], name.lower()[1:]) @staticmethod From a14dec70c2476ffa7a0bc002bab5ca75ecc06711 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 15 Sep 2016 01:28:41 +0300 Subject: [PATCH 31/52] Simplify ESP8266-stage using --- docs/installation.rst | 2 ++ docs/platforms/espressif8266_extra.rst | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 81af129a..22717b4b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -167,6 +167,8 @@ For upgrading ``platformio`` to the latest version: pip install -U platformio +.. _installation_develop: + Development Version ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/platforms/espressif8266_extra.rst b/docs/platforms/espressif8266_extra.rst index 9855c687..4c3f58b9 100644 --- a/docs/platforms/espressif8266_extra.rst +++ b/docs/platforms/espressif8266_extra.rst @@ -220,20 +220,21 @@ Demo Using Arduino Framework with Staging version -------------------------------------------- -1. Install ``stage`` version of Espressif 8266 development platform +1. Install :ref:`installation_develop` of PlatformIO +2. Set :ref:`projectconf_env_platform` to ``espressif8266-stage`` in + :ref:`projectconf`. For example, - .. code-block:: bash + .. code-block:: ini - # uninstall existing (if you have it) - platformio platform uninstall espressif8266 + [env:nodemcuv2] + platform = espressif8266-stage + board = nodemcuv2 + framework = arduino - # install from ``stage`` branch - platformio platform install https://github.com/platformio/platform-espressif8266.git#feature/stage - -2. Try to build project -3. If you see build errors, then try to build this project using the same +3. Try to build project +4. If you see build errors, then try to build this project using the same ``stage`` on Arduino IDE -4. If it works with Arduino IDE but doesn't work with PlatformIO, then please +5. If it works with Arduino IDE but doesn't work with PlatformIO, then please `open new issue `_ with attached information: From 9c15fed7223a2b3d18a332bdf65299a1236da336 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 15 Sep 2016 01:30:51 +0300 Subject: [PATCH 32/52] Fix issue with escaping platform name --- platformio/managers/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index b92ab239..152010a9 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -132,7 +132,7 @@ class PlatformFactory(object): @staticmethod def get_clsname(name): - name = re.sub(r"[^\da-z]+", "", name, flags=re.I) + name = re.sub(r"[^\da-z\_]+", "", name, flags=re.I) return "%s%sPlatform" % (name.upper()[0], name.lower()[1:]) @staticmethod From 74a8e883088efcd5d9032d2dbc79267445a17e6c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 15 Sep 2016 01:39:03 +0300 Subject: [PATCH 33/52] Rename stage version of esp8266 --- docs/platforms/espressif8266_extra.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platforms/espressif8266_extra.rst b/docs/platforms/espressif8266_extra.rst index 4c3f58b9..d0c549b8 100644 --- a/docs/platforms/espressif8266_extra.rst +++ b/docs/platforms/espressif8266_extra.rst @@ -221,13 +221,13 @@ Using Arduino Framework with Staging version -------------------------------------------- 1. Install :ref:`installation_develop` of PlatformIO -2. Set :ref:`projectconf_env_platform` to ``espressif8266-stage`` in +2. Set :ref:`projectconf_env_platform` to ``espressif8266_stage`` in :ref:`projectconf`. For example, .. code-block:: ini [env:nodemcuv2] - platform = espressif8266-stage + platform = espressif8266_stage board = nodemcuv2 framework = arduino From e1f3a248eaeff93353a97685e8dc8a7a434f3e8d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 15 Sep 2016 01:45:36 +0300 Subject: [PATCH 34/52] Add step with manual installation of ESP8266 Stage --- docs/platforms/espressif8266_extra.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/platforms/espressif8266_extra.rst b/docs/platforms/espressif8266_extra.rst index d0c549b8..e48d4395 100644 --- a/docs/platforms/espressif8266_extra.rst +++ b/docs/platforms/espressif8266_extra.rst @@ -221,7 +221,13 @@ Using Arduino Framework with Staging version -------------------------------------------- 1. Install :ref:`installation_develop` of PlatformIO -2. Set :ref:`projectconf_env_platform` to ``espressif8266_stage`` in +2. Install Espressif 8266 (Stage) development platform + + .. code:: + + platformio platform install https://github.com/platformio/platform-espressif8266.git#feature/stage + +3. Set :ref:`projectconf_env_platform` to ``espressif8266_stage`` in :ref:`projectconf`. For example, .. code-block:: ini @@ -231,10 +237,10 @@ Using Arduino Framework with Staging version board = nodemcuv2 framework = arduino -3. Try to build project -4. If you see build errors, then try to build this project using the same +4. Try to build project +5. If you see build errors, then try to build this project using the same ``stage`` on Arduino IDE -5. If it works with Arduino IDE but doesn't work with PlatformIO, then please +6. If it works with Arduino IDE but doesn't work with PlatformIO, then please `open new issue `_ with attached information: From 254dcac1494b8e0653b5fffe23cf1708f085cd50 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 15 Sep 2016 21:31:56 +0300 Subject: [PATCH 35/52] Add Bintray as mirror for development platform manifests --- platformio/managers/platform.py | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 152010a9..eecb481c 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -30,6 +30,7 @@ class PlatformManager(BasePkgManager): def __init__(self, package_dir=None, repositories=None): if not repositories: repositories = [ + "https://dl.bintray.com/platformio/dl-platforms/manifest.json", "{0}://dl.platformio.org/platforms/manifest.json".format( "https" if app.get_setting("enable_ssl") else "http") ] From 63748cd83d849bc795cc00b7b957bfcb022ac7b8 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 16 Sep 2016 01:00:50 +0300 Subject: [PATCH 36/52] Add support for Teensy 3.5 and 3.6 boards; Updated Arduino Framework for Teensy to v130 --- HISTORY.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 72000697..316b852d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,11 @@ PlatformIO 3.0 + Created `staging `__ branch to work with development version of Arduino Framework +* Development platform `Teensy `__ + + + Added support for Teensy 3.5 and 3.6 boards + + Updated Arduino Framework for Teensy to v130 + 3.0.1 (2016-09-08) ~~~~~~~~~~~~~~~~~~ From 52bb6fcbf090ba7b81cee51fbd3f1ef0252e780a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 16 Sep 2016 23:48:21 +0300 Subject: [PATCH 37/52] Add dozens of new boards --- HISTORY.rst | 29 ++ docs/frameworks/arduino.rst | 90 +++++- docs/frameworks/mbed.rst | 360 +++++++++++++++++++++- docs/platforms/atmelavr.rst | 3 - docs/platforms/atmelsam.rst | 3 - docs/platforms/creating_platform.rst | 3 + docs/platforms/embedded_boards.rst | 427 ++++++++++++++++++++++++++- docs/platforms/espressif8266.rst | 7 +- docs/platforms/freescalekinetis.rst | 44 ++- docs/platforms/intel_arc32.rst | 3 - docs/platforms/lattice_ice40.rst | 3 - docs/platforms/linux_arm.rst | 3 - docs/platforms/linux_i686.rst | 3 - docs/platforms/linux_x86_64.rst | 3 - docs/platforms/microchippic32.rst | 3 - docs/platforms/native.rst | 14 +- docs/platforms/nordicnrf51.rst | 48 ++- docs/platforms/nxplpc.rst | 200 ++++++++++++- docs/platforms/siliconlabsefm32.rst | 3 - docs/platforms/ststm32.rst | 136 ++++++++- docs/platforms/teensy.rst | 17 +- docs/platforms/timsp430.rst | 3 - docs/platforms/titiva.rst | 3 - docs/platforms/windows_x86.rst | 3 - scripts/docspregen.py | 2 +- 25 files changed, 1309 insertions(+), 104 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 316b852d..67c4dd35 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,35 @@ PlatformIO 3.0 + Created `staging `__ branch to work with development version of Arduino Framework +* Development platform `Freescale Kinetis `__ + + + Added support for new boards: FRDM-KL26Z, FRDM-KL27Z, FRDM-KL43Z, Hexiwear + +* Development platform `Nordic nRF51 `__ + + + Added support for new boards: Seeed Arch BLE, Seeed Arch Link, Switch + Science mbed TY51822r3, y5 nRF51822 mbug, JKSoft Wallbot BLE + +* Development platform `NXP LPC `__ + + + Added support for new boards: ARM mbed LPC11U24 (+CAN), Bambino-210E, + CoCo-ri-Co!, DipCortex M3, LPCXpresso11U68, LPCXpresso824-MAX, mBuino, + MicroNFCBoard, NXP LPC11C24, NXP LPC11U34, EA LPC11U35 QuickStart Board, + NXP LPC11U37, NXP LPC2368, NXP LPC2460, NXP LPC800-MAX, Seeed Arch GPRS V2, + Seeed Xadow M0, Smeshlink xbed LPC1768, Switch Science mbed LPC824 + +* Development platform `ST STM32 `__ + + + New Arduino framework for ST STM32 - + `STM32Duino `__. + Supported boards: BluePill F103C8, Generic STM32F103C8, Generic STM32F103R8, + Generic STM32F103RB, Generic STM32F103RC, Generic STM32F103RE, Olimexino STM32 + + + Added support for new ARM mbed based boards: ST 32F746GDISCOVER, + MultiTech mDot, ST Nucleo F207ZG, ST Nucleo F429ZI, ST Nucleo F446ZE, + ST Nucleo F746ZG, ST Nucleo F767ZI, ST Nucleo L011K4, ST Nucleo L432KC, + Seeed Arch Max + * Development platform `Teensy `__ + Added support for Teensy 3.5 and 3.6 boards diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 611760c9..3f48a7c4 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -45,6 +45,9 @@ Platforms * - :ref:`platform_nordicnrf51` - The Nordic nRF51 Series is a family of highly flexible, multi-protocol, system-on-chip (SoC) devices for ultra-low power wireless applications. nRF51 Series devices support a range of protocol stacks including Bluetooth Smart (previously called Bluetooth low energy), ANT and proprietary 2.4GHz protocols such as Gazell. + * - :ref:`platform_ststm32` + - The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development. + * - :ref:`platform_teensy` - Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard USB cable and a PC or Macintosh with a USB port. @@ -856,7 +859,7 @@ Espressif - ESP8266 - 80 MHz - 4096 Kb - - 50 Kb + - 80 Kb * - ``phoenix_v1`` - `Phoenix 1.0 `_ @@ -906,6 +909,68 @@ Fubarino - 512 Kb - 128 Kb +Generic +~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``bluepill_f103c8`` + - `BluePill F103C8 `_ + - STM32F103C8T6 + - 72 MHz + - 64 Kb + - 20 Kb + + * - ``genericSTM32F103C8`` + - `STM32F103C8 (20k RAM. 64k Flash) `_ + - STM32F103C8 + - 72 MHz + - 64 Kb + - 20 Kb + + * - ``genericSTM32F103CB`` + - `STM32F103CB (20k RAM. 128k Flash) `_ + - STM32F103CB + - 72 MHz + - 128 Kb + - 20 Kb + + * - ``genericSTM32F103R8`` + - `STM32F103R8 (20k RAM. 64 Flash) `_ + - STM32F103R8 + - 72 MHz + - 64 Kb + - 20 Kb + + * - ``genericSTM32F103RB`` + - `STM32F103RB (20k RAM. 128k Flash) `_ + - STM32F103RB + - 72 MHz + - 128 Kb + - 20 Kb + + * - ``genericSTM32F103RC`` + - `STM32F103RC (48k RAM. 256k Flash) `_ + - STM32F103RC + - 72 MHz + - 256 Kb + - 48 Kb + + * - ``genericSTM32F103RE`` + - `STM32F103RE (64k RAM. 512k Flash) `_ + - STM32F103RE + - 72 MHz + - 512 Kb + - 64 Kb + Generic ATTiny ~~~~~~~~~~~~~~ @@ -1233,6 +1298,13 @@ Olimex - Flash - RAM + * - ``maple`` + - `Olimexino STM32 `_ + - STM32F103RB_MAPLE + - 72 MHz + - 128 Kb + - 16.6015625 Kb + * - ``modwifi`` - `Olimex MOD-WIFI-ESP8266(-DEV) `_ - ESP8266 @@ -1594,7 +1666,7 @@ SparkFun - `SparkFun Blynk Board `_ - ESP8266 - 80 MHz - - 1024 Kb + - 4096 Kb - 80 Kb * - ``sparkfun_digitalsandbox`` @@ -1756,6 +1828,20 @@ Teensy - 256 Kb - 64 Kb + * - ``teensy35`` + - `Teensy 3.5 `_ + - MK64FX512 + - 120 MHz + - 512 Kb + - 192 Kb + + * - ``teensy36`` + - `Teensy 3.6 `_ + - MK66FX1M0 + - 180 MHz + - 1024 Kb + - 256 Kb + * - ``teensylc`` - `Teensy LC `_ - MKL26Z64 diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index fb45d9a6..7a408511 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -170,6 +170,26 @@ Delta - 256 Kb - 32 Kb +Elektor Labs +~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``elektor_cocorico`` + - `CoCo-ri-Co! `_ + - LPC812 + - 30 MHz + - 16 Kb + - 4 Kb + Embedded Artists ~~~~~~~~~~~~~~~~ @@ -184,7 +204,7 @@ Embedded Artists - RAM * - ``lpc11u35`` - - `Embedded Artists LPC11U35 QuickStart Board `_ + - `EA LPC11U35 QuickStart Board `_ - LPC11U35 - 48 MHz - 64 Kb @@ -259,6 +279,27 @@ Freescale - 128 Kb - 16 Kb + * - ``frdm_kl26z`` + - `Freescale Kinetis FRDM-KL26Z `_ + - MKL26Z128VLH4 + - 48 MHz + - 128 Kb + - 16 Kb + + * - ``frdm_kl27z`` + - `Freescale Kinetis FRDM-KL27Z `_ + - MKL27Z64VLH4 + - 48 MHz + - 64 Kb + - 16 Kb + + * - ``frdm_kl43z`` + - `Freescale Kinetis FRDM-KL43Z `_ + - MKL43Z256VLH4 + - 48 MHz + - 256 Kb + - 32 Kb + * - ``frdm_kl46z`` - `Freescale Kinetis FRDM-KL46Z `_ - MKL46Z256VLL4 @@ -266,6 +307,26 @@ Freescale - 256 Kb - 32 Kb +GHI Electronics +~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``oc_mbuino`` + - `mBuino `_ + - LPC11U24 + - 50 MHz + - 32 Kb + - 10 Kb + Generic ~~~~~~~ @@ -299,13 +360,53 @@ JKSoft - Flash - RAM - * - ``wallBotBLE`` + * - ``wallbot_ble`` - `JKSoft Wallbot BLE `_ - NRF51822 - 16 MHz - 128 Kb - 16 Kb +Micromint +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc4330_m4`` + - `Bambino-210E `_ + - LPC4330 + - 204 MHz + - 8192 Kb + - 264 Kb + +MikroElektronika +~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``hexiwear`` + - `Hexiwear `_ + - MK64FN1M0VDC12 + - 120 MHz + - 1024 Kb + - 256 Kb + MultiTech ~~~~~~~~~ @@ -319,6 +420,13 @@ MultiTech - Flash - RAM + * - ``mts_mdot_f405rg`` + - `MultiTech mDot `_ + - STM32F411RET6 + - 100 MHz + - 512 Kb + - 128 Kb + * - ``mts_mdot_f411re`` - `MultiTech mDot F411 `_ - STM32F411RET6 @@ -359,6 +467,13 @@ NXP - Flash - RAM + * - ``lpc11c24`` + - `NXP LPC11C24 `_ + - LPC11C24 + - 48 MHz + - 32 Kb + - 8 Kb + * - ``lpc11u24`` - `NXP mbed LPC11U24 `_ - LPC11U24 @@ -366,6 +481,34 @@ NXP - 32 Kb - 8 Kb + * - ``lpc11u24_301`` + - `ARM mbed LPC11U24 (+CAN) `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + + * - ``lpc11u34_421`` + - `NXP LPC11U34 `_ + - LPC11U34 + - 48 MHz + - 64 Kb + - 8 Kb + + * - ``lpc11u37_501`` + - `NXP LPC11U37 `_ + - LPC11U37 + - 48 MHz + - 128 Kb + - 10 Kb + + * - ``lpc11u68`` + - `LPCXpresso11U68 `_ + - LPC11U68 + - 50 MHz + - 256 Kb + - 36 Kb + * - ``lpc1549`` - `NXP LPCXpresso1549 `_ - LPC1549 @@ -380,6 +523,41 @@ NXP - 512 Kb - 64 Kb + * - ``lpc2368`` + - `NXP LPC2368 `_ + - LPC2368 + - 72 MHz + - 512 Kb + - 58 Kb + + * - ``lpc2460`` + - `NXP LPC2460 `_ + - LPC2460 + - 72 MHz + - 64 Kb + - 16 Kb + + * - ``lpc812`` + - `NXP LPC800-MAX `_ + - LPC812 + - 30 MHz + - 16 Kb + - 4 Kb + + * - ``lpc824`` + - `LPCXpresso824-MAX `_ + - LPC824 + - 30 MHz + - 32 Kb + - 8 Kb + + * - ``micronfcboard`` + - `MicroNFCBoard `_ + - LPC11U34 + - 48 MHz + - 64 Kb + - 10 Kb + Nordic ~~~~~~ @@ -530,6 +708,13 @@ ST - 1024 Kb - 384 Kb + * - ``disco_f746ng`` + - `ST 32F746GDISCOVERY `_ + - STM32F746NGH6 + - 216 MHz + - 1024 Kb + - 320 Kb + * - ``disco_l053c8`` - `ST 32L0538DISCOVERY `_ - STM32L053C8T6 @@ -593,6 +778,13 @@ ST - 128 Kb - 20 Kb + * - ``nucleo_f207zg`` + - `ST Nucleo F207ZG `_ + - STM32F207ZGT6 + - 120 MHz + - 1024 Kb + - 128 Kb + * - ``nucleo_f302r8`` - `ST Nucleo F302R8 `_ - STM32F302R8T6 @@ -642,6 +834,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_f429zi`` + - `ST Nucleo F429ZI `_ + - STM32F429ZIT6 + - 180 MHz + - 2048 Kb + - 256 Kb + * - ``nucleo_f446re`` - `ST Nucleo F446RE `_ - STM32F446RET6 @@ -649,6 +848,34 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_f446ze`` + - `ST Nucleo F446ZE `_ + - STM32F446ZET6 + - 180 MHz + - 512 Kb + - 128 Kb + + * - ``nucleo_f746zg`` + - `ST Nucleo F746ZG `_ + - STM32F746ZGT6 + - 216 MHz + - 1024 Kb + - 320 Kb + + * - ``nucleo_f767zi`` + - `ST Nucleo F767ZI `_ + - STM32F746ZGT6 + - 216 MHz + - 2048 Kb + - 512 Kb + + * - ``nucleo_l011k4`` + - `ST Nucleo L011K4 `_ + - STM32L011K4T6 + - 32 MHz + - 16 Kb + - 2 Kb + * - ``nucleo_l031k6`` - `ST Nucleo L031K6 `_ - STM32L031K6T6 @@ -677,6 +904,13 @@ ST - 512 Kb - 80 Kb + * - ``nucleo_l432kc`` + - `ST Nucleo L432KC `_ + - STM32L432KCU6 + - 80 MHz + - 256 Kb + - 64 Kb + * - ``nucleo_l476rg`` - `ST Nucleo L476RG `_ - STM32L476RGT6 @@ -697,27 +931,55 @@ SeeedStudio - Flash - RAM - * - ``seeedArchMax`` - - `SeeedStudio Arch Max `_ - - STM32F407VET6 - - 168 MHz - - 512 Kb - - 192 Kb + * - ``seeedArchBLE`` + - `Seeed Arch BLE `_ + - NRF51822 + - 16 MHz + - 128 Kb + - 16 Kb - * - ``seeedTinyBLE`` - - `SeeedStudio Seeed Tiny BLE `_ + * - ``seeedArchGPRS`` + - `Seeed Arch GPRS V2 `_ + - LPC11U37 + - 48 MHz + - 128 Kb + - 10 Kb + + * - ``seeedArchLink`` + - `Seeed Arch Link `_ - NRF51822 - 16 MHz - 256 Kb - 16 Kb - * - ``seeeduinoArchPro`` - - `SeeedStudio Seeeduino-Arch-Pro `_ + * - ``seeedArchMax`` + - `Seeed Arch Max `_ + - STM32F407VET6 + - 168 MHz + - 512 Kb + - 192 Kb + + * - ``seeedArchPro`` + - `Seeed Arch Pro `_ - LPC1768 - 96 MHz - 512 Kb - 64 Kb + * - ``seeedTinyBLE`` + - `Seeed Tiny BLE `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + + * - ``xadow_m0`` + - `Seeed Xadow M0 `_ + - LPC11U35 + - 48 MHz + - 64 Kb + - 10 Kb + Silicon Labs ~~~~~~~~~~~~ @@ -773,6 +1035,26 @@ Silicon Labs - 32 Kb - 4 Kb +Smeshlink +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``xbed_lpc1768`` + - `Smeshlink xbed LPC1768 `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + Solder Splash Labs ~~~~~~~~~~~~~~~~~~ @@ -793,6 +1075,26 @@ Solder Splash Labs - 32 Kb - 8 Kb +SolderSplash Labs +~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc1347`` + - `DipCortex M3 `_ + - LPC1347 + - 72 MHz + - 64 Kb + - 12 Kb + Switch Science ~~~~~~~~~~~~~~ @@ -820,6 +1122,20 @@ Switch Science - 32 Kb - 4 Kb + * - ``ssci824`` + - `Switch Science mbed LPC824 `_ + - LPC824 + - 30 MHz + - 32 Kb + - 8 Kb + + * - ``ty51822r3`` + - `Switch Science mbed TY51822r3 `_ + - NRF51822 + - 32 MHz + - 256 Kb + - 32 Kb + Teensy ~~~~~~ @@ -860,4 +1176,24 @@ u-blox - 512 Kb - 64 Kb +y5 design +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``nrf51822_y5_mbug`` + - `y5 nRF51822 mbug `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + .. include:: mbed_extra.rst diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 88d545f0..798dfd6f 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -40,9 +40,6 @@ Packages * - ``tool-micronucleus`` - `Micronucleus `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-atmelavr`` - `avr-gcc `_, `GDB `_, `AVaRICE `_, `SimulAVR `_ diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index a73ab057..e4bf5842 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -46,9 +46,6 @@ Packages * - ``tool-openocd`` - `OpenOCD `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gccarmnoneeabi`` - `gcc-arm-embedded `_, `GDB `_ diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 44fe48f0..5118fcd1 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.rst @@ -74,6 +74,9 @@ Packages * - ``framework-arduinosam`` - `Arduino Wiring-based Framework (SAM Core, 1.6) `_ + * - ``framework-arduinoststm32`` + - `Arduino Wiring-based Framework (STM32 Core) `_ + * - ``framework-arduinoteensy`` - `Arduino Wiring-based Framework `_ diff --git a/docs/platforms/embedded_boards.rst b/docs/platforms/embedded_boards.rst index 7c41f96d..15ca4a6b 100644 --- a/docs/platforms/embedded_boards.rst +++ b/docs/platforms/embedded_boards.rst @@ -890,6 +890,26 @@ ESPino - 4096 Kb - 80 Kb +Elektor Labs +~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``elektor_cocorico`` + - `CoCo-ri-Co! `_ + - LPC812 + - 30 MHz + - 16 Kb + - 4 Kb + Embedded Artists ~~~~~~~~~~~~~~~~ @@ -904,7 +924,7 @@ Embedded Artists - RAM * - ``lpc11u35`` - - `Embedded Artists LPC11U35 QuickStart Board `_ + - `EA LPC11U35 QuickStart Board `_ - LPC11U35 - 48 MHz - 64 Kb @@ -1011,7 +1031,7 @@ Espressif - ESP8266 - 80 MHz - 4096 Kb - - 50 Kb + - 80 Kb * - ``phoenix_v1`` - `Phoenix 1.0 `_ @@ -1089,6 +1109,27 @@ Freescale - 128 Kb - 16 Kb + * - ``frdm_kl26z`` + - `Freescale Kinetis FRDM-KL26Z `_ + - MKL26Z128VLH4 + - 48 MHz + - 128 Kb + - 16 Kb + + * - ``frdm_kl27z`` + - `Freescale Kinetis FRDM-KL27Z `_ + - MKL27Z64VLH4 + - 48 MHz + - 64 Kb + - 16 Kb + + * - ``frdm_kl43z`` + - `Freescale Kinetis FRDM-KL43Z `_ + - MKL43Z256VLH4 + - 48 MHz + - 256 Kb + - 32 Kb + * - ``frdm_kl46z`` - `Freescale Kinetis FRDM-KL46Z `_ - MKL46Z256VLL4 @@ -1123,6 +1164,26 @@ Fubarino - 512 Kb - 128 Kb +GHI Electronics +~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``oc_mbuino`` + - `mBuino `_ + - LPC11U24 + - 50 MHz + - 32 Kb + - 10 Kb + Generic ~~~~~~~ @@ -1143,6 +1204,48 @@ Generic - 64 Kb - 20 Kb + * - ``genericSTM32F103C8`` + - `STM32F103C8 (20k RAM. 64k Flash) `_ + - STM32F103C8 + - 72 MHz + - 64 Kb + - 20 Kb + + * - ``genericSTM32F103CB`` + - `STM32F103CB (20k RAM. 128k Flash) `_ + - STM32F103CB + - 72 MHz + - 128 Kb + - 20 Kb + + * - ``genericSTM32F103R8`` + - `STM32F103R8 (20k RAM. 64 Flash) `_ + - STM32F103R8 + - 72 MHz + - 64 Kb + - 20 Kb + + * - ``genericSTM32F103RB`` + - `STM32F103RB (20k RAM. 128k Flash) `_ + - STM32F103RB + - 72 MHz + - 128 Kb + - 20 Kb + + * - ``genericSTM32F103RC`` + - `STM32F103RC (48k RAM. 256k Flash) `_ + - STM32F103RC + - 72 MHz + - 256 Kb + - 48 Kb + + * - ``genericSTM32F103RE`` + - `STM32F103RE (64k RAM. 512k Flash) `_ + - STM32F103RE + - 72 MHz + - 512 Kb + - 64 Kb + Generic ATTiny ~~~~~~~~~~~~~~ @@ -1238,7 +1341,7 @@ JKSoft - Flash - RAM - * - ``wallBotBLE`` + * - ``wallbot_ble`` - `JKSoft Wallbot BLE `_ - NRF51822 - 16 MHz @@ -1470,6 +1573,46 @@ Microduino - 64 Kb - 4 Kb +Micromint +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc4330_m4`` + - `Bambino-210E `_ + - LPC4330 + - 204 MHz + - 8192 Kb + - 264 Kb + +MikroElektronika +~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``hexiwear`` + - `Hexiwear `_ + - MK64FN1M0VDC12 + - 120 MHz + - 1024 Kb + - 256 Kb + MultiTech ~~~~~~~~~ @@ -1483,6 +1626,13 @@ MultiTech - Flash - RAM + * - ``mts_mdot_f405rg`` + - `MultiTech mDot `_ + - STM32F411RET6 + - 100 MHz + - 512 Kb + - 128 Kb + * - ``mts_mdot_f411re`` - `MultiTech mDot F411 `_ - STM32F411RET6 @@ -1523,6 +1673,13 @@ NXP - Flash - RAM + * - ``lpc11c24`` + - `NXP LPC11C24 `_ + - LPC11C24 + - 48 MHz + - 32 Kb + - 8 Kb + * - ``lpc11u24`` - `NXP mbed LPC11U24 `_ - LPC11U24 @@ -1530,6 +1687,34 @@ NXP - 32 Kb - 8 Kb + * - ``lpc11u24_301`` + - `ARM mbed LPC11U24 (+CAN) `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + + * - ``lpc11u34_421`` + - `NXP LPC11U34 `_ + - LPC11U34 + - 48 MHz + - 64 Kb + - 8 Kb + + * - ``lpc11u37_501`` + - `NXP LPC11U37 `_ + - LPC11U37 + - 48 MHz + - 128 Kb + - 10 Kb + + * - ``lpc11u68`` + - `LPCXpresso11U68 `_ + - LPC11U68 + - 50 MHz + - 256 Kb + - 36 Kb + * - ``lpc1549`` - `NXP LPCXpresso1549 `_ - LPC1549 @@ -1544,6 +1729,41 @@ NXP - 512 Kb - 64 Kb + * - ``lpc2368`` + - `NXP LPC2368 `_ + - LPC2368 + - 72 MHz + - 512 Kb + - 58 Kb + + * - ``lpc2460`` + - `NXP LPC2460 `_ + - LPC2460 + - 72 MHz + - 64 Kb + - 16 Kb + + * - ``lpc812`` + - `NXP LPC800-MAX `_ + - LPC812 + - 30 MHz + - 16 Kb + - 4 Kb + + * - ``lpc824`` + - `LPCXpresso824-MAX `_ + - LPC824 + - 30 MHz + - 32 Kb + - 8 Kb + + * - ``micronfcboard`` + - `MicroNFCBoard `_ + - LPC11U34 + - 48 MHz + - 64 Kb + - 10 Kb + NodeMCU ~~~~~~~ @@ -1618,6 +1838,13 @@ Olimex - Flash - RAM + * - ``maple`` + - `Olimexino STM32 `_ + - STM32F103RB_MAPLE + - 72 MHz + - 128 Kb + - 16.6015625 Kb + * - ``modwifi`` - `Olimex MOD-WIFI-ESP8266(-DEV) `_ - ESP8266 @@ -1997,6 +2224,13 @@ ST - 1024 Kb - 384 Kb + * - ``disco_f746ng`` + - `ST 32F746GDISCOVERY `_ + - STM32F746NGH6 + - 216 MHz + - 1024 Kb + - 320 Kb + * - ``disco_l053c8`` - `ST 32L0538DISCOVERY `_ - STM32L053C8T6 @@ -2067,6 +2301,13 @@ ST - 128 Kb - 20 Kb + * - ``nucleo_f207zg`` + - `ST Nucleo F207ZG `_ + - STM32F207ZGT6 + - 120 MHz + - 1024 Kb + - 128 Kb + * - ``nucleo_f302r8`` - `ST Nucleo F302R8 `_ - STM32F302R8T6 @@ -2116,6 +2357,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_f429zi`` + - `ST Nucleo F429ZI `_ + - STM32F429ZIT6 + - 180 MHz + - 2048 Kb + - 256 Kb + * - ``nucleo_f446re`` - `ST Nucleo F446RE `_ - STM32F446RET6 @@ -2123,6 +2371,34 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_f446ze`` + - `ST Nucleo F446ZE `_ + - STM32F446ZET6 + - 180 MHz + - 512 Kb + - 128 Kb + + * - ``nucleo_f746zg`` + - `ST Nucleo F746ZG `_ + - STM32F746ZGT6 + - 216 MHz + - 1024 Kb + - 320 Kb + + * - ``nucleo_f767zi`` + - `ST Nucleo F767ZI `_ + - STM32F746ZGT6 + - 216 MHz + - 2048 Kb + - 512 Kb + + * - ``nucleo_l011k4`` + - `ST Nucleo L011K4 `_ + - STM32L011K4T6 + - 32 MHz + - 16 Kb + - 2 Kb + * - ``nucleo_l031k6`` - `ST Nucleo L031K6 `_ - STM32L031K6T6 @@ -2151,6 +2427,13 @@ ST - 512 Kb - 80 Kb + * - ``nucleo_l432kc`` + - `ST Nucleo L432KC `_ + - STM32L432KCU6 + - 80 MHz + - 256 Kb + - 64 Kb + * - ``nucleo_l476rg`` - `ST Nucleo L476RG `_ - STM32L476RGT6 @@ -2260,27 +2543,55 @@ SeeedStudio - 512 Kb - 128 Kb - * - ``seeedArchMax`` - - `SeeedStudio Arch Max `_ - - STM32F407VET6 - - 168 MHz - - 512 Kb - - 192 Kb + * - ``seeedArchBLE`` + - `Seeed Arch BLE `_ + - NRF51822 + - 16 MHz + - 128 Kb + - 16 Kb - * - ``seeedTinyBLE`` - - `SeeedStudio Seeed Tiny BLE `_ + * - ``seeedArchGPRS`` + - `Seeed Arch GPRS V2 `_ + - LPC11U37 + - 48 MHz + - 128 Kb + - 10 Kb + + * - ``seeedArchLink`` + - `Seeed Arch Link `_ - NRF51822 - 16 MHz - 256 Kb - 16 Kb - * - ``seeeduinoArchPro`` - - `SeeedStudio Seeeduino-Arch-Pro `_ + * - ``seeedArchMax`` + - `Seeed Arch Max `_ + - STM32F407VET6 + - 168 MHz + - 512 Kb + - 192 Kb + + * - ``seeedArchPro`` + - `Seeed Arch Pro `_ - LPC1768 - 96 MHz - 512 Kb - 64 Kb + * - ``seeedTinyBLE`` + - `Seeed Tiny BLE `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + + * - ``xadow_m0`` + - `Seeed Xadow M0 `_ + - LPC11U35 + - 48 MHz + - 64 Kb + - 10 Kb + Silicon Labs ~~~~~~~~~~~~ @@ -2336,6 +2647,26 @@ Silicon Labs - 32 Kb - 4 Kb +Smeshlink +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``xbed_lpc1768`` + - `Smeshlink xbed LPC1768 `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + Solder Splash Labs ~~~~~~~~~~~~~~~~~~ @@ -2356,6 +2687,26 @@ Solder Splash Labs - 32 Kb - 8 Kb +SolderSplash Labs +~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc1347`` + - `DipCortex M3 `_ + - LPC1347 + - 72 MHz + - 64 Kb + - 12 Kb + SparkFun ~~~~~~~~ @@ -2373,7 +2724,7 @@ SparkFun - `SparkFun Blynk Board `_ - ESP8266 - 80 MHz - - 1024 Kb + - 4096 Kb - 80 Kb * - ``sparkfun_digitalsandbox`` @@ -2521,6 +2872,20 @@ Switch Science - 32 Kb - 4 Kb + * - ``ssci824`` + - `Switch Science mbed LPC824 `_ + - LPC824 + - 30 MHz + - 32 Kb + - 8 Kb + + * - ``ty51822r3`` + - `Switch Science mbed TY51822r3 `_ + - NRF51822 + - 32 MHz + - 256 Kb + - 32 Kb + TI ~~ @@ -2659,6 +3024,20 @@ Teensy - 256 Kb - 64 Kb + * - ``teensy35`` + - `Teensy 3.5 `_ + - MK64FX512 + - 120 MHz + - 512 Kb + - 192 Kb + + * - ``teensy36`` + - `Teensy 3.6 `_ + - MK66FX1M0 + - 180 MHz + - 1024 Kb + - 256 Kb + * - ``teensylc`` - `Teensy LC `_ - MKL26Z64 @@ -2873,3 +3252,23 @@ ubIQio - 16 MHz - 32 Kb - 2 Kb + +y5 design +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``nrf51822_y5_mbug`` + - `y5 nRF51822 mbug `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb diff --git a/docs/platforms/espressif8266.rst b/docs/platforms/espressif8266.rst index 3aaaa249..53d6214b 100644 --- a/docs/platforms/espressif8266.rst +++ b/docs/platforms/espressif8266.rst @@ -43,9 +43,6 @@ Packages * - ``tool-mkspiffs`` - `Tool to build and unpack SPIFFS images `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-xtensa`` - `xtensa-gcc `_, `GDB `_ @@ -222,7 +219,7 @@ Espressif - ESP8266 - 80 MHz - 4096 Kb - - 50 Kb + - 80 Kb * - ``phoenix_v1`` - `Phoenix 1.0 `_ @@ -309,7 +306,7 @@ SparkFun - `SparkFun Blynk Board `_ - ESP8266 - 80 MHz - - 1024 Kb + - 4096 Kb - 80 Kb * - ``thing`` diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index 29323287..494e8527 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -31,9 +31,6 @@ Packages * - ``framework-mbed`` - `mbed Framework `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gccarmnoneeabi`` - `gcc-arm-embedded `_, `GDB `_ @@ -122,9 +119,50 @@ Freescale - 128 Kb - 16 Kb + * - ``frdm_kl26z`` + - `Freescale Kinetis FRDM-KL26Z `_ + - MKL26Z128VLH4 + - 48 MHz + - 128 Kb + - 16 Kb + + * - ``frdm_kl27z`` + - `Freescale Kinetis FRDM-KL27Z `_ + - MKL27Z64VLH4 + - 48 MHz + - 64 Kb + - 16 Kb + + * - ``frdm_kl43z`` + - `Freescale Kinetis FRDM-KL43Z `_ + - MKL43Z256VLH4 + - 48 MHz + - 256 Kb + - 32 Kb + * - ``frdm_kl46z`` - `Freescale Kinetis FRDM-KL46Z `_ - MKL46Z256VLL4 - 48 MHz - 256 Kb - 32 Kb + +MikroElektronika +~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``hexiwear`` + - `Hexiwear `_ + - MK64FN1M0VDC12 + - 120 MHz + - 1024 Kb + - 256 Kb diff --git a/docs/platforms/intel_arc32.rst b/docs/platforms/intel_arc32.rst index dbfe8f16..3127fd76 100644 --- a/docs/platforms/intel_arc32.rst +++ b/docs/platforms/intel_arc32.rst @@ -34,9 +34,6 @@ Packages * - ``tool-arduino101load`` - `Genuino101 uploader `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-intelarc32`` - `GCC for Intel ARC `_ diff --git a/docs/platforms/lattice_ice40.rst b/docs/platforms/lattice_ice40.rst index d4e60376..fd54c760 100644 --- a/docs/platforms/lattice_ice40.rst +++ b/docs/platforms/lattice_ice40.rst @@ -28,9 +28,6 @@ Packages * - Name - Contents - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-icestorm`` - `GCC for FPGA IceStorm `_ diff --git a/docs/platforms/linux_arm.rst b/docs/platforms/linux_arm.rst index 1e01001d..0b69a2d3 100644 --- a/docs/platforms/linux_arm.rst +++ b/docs/platforms/linux_arm.rst @@ -31,9 +31,6 @@ Packages * - ``framework-wiringpi`` - `GPIO Interface library for the Raspberry Pi `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gccarmlinuxgnueabi`` - `GCC for Linux ARM GNU EABI `_, `GDB `_ diff --git a/docs/platforms/linux_i686.rst b/docs/platforms/linux_i686.rst index 386c8dd5..fb1f3dd7 100644 --- a/docs/platforms/linux_i686.rst +++ b/docs/platforms/linux_i686.rst @@ -28,8 +28,5 @@ Packages * - Name - Contents - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gcclinux32`` - `GCC for Linux i686 `_ \ No newline at end of file diff --git a/docs/platforms/linux_x86_64.rst b/docs/platforms/linux_x86_64.rst index 91068819..425f0e41 100644 --- a/docs/platforms/linux_x86_64.rst +++ b/docs/platforms/linux_x86_64.rst @@ -28,8 +28,5 @@ Packages * - Name - Contents - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gcclinux64`` - `GCC for Linux x86_64 `_ \ No newline at end of file diff --git a/docs/platforms/microchippic32.rst b/docs/platforms/microchippic32.rst index 91269d85..8d4cf12d 100644 --- a/docs/platforms/microchippic32.rst +++ b/docs/platforms/microchippic32.rst @@ -34,9 +34,6 @@ Packages * - ``tool-pic32prog`` - `pic32prog `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-microchippic32`` - `GCC for Microchip PIC32 `_ diff --git a/docs/platforms/native.rst b/docs/platforms/native.rst index a6794951..a4174222 100644 --- a/docs/platforms/native.rst +++ b/docs/platforms/native.rst @@ -17,16 +17,4 @@ Native development platform is intended to be used for desktop OS. This platform For more detailed information please visit `vendor site `_. -.. contents:: - -Packages --------- - -.. list-table:: - :header-rows: 1 - - * - Name - - Contents - - * - ``tool-scons`` - - `SCons software construction tool `_ \ No newline at end of file +.. contents:: \ No newline at end of file diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index b7f8c8d9..683bdebe 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -37,9 +37,6 @@ Packages * - ``tool-rfdloader`` - `rfdloader `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``tool-sreccat`` - `Merging tool `_ @@ -132,7 +129,7 @@ JKSoft - Flash - RAM - * - ``wallBotBLE`` + * - ``wallbot_ble`` - `JKSoft Wallbot BLE `_ - NRF51822 - 16 MHz @@ -233,8 +230,22 @@ SeeedStudio - Flash - RAM + * - ``seeedArchBLE`` + - `Seeed Arch BLE `_ + - NRF51822 + - 16 MHz + - 128 Kb + - 16 Kb + + * - ``seeedArchLink`` + - `Seeed Arch Link `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + * - ``seeedTinyBLE`` - - `SeeedStudio Seeed Tiny BLE `_ + - `Seeed Tiny BLE `_ - NRF51822 - 16 MHz - 256 Kb @@ -260,4 +271,31 @@ Switch Science - 256 Kb - 16 Kb + * - ``ty51822r3`` + - `Switch Science mbed TY51822r3 `_ + - NRF51822 + - 32 MHz + - 256 Kb + - 32 Kb + +y5 design +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``nrf51822_y5_mbug`` + - `y5 nRF51822 mbug `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + .. include:: nordicnrf51_extra.rst diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index 3b76506c..e9a4764e 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -31,9 +31,6 @@ Packages * - ``framework-mbed`` - `mbed Framework `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gccarmnoneeabi`` - `gcc-arm-embedded `_, `GDB `_ @@ -87,6 +84,26 @@ CQ Publishing - 64 Kb - 10 Kb +Elektor Labs +~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``elektor_cocorico`` + - `CoCo-ri-Co! `_ + - LPC812 + - 30 MHz + - 16 Kb + - 4 Kb + Embedded Artists ~~~~~~~~~~~~~~~~ @@ -101,7 +118,7 @@ Embedded Artists - RAM * - ``lpc11u35`` - - `Embedded Artists LPC11U35 QuickStart Board `_ + - `EA LPC11U35 QuickStart Board `_ - LPC11U35 - 48 MHz - 64 Kb @@ -121,6 +138,46 @@ Embedded Artists - 512 Kb - 96 Kb +GHI Electronics +~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``oc_mbuino`` + - `mBuino `_ + - LPC11U24 + - 50 MHz + - 32 Kb + - 10 Kb + +Micromint +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc4330_m4`` + - `Bambino-210E `_ + - LPC4330 + - 204 MHz + - 8192 Kb + - 264 Kb + NGX Technologies ~~~~~~~~~~~~~~~~ @@ -154,6 +211,13 @@ NXP - Flash - RAM + * - ``lpc11c24`` + - `NXP LPC11C24 `_ + - LPC11C24 + - 48 MHz + - 32 Kb + - 8 Kb + * - ``lpc11u24`` - `NXP mbed LPC11U24 `_ - LPC11U24 @@ -161,6 +225,34 @@ NXP - 32 Kb - 8 Kb + * - ``lpc11u24_301`` + - `ARM mbed LPC11U24 (+CAN) `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + + * - ``lpc11u34_421`` + - `NXP LPC11U34 `_ + - LPC11U34 + - 48 MHz + - 64 Kb + - 8 Kb + + * - ``lpc11u37_501`` + - `NXP LPC11U37 `_ + - LPC11U37 + - 48 MHz + - 128 Kb + - 10 Kb + + * - ``lpc11u68`` + - `LPCXpresso11U68 `_ + - LPC11U68 + - 50 MHz + - 256 Kb + - 36 Kb + * - ``lpc1549`` - `NXP LPCXpresso1549 `_ - LPC1549 @@ -175,6 +267,41 @@ NXP - 512 Kb - 64 Kb + * - ``lpc2368`` + - `NXP LPC2368 `_ + - LPC2368 + - 72 MHz + - 512 Kb + - 58 Kb + + * - ``lpc2460`` + - `NXP LPC2460 `_ + - LPC2460 + - 72 MHz + - 64 Kb + - 16 Kb + + * - ``lpc812`` + - `NXP LPC800-MAX `_ + - LPC812 + - 30 MHz + - 16 Kb + - 4 Kb + + * - ``lpc824`` + - `LPCXpresso824-MAX `_ + - LPC824 + - 30 MHz + - 32 Kb + - 8 Kb + + * - ``micronfcboard`` + - `MicroNFCBoard `_ + - LPC11U34 + - 48 MHz + - 64 Kb + - 10 Kb + Outrageous Circuits ~~~~~~~~~~~~~~~~~~~ @@ -208,13 +335,47 @@ SeeedStudio - Flash - RAM - * - ``seeeduinoArchPro`` - - `SeeedStudio Seeeduino-Arch-Pro `_ + * - ``seeedArchGPRS`` + - `Seeed Arch GPRS V2 `_ + - LPC11U37 + - 48 MHz + - 128 Kb + - 10 Kb + + * - ``seeedArchPro`` + - `Seeed Arch Pro `_ - LPC1768 - 96 MHz - 512 Kb - 64 Kb + * - ``xadow_m0`` + - `Seeed Xadow M0 `_ + - LPC11U35 + - 48 MHz + - 64 Kb + - 10 Kb + +Smeshlink +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``xbed_lpc1768`` + - `Smeshlink xbed LPC1768 `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + Solder Splash Labs ~~~~~~~~~~~~~~~~~~ @@ -235,6 +396,26 @@ Solder Splash Labs - 32 Kb - 8 Kb +SolderSplash Labs +~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc1347`` + - `DipCortex M3 `_ + - LPC1347 + - 72 MHz + - 64 Kb + - 12 Kb + Switch Science ~~~~~~~~~~~~~~ @@ -255,6 +436,13 @@ Switch Science - 32 Kb - 4 Kb + * - ``ssci824`` + - `Switch Science mbed LPC824 `_ + - LPC824 + - 30 MHz + - 32 Kb + - 8 Kb + u-blox ~~~~~~ diff --git a/docs/platforms/siliconlabsefm32.rst b/docs/platforms/siliconlabsefm32.rst index ac92c554..c1ccc8a5 100644 --- a/docs/platforms/siliconlabsefm32.rst +++ b/docs/platforms/siliconlabsefm32.rst @@ -31,9 +31,6 @@ Packages * - ``framework-mbed`` - `mbed Framework `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gccarmnoneeabi`` - `gcc-arm-embedded `_, `GDB `_ diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index d66e1f71..3c21951e 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -28,6 +28,9 @@ Packages * - Name - Contents + * - ``framework-arduinoststm32`` + - `Arduino Wiring-based Framework (STM32 Core) `_ + * - ``framework-cmsis`` - `Vendor-independent hardware abstraction layer for the Cortex-M processor series `_ @@ -40,9 +43,6 @@ Packages * - ``framework-spl`` - `Standard Peripheral Library for STM32 MCUs `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``tool-stlink`` - `ST-Link `_ @@ -67,6 +67,9 @@ Frameworks * - Name - Description + * - :ref:`framework_arduino` + - Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. + * - :ref:`framework_cmsis` - The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and simple software interfaces to the processor for interface peripherals, real-time operating systems, and middleware. It simplifies software re-use, reducing the learning curve for new microcontroller developers and cutting the time-to-market for devices. @@ -162,6 +165,48 @@ Generic - 64 Kb - 20 Kb + * - ``genericSTM32F103C8`` + - `STM32F103C8 (20k RAM. 64k Flash) `_ + - STM32F103C8 + - 72 MHz + - 64 Kb + - 20 Kb + + * - ``genericSTM32F103CB`` + - `STM32F103CB (20k RAM. 128k Flash) `_ + - STM32F103CB + - 72 MHz + - 128 Kb + - 20 Kb + + * - ``genericSTM32F103R8`` + - `STM32F103R8 (20k RAM. 64 Flash) `_ + - STM32F103R8 + - 72 MHz + - 64 Kb + - 20 Kb + + * - ``genericSTM32F103RB`` + - `STM32F103RB (20k RAM. 128k Flash) `_ + - STM32F103RB + - 72 MHz + - 128 Kb + - 20 Kb + + * - ``genericSTM32F103RC`` + - `STM32F103RC (48k RAM. 256k Flash) `_ + - STM32F103RC + - 72 MHz + - 256 Kb + - 48 Kb + + * - ``genericSTM32F103RE`` + - `STM32F103RE (64k RAM. 512k Flash) `_ + - STM32F103RE + - 72 MHz + - 512 Kb + - 64 Kb + MultiTech ~~~~~~~~~ @@ -175,6 +220,13 @@ MultiTech - Flash - RAM + * - ``mts_mdot_f405rg`` + - `MultiTech mDot `_ + - STM32F411RET6 + - 100 MHz + - 512 Kb + - 128 Kb + * - ``mts_mdot_f411re`` - `MultiTech mDot F411 `_ - STM32F411RET6 @@ -182,6 +234,26 @@ MultiTech - 512 Kb - 128 Kb +Olimex +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``maple`` + - `Olimexino STM32 `_ + - STM32F103RB_MAPLE + - 72 MHz + - 128 Kb + - 16.6015625 Kb + ST ~~ @@ -251,6 +323,13 @@ ST - 1024 Kb - 384 Kb + * - ``disco_f746ng`` + - `ST 32F746GDISCOVERY `_ + - STM32F746NGH6 + - 216 MHz + - 1024 Kb + - 320 Kb + * - ``disco_l053c8`` - `ST 32L0538DISCOVERY `_ - STM32L053C8T6 @@ -321,6 +400,13 @@ ST - 128 Kb - 20 Kb + * - ``nucleo_f207zg`` + - `ST Nucleo F207ZG `_ + - STM32F207ZGT6 + - 120 MHz + - 1024 Kb + - 128 Kb + * - ``nucleo_f302r8`` - `ST Nucleo F302R8 `_ - STM32F302R8T6 @@ -370,6 +456,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_f429zi`` + - `ST Nucleo F429ZI `_ + - STM32F429ZIT6 + - 180 MHz + - 2048 Kb + - 256 Kb + * - ``nucleo_f446re`` - `ST Nucleo F446RE `_ - STM32F446RET6 @@ -377,6 +470,34 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_f446ze`` + - `ST Nucleo F446ZE `_ + - STM32F446ZET6 + - 180 MHz + - 512 Kb + - 128 Kb + + * - ``nucleo_f746zg`` + - `ST Nucleo F746ZG `_ + - STM32F746ZGT6 + - 216 MHz + - 1024 Kb + - 320 Kb + + * - ``nucleo_f767zi`` + - `ST Nucleo F767ZI `_ + - STM32F746ZGT6 + - 216 MHz + - 2048 Kb + - 512 Kb + + * - ``nucleo_l011k4`` + - `ST Nucleo L011K4 `_ + - STM32L011K4T6 + - 32 MHz + - 16 Kb + - 2 Kb + * - ``nucleo_l031k6`` - `ST Nucleo L031K6 `_ - STM32L031K6T6 @@ -405,6 +526,13 @@ ST - 512 Kb - 80 Kb + * - ``nucleo_l432kc`` + - `ST Nucleo L432KC `_ + - STM32L432KCU6 + - 80 MHz + - 256 Kb + - 64 Kb + * - ``nucleo_l476rg`` - `ST Nucleo L476RG `_ - STM32L476RGT6 @@ -426,7 +554,7 @@ SeeedStudio - RAM * - ``seeedArchMax`` - - `SeeedStudio Arch Max `_ + - `Seeed Arch Max `_ - STM32F407VET6 - 168 MHz - 512 Kb diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index ef95fc5b..03bc41c9 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -34,9 +34,6 @@ Packages * - ``framework-mbed`` - `mbed Framework `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``tool-teensy`` - `Teensy Loader `_ @@ -123,6 +120,20 @@ Teensy - 256 Kb - 64 Kb + * - ``teensy35`` + - `Teensy 3.5 `_ + - MK64FX512 + - 120 MHz + - 512 Kb + - 192 Kb + + * - ``teensy36`` + - `Teensy 3.6 `_ + - MK66FX1M0 + - 180 MHz + - 1024 Kb + - 256 Kb + * - ``teensylc`` - `Teensy LC `_ - MKL26Z64 diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index 2218f8c8..91ab1e8b 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -37,9 +37,6 @@ Packages * - ``tool-mspdebug`` - `MSPDebug `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-timsp430`` - `msp-gcc `_, `GDB `_ diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index 2dae6a51..ff67ab16 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -37,9 +37,6 @@ Packages * - ``tool-lm4flash`` - `Flash Programmer `_ - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gccarmnoneeabi`` - `gcc-arm-embedded `_, `GDB `_ diff --git a/docs/platforms/windows_x86.rst b/docs/platforms/windows_x86.rst index a35f48d6..690c955b 100644 --- a/docs/platforms/windows_x86.rst +++ b/docs/platforms/windows_x86.rst @@ -28,8 +28,5 @@ Packages * - Name - Contents - * - ``tool-scons`` - - `SCons software construction tool `_ - * - ``toolchain-gccmingw32`` - `MinGW `_ \ No newline at end of file diff --git a/scripts/docspregen.py b/scripts/docspregen.py index f977c49a..832e5291 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -95,7 +95,7 @@ Packages * - Name - Contents""") for name in sorted(packagenames): - assert name in API_PACKAGES + assert name in API_PACKAGES, name contitems = [ "`{name} <{url}>`_".format(**item) for item in API_PACKAGES[name] ] From 72b639061352cbe3565f8aeb442727f6548ce7b3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 17 Sep 2016 00:02:01 +0300 Subject: [PATCH 38/52] Minor updates --- .coveragerc | 5 ----- README.rst | 2 +- docs/ide/_platformio_ide_extra.rst | 4 ++-- docs/ide/atom.rst | 4 ++-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.coveragerc b/.coveragerc index 32d9f345..80716d3d 100644 --- a/.coveragerc +++ b/.coveragerc @@ -12,11 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -[run] -omit = - platformio/builder/* -source = platformio - [report] # Regexes for lines to exclude from consideration exclude_lines = diff --git a/README.rst b/README.rst index 0505c762..a5e512d5 100644 --- a/README.rst +++ b/README.rst @@ -18,7 +18,7 @@ PlatformIO .. image:: https://img.shields.io/pypi/l/platformio.svg :target: https://pypi.python.org/pypi/platformio/ :alt: License -.. image:: https://img.shields.io/community/PlatformIO.png +.. image:: https://img.shields.io/PlatformIO/Community.png :alt: Community Forums :target: https://community.platformio.org .. image:: https://img.shields.io/PlatformIO/Plus.png?color=orange diff --git a/docs/ide/_platformio_ide_extra.rst b/docs/ide/_platformio_ide_extra.rst index cf446adf..3b30d1d4 100644 --- a/docs/ide/_platformio_ide_extra.rst +++ b/docs/ide/_platformio_ide_extra.rst @@ -15,8 +15,8 @@ * Cross-platform build system without external dependencies to the OS software: - - 250+ embedded boards - - 20+ development platforms + - 300+ embedded boards + - 15+ development platforms - 10+ frameworks * C/C++ Intelligent code completion diff --git a/docs/ide/atom.rst b/docs/ide/atom.rst index dc907b24..e5d0de98 100644 --- a/docs/ide/atom.rst +++ b/docs/ide/atom.rst @@ -18,8 +18,8 @@ PlatformIO IDE is the next-generation integrated development environment for IoT * Cross-platform build system without external dependencies to the OS software: - - 250+ embedded boards - - 20+ development platforms + - 300+ embedded boards + - 15+ development platforms - 10+ frameworks * C/C++ Intelligent Code Completion From 7dc378bba791abc61ab48abd83b39d7330057811 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 17 Sep 2016 00:24:29 +0300 Subject: [PATCH 39/52] Update examples --- examples | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples b/examples index 2f79bc25..15e215e3 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 2f79bc25f8be67961ef3bb2da4ee47cb9a1cf18e +Subproject commit 15e215e33ea98a55a873af99de26275d9dca163d From e50327bccc3d26b7804cf1e49530437add510441 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 17 Sep 2016 16:32:16 +0300 Subject: [PATCH 40/52] Deprecate ``lib_force`` option, please use `lib_deps` instead --- HISTORY.rst | 1 + docs/librarymanager/ldf.rst | 1 - docs/projectconf.rst | 26 ++------------------------ platformio/__init__.py | 2 +- platformio/builder/main.py | 6 +++--- platformio/builder/tools/piolib.py | 7 +++++-- platformio/commands/run.py | 27 +++++++++++++-------------- platformio/exception.py | 4 +++- platformio/managers/lib.py | 11 ++++++++--- 9 files changed, 36 insertions(+), 49 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 67c4dd35..f722dea9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,6 +11,7 @@ PlatformIO 3.0 * Improved Project Generator when custom ``--project-option`` is passed to `platformio init `__ command +* Deprecated ``lib_force`` option, please use `lib_deps `__ instead * Fixed SSL Server-Name-Indication for Python < 2.7.9 * Return valid exit code from ``plaformio test`` command diff --git a/docs/librarymanager/ldf.rst b/docs/librarymanager/ldf.rst index ed56dc39..5399009f 100644 --- a/docs/librarymanager/ldf.rst +++ b/docs/librarymanager/ldf.rst @@ -32,7 +32,6 @@ Library Dependency Finder has controls that can be set up in :ref:`projectconf`: * :ref:`projectconf_lib_deps` * :ref:`projectconf_lib_extra_dirs` - * :ref:`projectconf_lib_force` * :ref:`projectconf_lib_ignore` * :ref:`projectconf_lib_compat_mode` * :ref:`projectconf_lib_ldf_mode` diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 832c2571..7c31c9f5 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -707,9 +707,11 @@ Multiple dependencies are allowed (multi-lines or separated with comma+space ", .. code-block:: ini + ; one line definition (comma + space) [env:myenv] lib_deps = LIBRARY_1, LIBRARY_2, LIBRARY_N + ; multi-line definition [env:myenv2] lib_deps = LIBRARY_1 @@ -732,30 +734,6 @@ Example: https://github.com/gioblu/PJON.git@v2.0 https://github.com/me-no-dev/ESPAsyncTCP.git -.. _projectconf_lib_force: - -``lib_force`` -^^^^^^^^^^^^^ - -.. seealso:: - Please make sure to read :ref:`ldf` guide first. - -Force Library Dependency Finder to depend on the specified library if it even -is not included in the project source code. Also, this library will be -processed in the first order. - -The correct value for this option is library name (not folder name). In the -most cases, library name is pre-defined in manifest file -(:ref:`library_config`, ``library.properties``, ``module.json``). The multiple -library names are allowed, split them with comma+space ", ". - -Example: - -.. code-block:: ini - - [env:myenv] - lib_force = OneWire, SPI - .. _projectconf_lib_ignore: ``lib_ignore`` diff --git a/platformio/__init__.py b/platformio/__init__.py index 32c14c03..5cd7d774 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 1, "0a2") +VERSION = (3, 1, "0a3") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 2da97908..d5361da1 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -46,8 +46,8 @@ commonvars.AddVariables( # library options ("LIB_LDF_MODE",), ("LIB_COMPAT_MODE",), + ("LIB_DEPS",), ("LIB_IGNORE",), - ("LIB_FORCE",), ("LIB_EXTRA_DIRS",), # board options @@ -121,10 +121,10 @@ for var in ("BUILD_FLAGS", "SRC_BUILD_FLAGS", "SRC_FILTER", "EXTRA_SCRIPT", env[var] = environ.get(k) # Parse comma separated items -for opt in ("LIB_IGNORE", "LIB_FORCE", "LIB_EXTRA_DIRS"): +for opt in ("LIB_DEPS", "LIB_IGNORE", "LIB_EXTRA_DIRS"): if opt not in env: continue - env[opt] = [l.strip() for l in env[opt].split(",") if l.strip()] + env[opt] = [l.strip() for l in env[opt].split(", ") if l.strip()] env.Prepend(LIBSOURCE_DIRS=env.get("LIB_EXTRA_DIRS", [])) env.LoadPioPlatform(commonvars) diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 989b1897..7283509f 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -331,9 +331,12 @@ class ProjectAsLibBuilder(LibBuilderBase): pass def search_deps_recursive(self, lib_builders, search_paths=None): - for lib_name in self.env.get("LIB_FORCE", []): + for dep in self.env.get("LIB_DEPS", []): + for token in ("@", "="): + if token in dep: + dep, _ = dep.split(token, 1) for lb in lib_builders: - if lb.name == lib_name: + if lb.name == dep: if lb not in self.depbuilders: self.depend_recursive(lb, lib_builders) break diff --git a/platformio/commands/run.py b/platformio/commands/run.py index fedf0225..a07e63b8 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -128,7 +128,7 @@ class EnvironmentProcessor(object): REMAPED_OPTIONS = {"framework": "pioframework", "platform": "pioplatform"} - RENAMED_OPTIONS = {"lib_use": "lib_force"} + RENAMED_OPTIONS = {"lib_use": "lib_deps", "lib_force": "lib_deps"} RENAMED_PLATFORMS = {"espressif": "espressif8266"} @@ -152,18 +152,15 @@ class EnvironmentProcessor(object): terminal_width, _ = click.get_terminal_size() start_time = time() - process_opts = [] + # multi-line values to one line for k, v in self.options.items(): if "\n" in v: - process_opts.append((k, ", ".join( - [s.strip() for s in v.split("\n") if s.strip()]))) - else: - process_opts.append((k, v)) + self.options[k] = self.options[k].strip().replace("\n", ", ") - click.echo("[%s] Processing %s (%s)" % - (datetime.now().strftime("%c"), click.style( - self.name, fg="cyan", bold=True), - ", ".join(["%s: %s" % opts for opts in process_opts]))) + click.echo("[%s] Processing %s (%s)" % ( + datetime.now().strftime("%c"), click.style( + self.name, fg="cyan", bold=True), + ", ".join(["%s: %s" % (k, v) for k, v in self.options.items()]))) click.secho("-" * terminal_width, bold=True) if self.silent: click.echo("Please wait...") @@ -248,9 +245,7 @@ class EnvironmentProcessor(object): ], self.verbose) if "lib_deps" in self.options: _autoinstall_libdeps(self.cmd_ctx, [ - d.strip() - for d in self.options['lib_deps'].split( - "\n" if "\n" in self.options['lib_deps'] else ", ") + d.strip() for d in self.options['lib_deps'].split(", ") if d.strip() ], self.verbose) @@ -271,7 +266,11 @@ def _autoinstall_libdeps(ctx, libraries, verbose=False): ctx.obj = LibraryManager(storage_dir) if verbose: click.echo("Library Storage: " + storage_dir) - ctx.invoke(cmd_lib_install, libraries=libraries, silent=not verbose) + for lib in libraries: + try: + ctx.invoke(cmd_lib_install, libraries=[lib], silent=not verbose) + except exception.LibNotFound as e: + click.secho("Warning! %s" % e, fg="yellow") def _clean_pioenvs_dir(pioenvs_dir): diff --git a/platformio/exception.py b/platformio/exception.py index 62b96b40..478fb515 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -158,7 +158,9 @@ class APIRequestError(PlatformioException): class LibNotFound(PlatformioException): - MESSAGE = "Library `{0}` has not been found in the registry" + MESSAGE = "Library `{0}` has not been found in PlatformIO Registry.\n"\ + "You can ignore this message, if `{0}` is a built-in library "\ + "(included in framework, SDK). E.g., SPI, Wire, etc." class NotGlobalLibDir(PlatformioException): diff --git a/platformio/managers/lib.py b/platformio/managers/lib.py index 986dd7c3..c4bedced 100644 --- a/platformio/managers/lib.py +++ b/platformio/managers/lib.py @@ -203,7 +203,7 @@ class LibraryManager(BasePkgManager): name, dl_data['url'].replace("http://", "https://") if app.get_setting("enable_ssl") else dl_data['url'], requirements) - def install(self, # pylint: disable=too-many-arguments + def install(self, # pylint: disable=too-many-arguments, too-many-locals name, requirements=None, silent=False, @@ -232,8 +232,13 @@ class LibraryManager(BasePkgManager): if any([s in filters.get("version", "") for s in ("\\", "/")]): self.install("{name}={version}".format(**filters)) else: - lib_info = self.search_for_library(filters, silent, - interactive) + try: + lib_info = self.search_for_library(filters, silent, + interactive) + except exception.LibNotFound as e: + click.secho("Warning! %s" % e, fg="yellow") + continue + if filters.get("version"): self.install( lib_info['id'], From 37552a81fc2aa2525757dd21b2e4d98d98dca57d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 17 Sep 2016 16:55:42 +0300 Subject: [PATCH 41/52] Fix Project Generator for CLion IDE using Windows OS // Resolve #785 --- HISTORY.rst | 5 ++++- platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f722dea9..f3ba1727 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,8 +12,11 @@ PlatformIO 3.0 `platformio init `__ command * Deprecated ``lib_force`` option, please use `lib_deps `__ instead -* Fixed SSL Server-Name-Indication for Python < 2.7.9 * Return valid exit code from ``plaformio test`` command +* Fixed Project Generator for CLion IDE using Windows OS + (`issue #785 `_) +* Fixed SSL Server-Name-Indication for Python < 2.7.9 + (`issue #774 `_) ------- diff --git a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl index 40414aa8..00556e3b 100644 --- a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl +++ b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl @@ -1,8 +1,8 @@ set(ENV{PATH} "{{env_path}}") set(PLATFORMIO_CMD "{{platformio_path}}") -SET(CMAKE_C_COMPILER "{{cc_path}}") -SET(CMAKE_CXX_COMPILER "{{cxx_path}}") +SET(CMAKE_C_COMPILER "{{cc_path.replace("\\", "/")}}") +SET(CMAKE_CXX_COMPILER "{{cxx_path.replace("\\", "/")}}") SET(CMAKE_CXX_FLAGS_DISTRIBUTION "{{cxx_flags}}") SET(CMAKE_C_FLAGS_DISTRIBUTION "{{cc_flags}}") From c12df19fd1b9db27f31bac86423ac0b42c1f3255 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 17 Sep 2016 18:13:39 +0300 Subject: [PATCH 42/52] Fix Project Generator for CLion IDE using Windows OS // Resolve #785 --- platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl index 00556e3b..3397a070 100644 --- a/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl +++ b/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl @@ -22,4 +22,4 @@ include_directories("{{include.replace("\\", "/")}}") % end % end -aux_source_directory({{project_src_dir}} SRC_LIST) +aux_source_directory({{project_src_dir.replace("\\", "/")}} SRC_LIST) From 5e6469596c8613c686e6d07eb9b3ac0c785e055b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 17 Sep 2016 23:46:53 +0300 Subject: [PATCH 43/52] Dynamic variables/templates for "platformio.ini" // Resolve #705 --- HISTORY.rst | 2 + docs/projectconf.rst | 80 ++++++++++++++++++++++++++++++++++++-- platformio/__init__.py | 2 +- platformio/commands/ci.py | 15 ++----- platformio/commands/run.py | 6 +-- platformio/exception.py | 5 --- platformio/util.py | 40 +++++++++++++++---- 7 files changed, 117 insertions(+), 33 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f3ba1727..73e959b2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,8 @@ PlatformIO 3.0 3.1.0 (2016-09-??) ~~~~~~~~~~~~~~~~~~ +* New! Dynamic variables/templates for `Project Configuration File "platformio.ini" `__ + (`issue #705 `_) * Implemented LocalCache system for API and improved a work in off-line mode * Improved Project Generator when custom ``--project-option`` is passed to `platformio init `__ diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 7c31c9f5..14af3c7b 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -21,13 +21,73 @@ The Project configuration file is named ``platformio.ini``. This is a key / value pairs within the sections. Lines beginning with ``;`` are ignored and may be used to provide comments. -The sections and their allowable values are described below. +There are 2 system reserved sections: + +* Base PlatformIO settings: :ref:`projectconf_section_platformio` +* Build Environment settings: :ref:`projectconf_section_env` + +The other sections can be used by users, for example, for +:ref:`projectconf_dynamic_vars`. The sections and their allowable values are +described below. .. contents:: + :depth: 2 + +.. _projectconf_dynamic_vars: + +Dynamic variables +----------------- + +.. versionadded:: 3.1 + +Dynamic variables/templates are useful when you have common configuration data +between build environments. For examples, common :ref:`projectconf_build_flags` +or project dependencies :ref:`projectconf_lib_deps`. + +Each variable should have a next format: ``${
.