From 2c301ca422362b7a7d4df98fc8bd6f921be50505 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 10 Dec 2015 23:52:33 +0200 Subject: [PATCH 01/41] Explain how to use Arguments and custom options --- docs/projectconf.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 448a0a2e..4783657c 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -426,6 +426,7 @@ Example, specify own upload command for :ref:`platform_atmelavr`: [env:env_with_specific_extra_script] platform = atmelavr extra_script = /path/to/extra_script.py + custom_option = hello ``extra_script.py``: @@ -435,14 +436,17 @@ Example, specify own upload command for :ref:`platform_atmelavr`: env = DefaultEnvironment() - env.Replace(UPLOADHEXCMD='"$UPLOADER" --uploader --flags') + env.Replace(UPLOADHEXCMD='"$UPLOADER" ${ARGUMENTS.get("custom_option")} --uploader --flags') # uncomment line below to see environment variables # print env.Dump() + # print ARGUMENTS * see built-in examples of `PlatformIO build scripts `_. -* take a look on related users questions: `#351 `_, +* take a look on the multiple snippets/answers for the user questions: + `#365 `_, + `#351 `_, `#236 `_, `#247 `_ From 9d01d86652d4c5c24e5e610ea4d1e358416341a7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Dec 2015 00:16:06 +0200 Subject: [PATCH 02/41] Explain about SCons and how to fix installation --- docs/faq.rst | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 9a63ee97..8e82630f 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -103,22 +103,42 @@ Troubleshooting Installation ~~~~~~~~~~~~ -PlatformIO and SCons aren't installed properly -'''''''''''''''''''''''''''''''''''''''''''''' +PlatformIO and ``SCons`` aren't installed properly +'''''''''''''''''''''''''''''''''''''''''''''''''' -Try these solutions: +PlatformIO depends on awesome and irreplaceable software construction tool +named `SCons `_. PlatformIO Code Builder uses it to build +single source code for the multiple embedded platforms. -1. Upgrade SCons via `pip `_ +When you install PlatformIO it tries to find ``scons`` program in your OS. If +SCons is installed in your system, then PlatformIO will use it. Otherwise, +PlatformIO tries to install it automatically using ``pip install scons``. So, if +you are here, then it means that PlatformIO could not install it for you. +Let fix it manually. + +1. Need to cleanup all previous SCons installations using `pip `_ .. code-block:: bash [sudo] pip uninstall scons + + +2. Try to install it manually + +.. code-block:: bash + [sudo] pip install scons # or if you have "error: option --single-version-externally-managed not recognized" [sudo] pip install --egg scons -2. Install PlatformIO using :ref:`installation_installer_script`. +3. If it didn't help you, try system OS package manager + + * **Mac OS X** using `brew `_ run ``brew install scons`` + * **Linux** using ``apt`` run ``[sudo] apt-get install scons`` + +To identify that SCons is installed in your system run ``scons -v``. + .. _faq_troubleshooting_sconssingverextmanaged: @@ -139,8 +159,8 @@ Answered in `issue #252 Date: Fri, 11 Dec 2015 14:23:12 +0200 Subject: [PATCH 03/41] Fix .gitignore contents --- platformio/commands/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 9709b8ae..08ba9ae4 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -301,4 +301,4 @@ def init_cvs_ignore(project_dir): if isfile(join(project_dir, ".gitignore")): return with open(join(project_dir, ".gitignore"), "w") as f: - f.write(".pioevs") + f.write(".pioenvs") From 9cc9912ef27e2e1f3eda45697d8e384e4ec5cd60 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Dec 2015 15:17:38 +0200 Subject: [PATCH 04/41] Handle upload_flags option in platformio.ini // Resolve #368 --- HISTORY.rst | 6 ++++++ platformio/__init__.py | 2 +- platformio/builder/main.py | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 9e90581f..ef063bad 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,12 @@ Release History PlatformIO 2.0 -------------- +2.5.1 (2015-12-??) +~~~~~~~~~~~~~~~~~~ + +* Handle ``upload_flags`` option in `platformio.ini `_ + (`issue #368 `_) + 2.5.0 (2015-12-08) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 662e56a0..3b5a5dc1 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (2, 5, 0) +VERSION = (2, 5, "1.dev0") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/main.py b/platformio/builder/main.py index dbe503ea..387fed55 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -76,7 +76,8 @@ commonvars.AddVariables( # upload options ("UPLOAD_PORT",), ("UPLOAD_PROTOCOL",), - ("UPLOAD_SPEED",) + ("UPLOAD_SPEED",), + ("UPLOAD_FLAGS",) ) DefaultEnvironment( @@ -161,6 +162,9 @@ env.SConscriptChdir(0) env.SConsignFile(join("$PIOENVS_DIR", ".sconsign.dblite")) env.SConscript("$BUILD_SCRIPT") +if "UPLOAD_FLAGS" in env: + env.Append(UPLOADERFLAGS=["$UPLOAD_FLAGS"]) + if environ.get("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT")): env.SConscript( environ.get("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT"))) From fbd2c61f4096b4dfcd02eaca57bc8b3e607820db Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Dec 2015 15:20:08 +0200 Subject: [PATCH 05/41] Update docs with "upload_flags" --- docs/projectconf.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 4783657c..abf14071 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -215,6 +215,12 @@ A protocol that "uploader" tool uses to talk to the board. A connection speed (`baud rate `_) which "uploader" tool uses when sending firmware to board. +``upload_flags`` +^^^^^^^^^^^^^^^^ + +Extra flags for uploader. Will be added to the end of uploader command. If you +need to override uploader command or base flags please use :ref:`projectconf_extra_script`. + .. _projectconf_build_flags: ``build_flags`` From cc1eb4bad6872c8e97e17ffb79ac1c1d47644992 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Dec 2015 15:24:02 +0200 Subject: [PATCH 06/41] Add previously added boards to docs --- docs/frameworks/mbed.rst | 76 +++++++++++++++++++++++++++++++++++++ docs/platforms/atmelsam.rst | 34 +++++++++++++++++ docs/platforms/ststm32.rst | 42 ++++++++++++++++++++ 3 files changed, 152 insertions(+) diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index 0d4fa0cf..77cd07a6 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -42,6 +42,40 @@ Boards `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. +Atmel +~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``samd21_xpro`` + - `Atmel SAMD21-XPRO `_ + - ATSAMD21J18A + - 48 MHz + - 256 Kb + - 32 Kb + + * - ``saml21_xpro_b`` + - `Atmel SAML21-XPRO-B `_ + - ATSAML21J18B + - 48 MHz + - 256 Kb + - 32 Kb + + * - ``samr21_xpro`` + - `Atmel ATSAMR21-XPRO `_ + - ATSAMR21G18A + - 48 MHz + - 256 Kb + - 32 Kb + CQ Publishing ~~~~~~~~~~~~~ @@ -395,6 +429,13 @@ ST - 2048 Kb - 256 Kb + * - ``disco_f469ni`` + - `ST 32F469IDISCOVERY `_ + - STM32F469NIH6 + - 180 MHz + - 1024 Kb + - 384 Kb + * - ``disco_l053c8`` - `ST 32L0538DISCOVERY `_ - STM32L053C8T6 @@ -402,6 +443,13 @@ ST - 64 Kb - 8 Kb + * - ``disco_l476vg`` + - `ST 32L476GDISCOVERY `_ + - STM32L476VGT6 + - 80 MHz + - 1024 Kb + - 128 Kb + * - ``nucleo_f030r8`` - `ST Nucleo F030R8 `_ - STM32F030R8T6 @@ -409,6 +457,20 @@ ST - 64 Kb - 8 Kb + * - ``nucleo_f031k6`` + - `ST Nucleo F031K6 `_ + - STM32F031K6T6 + - 48 MHz + - 32 Kb + - 4 Kb + + * - ``nucleo_f042k6`` + - `ST Nucleo F042K6 `_ + - STM32F042K6T6 + - 48 MHz + - 32 Kb + - 6 Kb + * - ``nucleo_f070rb`` - `ST Nucleo F070RB `_ - STM32F070RBT6 @@ -444,6 +506,13 @@ ST - 64 Kb - 16 Kb + * - ``nucleo_f303k8`` + - `ST Nucleo F303K8 `_ + - STM32F303K8T6 + - 72 MHz + - 64 Kb + - 16 Kb + * - ``nucleo_f303re`` - `ST Nucleo F303RE `_ - STM32F303RET6 @@ -493,6 +562,13 @@ ST - 512 Kb - 80 Kb + * - ``nucleo_l476rg`` + - `ST Nucleo L476RG `_ + - STM32L476RGT6 + - 80 MHz + - 1024 Kb + - 128 Kb + SeeedStudio ~~~~~~~~~~~ diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index 90691dbd..c86f9710 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -96,6 +96,40 @@ Arduino - 512 Kb - 32 Kb +Atmel +~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``samd21_xpro`` + - `Atmel SAMD21-XPRO `_ + - ATSAMD21J18A + - 48 MHz + - 256 Kb + - 32 Kb + + * - ``saml21_xpro_b`` + - `Atmel SAML21-XPRO-B `_ + - ATSAML21J18B + - 48 MHz + - 256 Kb + - 32 Kb + + * - ``samr21_xpro`` + - `Atmel ATSAMR21-XPRO `_ + - ATSAMR21G18A + - 48 MHz + - 256 Kb + - 32 Kb + Digistump ~~~~~~~~~ diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index d0dd3655..64907c8b 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -183,6 +183,13 @@ ST - 2048 Kb - 256 Kb + * - ``disco_f469ni`` + - `ST 32F469IDISCOVERY `_ + - STM32F469NIH6 + - 180 MHz + - 1024 Kb + - 384 Kb + * - ``disco_l053c8`` - `ST 32L0538DISCOVERY `_ - STM32L053C8T6 @@ -197,6 +204,13 @@ ST - 128 Kb - 16 Kb + * - ``disco_l476vg`` + - `ST 32L476GDISCOVERY `_ + - STM32L476VGT6 + - 80 MHz + - 1024 Kb + - 128 Kb + * - ``nucleo_f030r8`` - `ST Nucleo F030R8 `_ - STM32F030R8T6 @@ -204,6 +218,20 @@ ST - 64 Kb - 8 Kb + * - ``nucleo_f031k6`` + - `ST Nucleo F031K6 `_ + - STM32F031K6T6 + - 48 MHz + - 32 Kb + - 4 Kb + + * - ``nucleo_f042k6`` + - `ST Nucleo F042K6 `_ + - STM32F042K6T6 + - 48 MHz + - 32 Kb + - 6 Kb + * - ``nucleo_f070rb`` - `ST Nucleo F070RB `_ - STM32F070RBT6 @@ -239,6 +267,13 @@ ST - 64 Kb - 16 Kb + * - ``nucleo_f303k8`` + - `ST Nucleo F303K8 `_ + - STM32F303K8T6 + - 72 MHz + - 64 Kb + - 16 Kb + * - ``nucleo_f303re`` - `ST Nucleo F303RE `_ - STM32F303RET6 @@ -287,3 +322,10 @@ ST - 32 MHz - 512 Kb - 80 Kb + + * - ``nucleo_l476rg`` + - `ST Nucleo L476RG `_ + - STM32L476RGT6 + - 80 MHz + - 1024 Kb + - 128 Kb From 2baf14f900e9dff94a97506f8f17275f026bbb6c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Dec 2015 15:31:36 +0200 Subject: [PATCH 07/41] Implemented Over The Air (OTA) upgrades for Espressif development platform // Resolve #365 --- HISTORY.rst | 6 +++- docs/frameworks/arduino.rst | 11 +++++-- docs/platforms/espressif.rst | 11 +++++-- platformio/boards/espressif.json | 22 ++++++++++++++ platformio/builder/scripts/espressif.py | 38 +++++++++++++++++-------- 5 files changed, 71 insertions(+), 17 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index ef063bad..a9873a3e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,7 +7,11 @@ PlatformIO 2.0 2.5.1 (2015-12-??) ~~~~~~~~~~~~~~~~~~ -* Handle ``upload_flags`` option in `platformio.ini `_ +* Implemented Over The Air (OTA) upgrades for `Espressif `__ + development platform. + (`issue #365 `_) +* Added support for Espressif ESP8266 ESP-01-1MB board (ready for OTA) +* Handle ``upload_flags`` option in `platformio.ini `__ (`issue #368 `_) 2.5.0 (2015-12-08) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 8d2ea38e..2d7994d1 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -476,15 +476,22 @@ Espressif * - ``esp01`` - `Espressif ESP8266 ESP-01 board `_ - ESP8266 - - 40 MHz + - 80 MHz - 512 Kb - 32 Kb + * - ``esp01_1m`` + - `Espressif ESP8266 ESP-01-1MB board `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 32 Kb + * - ``esp12e`` - `Espressif ESP8266 ESP-12E board (NodeMCU) `_ - ESP8266 - 80 MHz - - 512 Kb + - 4096 Kb - 32 Kb LightUp diff --git a/docs/platforms/espressif.rst b/docs/platforms/espressif.rst index ee2b297d..0f1ee9af 100644 --- a/docs/platforms/espressif.rst +++ b/docs/platforms/espressif.rst @@ -88,13 +88,20 @@ Espressif * - ``esp01`` - `Espressif ESP8266 ESP-01 board `_ - ESP8266 - - 40 MHz + - 80 MHz - 512 Kb - 32 Kb + * - ``esp01_1m`` + - `Espressif ESP8266 ESP-01-1MB board `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 32 Kb + * - ``esp12e`` - `Espressif ESP8266 ESP-12E board (NodeMCU) `_ - ESP8266 - 80 MHz - - 512 Kb + - 4096 Kb - 32 Kb diff --git a/platformio/boards/espressif.json b/platformio/boards/espressif.json index f2c4e3f5..ea97a27b 100644 --- a/platformio/boards/espressif.json +++ b/platformio/boards/espressif.json @@ -21,6 +21,28 @@ "url": "https://nurdspace.nl/ESP8266", "vendor": "Espressif" }, + "esp01_1m": { + "build": { + "core": "esp8266", + "extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.1m128.ld", + "mcu": "esp8266", + "variant": "generic" + }, + "frameworks": ["arduino"], + "name": "Espressif ESP8266 ESP-01-1MB board", + "platform": "espressif", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 1048576, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://nurdspace.nl/ESP8266", + "vendor": "Espressif" + }, "esp12e": { "build": { "core": "esp8266", diff --git a/platformio/builder/scripts/espressif.py b/platformio/builder/scripts/espressif.py index 49feea70..0980c605 100644 --- a/platformio/builder/scripts/espressif.py +++ b/platformio/builder/scripts/espressif.py @@ -16,6 +16,7 @@ Builder for Espressif MCUs """ +import socket from os.path import join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, @@ -98,14 +99,6 @@ env.Replace( PROGSUFFIX=".elf" ) -if "FRAMEWORK" in env: - env.Append( - LINKFLAGS=[ - "-Wl,-wrap,system_restart_local", - "-Wl,-wrap,register_chipv6_phy" - ] - ) - _board_max_rom = int( env.get("BOARD_OPTIONS", {}).get("upload", {}).get("maximum_size", 0)) env.Append( @@ -136,11 +129,32 @@ env.Append( ) ) -# -# Configure SDK -# +if "FRAMEWORK" in env: + env.Append( + LINKFLAGS=[ + "-Wl,-wrap,system_restart_local", + "-Wl,-wrap,register_chipv6_phy" + ] + ) -if "FRAMEWORK" not in env: + # Handle uploading via OTA + try: + if env.get("UPLOAD_PORT") and socket.inet_aton(env.get("UPLOAD_PORT")): + env.Replace( + UPLOADEROTA=join("$PLATFORMFW_DIR", "tools", "espota.py"), + UPLOADERFLAGS=[ + "--debug", + "--progress", + "-i", "$UPLOAD_PORT", + "-f", "$SOURCE" + ], + UPLOADCMD='$UPLOADEROTA $UPLOADERFLAGS' + ) + except socket.error: + pass + +# Configure native SDK +else: env.Append( CPPPATH=[ join("$PIOPACKAGES_DIR", "sdk-esp8266", "include"), From 5b2fac95ce0c8117c2bf5e5ffc95b81e49e36607 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Dec 2015 16:45:53 +0200 Subject: [PATCH 08/41] Improve symlink fixer --- scripts/fixsymlink.py | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/scripts/fixsymlink.py b/scripts/fixsymlink.py index 05b15b70..4b1a2d2d 100644 --- a/scripts/fixsymlink.py +++ b/scripts/fixsymlink.py @@ -13,35 +13,17 @@ # limitations under the License. from os import chdir, getcwd, readlink, remove, symlink, walk -from os.path import exists, islink, join, split +from os.path import exists, islink, join, relpath from sys import exit as sys_exit -def get_symrelpath(root, sympath, ending=None): - head, tail = split(sympath) - - if ending: - ending = join(tail, ending) - relpath = join("..", ending) - else: - relpath = tail - ending = tail - - if exists(join(root, relpath)): - return relpath - elif head: - return get_symrelpath(root, head, ending) - else: - raise Exception() - - def fix_symlink(root, fname, brokenlink): + print root, fname, brokenlink prevcwd = getcwd() - symrelpath = get_symrelpath(root, brokenlink) chdir(root) remove(fname) - symlink(symrelpath, fname) + symlink(relpath(brokenlink, root), fname) chdir(prevcwd) From e702e1eb2787b49feadb1d2da5e49aae9413dafb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Dec 2015 17:59:25 +0200 Subject: [PATCH 09/41] Handle broken connection from SF side --- platformio/pkgmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/pkgmanager.py b/platformio/pkgmanager.py index 47cde832..65054c67 100644 --- a/platformio/pkgmanager.py +++ b/platformio/pkgmanager.py @@ -101,7 +101,7 @@ class PackageManager(object): try: dlpath = self.download(info['url'], pkg_dir, info['sha1']) except (requests.exceptions.ConnectionError, - exception.FDUnrecognizedStatusCode): + exception.FDUnrecognizedStatusCode, StopIteration): if info['url'].startswith("http://sourceforge.net"): dlpath = self.download( "http://dl.platformio.org/packages/%s" % From f793ff1a86f848c11811972d0c33d29bcd65677d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Dec 2015 18:00:03 +0200 Subject: [PATCH 10/41] Disable SCons man for --egg --- docs/faq.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 8e82630f..d00f89c6 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -129,8 +129,10 @@ Let fix it manually. [sudo] pip install scons - # or if you have "error: option --single-version-externally-managed not recognized" - [sudo] pip install --egg scons + # If you have errors: + # * error: option --single-version-externally-managed not recognized + # * OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man' + [sudo] pip install --egg scons --install-option="--no-install-man" 3. If it didn't help you, try system OS package manager From 7868566a7865fd3af8c55bf9a626fa7be3a0d5ad Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Dec 2015 18:18:57 +0200 Subject: [PATCH 11/41] Improve PlatformIO installation on the Mac OS X El Capitan --- HISTORY.rst | 1 + docs/installation.rst | 18 +++++++++--------- platformio/__init__.py | 2 +- platformio/util.py | 3 ++- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a9873a3e..387714aa 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,7 @@ PlatformIO 2.0 * Added support for Espressif ESP8266 ESP-01-1MB board (ready for OTA) * Handle ``upload_flags`` option in `platformio.ini `__ (`issue #368 `_) +* Improved PlatformIO installation on the Mac OS X El Capitan 2.5.0 (2015-12-08) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/installation.rst b/docs/installation.rst index 0f45b4fe..d810dbae 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -52,23 +52,17 @@ Please *choose ONE of* the following methods: a) Python Package Manager ~~~~~~~~~~~~~~~~~~~~~~~~~ -The latest stable version of PlatformIO may be installed/upgraded via +The latest stable version of PlatformIO may be installed or upgraded via `pip `_ as follows: .. code-block:: bash - # update dependent packages to the latest versions - pip install -U pip setuptools - - # install/upgrade the latest version of PlatformIO pip install -U platformio Note that you may run into permissions issues running these commands. You have a few options here: * Run with ``sudo`` to install PlatformIO and dependencies globally -* Specify the `pip install --user `_ - option to install local to your user * Run the command in a `virtualenv `_ local to a specific project working set. @@ -132,7 +126,6 @@ c) Full Guide .. code-block:: bash - pip install -U pip setuptools pip install -U platformio If your computer does not recognize ``pip`` command, try to install it first @@ -151,13 +144,20 @@ Install the latest PlatformIO from the ``develop`` branch: .. code-block:: bash - pip install -U pip setuptools pip install -U https://github.com/platformio/platformio/archive/develop.zip If you want to be up-to-date with the latest ``develop`` version of PlatformIO, then you need to re-install PlatformIO each time if you see the new commits in `PlatformIO GitHub repository (branch: develop) `_. +To revert to the latest stable version + +.. code-block:: bash + + pip uninstall platformio + pip install -U platformio + + Troubleshooting --------------- diff --git a/platformio/__init__.py b/platformio/__init__.py index 3b5a5dc1..7c330bb1 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (2, 5, "1.dev0") +VERSION = (2, 5, "1.dev1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/util.py b/platformio/util.py index 4eefbecb..6b3a8557 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -366,7 +366,8 @@ def test_scons(): def install_scons(): r = exec_command(["pip", "install", "-U", "scons"]) if r['returncode'] != 0: - r = exec_command(["pip", "install", "--egg", "scons"]) + r = exec_command(["pip", "install", "--egg", "scons", + '--install-option="--no-install-man"']) return r['returncode'] == 0 From 21c64b2fe134a8caac63ed10b9834202e97d0bbc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Dec 2015 22:45:37 +0200 Subject: [PATCH 12/41] Fix anchor scroll --- docs/_templates/footer.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html index b10e6ac0..02cb30a6 100644 --- a/docs/_templates/footer.html +++ b/docs/_templates/footer.html @@ -27,5 +27,29 @@ + {{ super() }} {% endblock %} From dffc8ef9400fcf47198eb03109246838d9d835ad Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Dec 2015 22:48:45 +0200 Subject: [PATCH 13/41] Optimise auto-scroll for docs by hash --- docs/_templates/footer.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html index 02cb30a6..5b562649 100644 --- a/docs/_templates/footer.html +++ b/docs/_templates/footer.html @@ -34,10 +34,11 @@ if ($('#pionav').css('display') !== 'block') { return; } - window.setTimeout('$(window).scrollTop($(window).scrollTop() - 50);', 50); - $(window).on('hashchange', function(e){ + function fixScroll() { $(window).scrollTop($(window).scrollTop() - 50); - }); + } + window.setTimeout(fixScroll, 50); + $(window).on('hashchange', function(e){fixScroll();}); }); }; From 093176b2ee20a83e1a47bb6f1bb4647f741061ac Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 12 Dec 2015 23:37:43 +0200 Subject: [PATCH 14/41] Add link to demo projects --- docs/demo.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/demo.rst b/docs/demo.rst index 6e84f7f9..f0ebcda3 100644 --- a/docs/demo.rst +++ b/docs/demo.rst @@ -11,11 +11,16 @@ .. _demo: -Demo -==== +Demo & Projects +=============== .. contents:: +Project Examples +---------------- + +Preconfigured demo projects are located in `PlatformIO GitHub `_ repository. + Wiring Blink ------------ From 15224e3c0203353873fceffe5e22aaba596e61b5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 13 Dec 2015 19:40:07 +0200 Subject: [PATCH 15/41] Add .travis.yml and .gitignore files --- .../adafruit-blink/.gitignore | 1 + .../adafruit-blink/.travis.yml | 65 +++++++++++++++++++ .../arduino-external-libs/.gitignore | 1 + .../arduino-external-libs/.travis.yml | 65 +++++++++++++++++++ .../arduino-internal-libs/.gitignore | 1 + .../arduino-internal-libs/.travis.yml | 65 +++++++++++++++++++ .../arduino-own-src_dir/.gitignore | 1 + .../arduino-own-src_dir/.travis.yml | 65 +++++++++++++++++++ .../digitstump-mouse/.gitignore | 1 + .../digitstump-mouse/.travis.yml | 65 +++++++++++++++++++ .../engduino-magnetometer/.gitignore | 1 + .../engduino-magnetometer/.travis.yml | 65 +++++++++++++++++++ .../panstamp-blink/.gitignore | 1 + .../panstamp-blink/.travis.yml | 65 +++++++++++++++++++ examples/desktop/hello-world/.gitignore | 1 + examples/desktop/hello-world/.travis.yml | 65 +++++++++++++++++++ examples/espressif/esp8266-native/.gitignore | 1 + examples/espressif/esp8266-native/.travis.yml | 65 +++++++++++++++++++ .../espressif/esp8266-webserver/.gitignore | 1 + .../espressif/esp8266-webserver/.travis.yml | 65 +++++++++++++++++++ .../espressif/esp8266-wifiscan/.gitignore | 1 + .../espressif/esp8266-wifiscan/.travis.yml | 65 +++++++++++++++++++ examples/ide/clion/.gitignore | 1 + examples/ide/clion/.travis.yml | 65 +++++++++++++++++++ examples/ide/eclipse/.gitignore | 1 + examples/ide/eclipse/.travis.yml | 65 +++++++++++++++++++ examples/ide/qtcreator/.gitignore | 1 + examples/ide/qtcreator/.travis.yml | 65 +++++++++++++++++++ examples/ide/sublimetext/.gitignore | 1 + examples/ide/sublimetext/.travis.yml | 65 +++++++++++++++++++ examples/ide/visualstudio/.gitignore | 1 + examples/ide/visualstudio/.travis.yml | 65 +++++++++++++++++++ examples/mbed/mbed-blink/.gitignore | 1 + examples/mbed/mbed-blink/.travis.yml | 65 +++++++++++++++++++ examples/mbed/mbed-dsp/.gitignore | 1 + examples/mbed/mbed-dsp/.travis.yml | 65 +++++++++++++++++++ examples/mbed/mbed-http-client/.gitignore | 1 + examples/mbed/mbed-http-client/.travis.yml | 65 +++++++++++++++++++ examples/mbed/mbed-rtos/.gitignore | 1 + examples/mbed/mbed-rtos/.travis.yml | 65 +++++++++++++++++++ examples/mbed/mbed-serial/.gitignore | 1 + examples/mbed/mbed-serial/.travis.yml | 65 +++++++++++++++++++ examples/stm32/stm32-cmsis-blink/.gitignore | 1 + examples/stm32/stm32-cmsis-blink/.travis.yml | 65 +++++++++++++++++++ examples/stm32/stm32-opencm3-blink/.gitignore | 1 + .../stm32/stm32-opencm3-blink/.travis.yml | 65 +++++++++++++++++++ examples/stm32/stm32-spl-blink/.gitignore | 1 + examples/stm32/stm32-spl-blink/.travis.yml | 65 +++++++++++++++++++ .../teensy/teensy-hid-usb-mouse/.gitignore | 1 + .../teensy/teensy-hid-usb-mouse/.travis.yml | 65 +++++++++++++++++++ .../teensy/teensy-internal-libs/.gitignore | 1 + .../teensy/teensy-internal-libs/.travis.yml | 65 +++++++++++++++++++ examples/timsp430/panstamp-blink/.gitignore | 1 + examples/timsp430/panstamp-blink/.travis.yml | 65 +++++++++++++++++++ .../timsp430-energia-blink/.gitignore | 1 + .../timsp430-energia-blink/.travis.yml | 65 +++++++++++++++++++ .../timsp430/timsp430-native-blink/.gitignore | 1 + .../timsp430-native-blink/.travis.yml | 65 +++++++++++++++++++ .../titiva/titiva-energia-blink/.gitignore | 1 + .../titiva/titiva-energia-blink/.travis.yml | 65 +++++++++++++++++++ .../titiva/titiva-native-blink/.gitignore | 1 + .../titiva/titiva-native-blink/.travis.yml | 65 +++++++++++++++++++ .../titiva/titiva-opencm3-blink/.gitignore | 1 + .../titiva/titiva-opencm3-blink/.travis.yml | 65 +++++++++++++++++++ examples/wiring-blink/.gitignore | 1 + examples/wiring-blink/.travis.yml | 65 +++++++++++++++++++ 66 files changed, 2178 insertions(+) create mode 100644 examples/atmelavr-and-arduino/adafruit-blink/.gitignore create mode 100644 examples/atmelavr-and-arduino/adafruit-blink/.travis.yml create mode 100644 examples/atmelavr-and-arduino/arduino-external-libs/.gitignore create mode 100644 examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml create mode 100644 examples/atmelavr-and-arduino/arduino-internal-libs/.gitignore create mode 100644 examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml create mode 100644 examples/atmelavr-and-arduino/arduino-own-src_dir/.gitignore create mode 100644 examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml create mode 100644 examples/atmelavr-and-arduino/digitstump-mouse/.gitignore create mode 100644 examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml create mode 100644 examples/atmelavr-and-arduino/engduino-magnetometer/.gitignore create mode 100644 examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml create mode 100644 examples/atmelavr-and-arduino/panstamp-blink/.gitignore create mode 100644 examples/atmelavr-and-arduino/panstamp-blink/.travis.yml create mode 100644 examples/desktop/hello-world/.gitignore create mode 100644 examples/desktop/hello-world/.travis.yml create mode 100644 examples/espressif/esp8266-native/.gitignore create mode 100644 examples/espressif/esp8266-native/.travis.yml create mode 100644 examples/espressif/esp8266-webserver/.gitignore create mode 100644 examples/espressif/esp8266-webserver/.travis.yml create mode 100644 examples/espressif/esp8266-wifiscan/.gitignore create mode 100644 examples/espressif/esp8266-wifiscan/.travis.yml create mode 100644 examples/ide/clion/.gitignore create mode 100644 examples/ide/clion/.travis.yml create mode 100644 examples/ide/eclipse/.gitignore create mode 100644 examples/ide/eclipse/.travis.yml create mode 100644 examples/ide/qtcreator/.gitignore create mode 100644 examples/ide/qtcreator/.travis.yml create mode 100644 examples/ide/sublimetext/.gitignore create mode 100644 examples/ide/sublimetext/.travis.yml create mode 100644 examples/ide/visualstudio/.gitignore create mode 100644 examples/ide/visualstudio/.travis.yml create mode 100644 examples/mbed/mbed-blink/.gitignore create mode 100644 examples/mbed/mbed-blink/.travis.yml create mode 100644 examples/mbed/mbed-dsp/.gitignore create mode 100644 examples/mbed/mbed-dsp/.travis.yml create mode 100644 examples/mbed/mbed-http-client/.gitignore create mode 100644 examples/mbed/mbed-http-client/.travis.yml create mode 100644 examples/mbed/mbed-rtos/.gitignore create mode 100644 examples/mbed/mbed-rtos/.travis.yml create mode 100644 examples/mbed/mbed-serial/.gitignore create mode 100644 examples/mbed/mbed-serial/.travis.yml create mode 100644 examples/stm32/stm32-cmsis-blink/.gitignore create mode 100644 examples/stm32/stm32-cmsis-blink/.travis.yml create mode 100644 examples/stm32/stm32-opencm3-blink/.gitignore create mode 100644 examples/stm32/stm32-opencm3-blink/.travis.yml create mode 100644 examples/stm32/stm32-spl-blink/.gitignore create mode 100644 examples/stm32/stm32-spl-blink/.travis.yml create mode 100644 examples/teensy/teensy-hid-usb-mouse/.gitignore create mode 100644 examples/teensy/teensy-hid-usb-mouse/.travis.yml create mode 100644 examples/teensy/teensy-internal-libs/.gitignore create mode 100644 examples/teensy/teensy-internal-libs/.travis.yml create mode 100644 examples/timsp430/panstamp-blink/.gitignore create mode 100644 examples/timsp430/panstamp-blink/.travis.yml create mode 100644 examples/timsp430/timsp430-energia-blink/.gitignore create mode 100644 examples/timsp430/timsp430-energia-blink/.travis.yml create mode 100644 examples/timsp430/timsp430-native-blink/.gitignore create mode 100644 examples/timsp430/timsp430-native-blink/.travis.yml create mode 100644 examples/titiva/titiva-energia-blink/.gitignore create mode 100644 examples/titiva/titiva-energia-blink/.travis.yml create mode 100644 examples/titiva/titiva-native-blink/.gitignore create mode 100644 examples/titiva/titiva-native-blink/.travis.yml create mode 100644 examples/titiva/titiva-opencm3-blink/.gitignore create mode 100644 examples/titiva/titiva-opencm3-blink/.travis.yml create mode 100644 examples/wiring-blink/.gitignore create mode 100644 examples/wiring-blink/.travis.yml diff --git a/examples/atmelavr-and-arduino/adafruit-blink/.gitignore b/examples/atmelavr-and-arduino/adafruit-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/atmelavr-and-arduino/adafruit-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/atmelavr-and-arduino/adafruit-blink/.travis.yml b/examples/atmelavr-and-arduino/adafruit-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/atmelavr-and-arduino/adafruit-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/atmelavr-and-arduino/arduino-external-libs/.gitignore b/examples/atmelavr-and-arduino/arduino-external-libs/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/atmelavr-and-arduino/arduino-external-libs/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml b/examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/atmelavr-and-arduino/arduino-internal-libs/.gitignore b/examples/atmelavr-and-arduino/arduino-internal-libs/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/atmelavr-and-arduino/arduino-internal-libs/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml b/examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/atmelavr-and-arduino/arduino-own-src_dir/.gitignore b/examples/atmelavr-and-arduino/arduino-own-src_dir/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/atmelavr-and-arduino/arduino-own-src_dir/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml b/examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/atmelavr-and-arduino/digitstump-mouse/.gitignore b/examples/atmelavr-and-arduino/digitstump-mouse/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/atmelavr-and-arduino/digitstump-mouse/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml b/examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/atmelavr-and-arduino/engduino-magnetometer/.gitignore b/examples/atmelavr-and-arduino/engduino-magnetometer/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/atmelavr-and-arduino/engduino-magnetometer/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml b/examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/atmelavr-and-arduino/panstamp-blink/.gitignore b/examples/atmelavr-and-arduino/panstamp-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/atmelavr-and-arduino/panstamp-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/atmelavr-and-arduino/panstamp-blink/.travis.yml b/examples/atmelavr-and-arduino/panstamp-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/atmelavr-and-arduino/panstamp-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/desktop/hello-world/.gitignore b/examples/desktop/hello-world/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/desktop/hello-world/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/desktop/hello-world/.travis.yml b/examples/desktop/hello-world/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/desktop/hello-world/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/espressif/esp8266-native/.gitignore b/examples/espressif/esp8266-native/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/espressif/esp8266-native/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/espressif/esp8266-native/.travis.yml b/examples/espressif/esp8266-native/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/espressif/esp8266-native/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/espressif/esp8266-webserver/.gitignore b/examples/espressif/esp8266-webserver/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/espressif/esp8266-webserver/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/espressif/esp8266-webserver/.travis.yml b/examples/espressif/esp8266-webserver/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/espressif/esp8266-webserver/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/espressif/esp8266-wifiscan/.gitignore b/examples/espressif/esp8266-wifiscan/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/espressif/esp8266-wifiscan/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/espressif/esp8266-wifiscan/.travis.yml b/examples/espressif/esp8266-wifiscan/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/espressif/esp8266-wifiscan/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/ide/clion/.gitignore b/examples/ide/clion/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/ide/clion/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/ide/clion/.travis.yml b/examples/ide/clion/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/ide/clion/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/ide/eclipse/.gitignore b/examples/ide/eclipse/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/ide/eclipse/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/ide/eclipse/.travis.yml b/examples/ide/eclipse/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/ide/eclipse/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/ide/qtcreator/.gitignore b/examples/ide/qtcreator/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/ide/qtcreator/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/ide/qtcreator/.travis.yml b/examples/ide/qtcreator/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/ide/qtcreator/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/ide/sublimetext/.gitignore b/examples/ide/sublimetext/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/ide/sublimetext/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/ide/sublimetext/.travis.yml b/examples/ide/sublimetext/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/ide/sublimetext/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/ide/visualstudio/.gitignore b/examples/ide/visualstudio/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/ide/visualstudio/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/ide/visualstudio/.travis.yml b/examples/ide/visualstudio/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/ide/visualstudio/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/mbed/mbed-blink/.gitignore b/examples/mbed/mbed-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/mbed/mbed-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/mbed/mbed-blink/.travis.yml b/examples/mbed/mbed-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/mbed/mbed-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/mbed/mbed-dsp/.gitignore b/examples/mbed/mbed-dsp/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/mbed/mbed-dsp/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/mbed/mbed-dsp/.travis.yml b/examples/mbed/mbed-dsp/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/mbed/mbed-dsp/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/mbed/mbed-http-client/.gitignore b/examples/mbed/mbed-http-client/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/mbed/mbed-http-client/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/mbed/mbed-http-client/.travis.yml b/examples/mbed/mbed-http-client/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/mbed/mbed-http-client/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/mbed/mbed-rtos/.gitignore b/examples/mbed/mbed-rtos/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/mbed/mbed-rtos/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/mbed/mbed-rtos/.travis.yml b/examples/mbed/mbed-rtos/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/mbed/mbed-rtos/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/mbed/mbed-serial/.gitignore b/examples/mbed/mbed-serial/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/mbed/mbed-serial/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/mbed/mbed-serial/.travis.yml b/examples/mbed/mbed-serial/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/mbed/mbed-serial/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/stm32/stm32-cmsis-blink/.gitignore b/examples/stm32/stm32-cmsis-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/stm32/stm32-cmsis-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/stm32/stm32-cmsis-blink/.travis.yml b/examples/stm32/stm32-cmsis-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/stm32/stm32-cmsis-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/stm32/stm32-opencm3-blink/.gitignore b/examples/stm32/stm32-opencm3-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/stm32/stm32-opencm3-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/stm32/stm32-opencm3-blink/.travis.yml b/examples/stm32/stm32-opencm3-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/stm32/stm32-opencm3-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/stm32/stm32-spl-blink/.gitignore b/examples/stm32/stm32-spl-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/stm32/stm32-spl-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/stm32/stm32-spl-blink/.travis.yml b/examples/stm32/stm32-spl-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/stm32/stm32-spl-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/teensy/teensy-hid-usb-mouse/.gitignore b/examples/teensy/teensy-hid-usb-mouse/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/teensy/teensy-hid-usb-mouse/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/teensy/teensy-hid-usb-mouse/.travis.yml b/examples/teensy/teensy-hid-usb-mouse/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/teensy/teensy-hid-usb-mouse/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/teensy/teensy-internal-libs/.gitignore b/examples/teensy/teensy-internal-libs/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/teensy/teensy-internal-libs/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/teensy/teensy-internal-libs/.travis.yml b/examples/teensy/teensy-internal-libs/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/teensy/teensy-internal-libs/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/timsp430/panstamp-blink/.gitignore b/examples/timsp430/panstamp-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/timsp430/panstamp-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/timsp430/panstamp-blink/.travis.yml b/examples/timsp430/panstamp-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/timsp430/panstamp-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/timsp430/timsp430-energia-blink/.gitignore b/examples/timsp430/timsp430-energia-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/timsp430/timsp430-energia-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/timsp430/timsp430-energia-blink/.travis.yml b/examples/timsp430/timsp430-energia-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/timsp430/timsp430-energia-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/timsp430/timsp430-native-blink/.gitignore b/examples/timsp430/timsp430-native-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/timsp430/timsp430-native-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/timsp430/timsp430-native-blink/.travis.yml b/examples/timsp430/timsp430-native-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/timsp430/timsp430-native-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/titiva/titiva-energia-blink/.gitignore b/examples/titiva/titiva-energia-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/titiva/titiva-energia-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/titiva/titiva-energia-blink/.travis.yml b/examples/titiva/titiva-energia-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/titiva/titiva-energia-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/titiva/titiva-native-blink/.gitignore b/examples/titiva/titiva-native-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/titiva/titiva-native-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/titiva/titiva-native-blink/.travis.yml b/examples/titiva/titiva-native-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/titiva/titiva-native-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/titiva/titiva-opencm3-blink/.gitignore b/examples/titiva/titiva-opencm3-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/titiva/titiva-opencm3-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/titiva/titiva-opencm3-blink/.travis.yml b/examples/titiva/titiva-opencm3-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/titiva/titiva-opencm3-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/wiring-blink/.gitignore b/examples/wiring-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/wiring-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/wiring-blink/.travis.yml b/examples/wiring-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/wiring-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N From faf2839a08d47280e35c944c2766e24da1171d45 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 13 Dec 2015 22:09:19 +0200 Subject: [PATCH 16/41] Remove command with target=clean --- examples/atmelavr-and-arduino/adafruit-blink/README.rst | 3 --- .../atmelavr-and-arduino/arduino-external-libs/README.rst | 3 --- .../atmelavr-and-arduino/arduino-internal-libs/README.rst | 3 --- examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst | 3 --- .../atmelavr-and-arduino/atmelavr-native-blink/README.rst | 3 --- examples/atmelavr-and-arduino/digitstump-mouse/README.rst | 3 --- .../atmelavr-and-arduino/engduino-magnetometer/README.rst | 3 --- examples/atmelavr-and-arduino/panstamp-blink/README.rst | 3 --- examples/desktop/hello-world/README.rst | 4 ++-- examples/espressif/esp8266-native/README.rst | 3 --- examples/espressif/esp8266-webserver/README.rst | 3 --- examples/espressif/esp8266-wifiscan/README.rst | 3 --- examples/mbed/mbed-blink/README.rst | 3 --- examples/mbed/mbed-dsp/README.rst | 3 --- examples/mbed/mbed-http-client/README.rst | 3 --- examples/mbed/mbed-rtos/README.rst | 3 --- examples/mbed/mbed-serial/README.rst | 3 --- examples/stm32/stm32-cmsis-blink/README.rst | 3 --- examples/stm32/stm32-opencm3-blink/README.rst | 3 --- examples/stm32/stm32-spl-blink/README.rst | 3 --- examples/teensy/teensy-hid-usb-mouse/README.rst | 3 --- examples/teensy/teensy-internal-libs/README.rst | 3 --- examples/timsp430/panstamp-blink/README.rst | 3 --- examples/timsp430/timsp430-energia-blink/README.rst | 3 --- examples/timsp430/timsp430-native-blink/README.rst | 3 --- examples/titiva/titiva-energia-blink/README.rst | 3 --- examples/titiva/titiva-native-blink/README.rst | 3 --- examples/wiring-blink/README.rst | 2 -- 28 files changed, 2 insertions(+), 82 deletions(-) diff --git a/examples/atmelavr-and-arduino/adafruit-blink/README.rst b/examples/atmelavr-and-arduino/adafruit-blink/README.rst index ca13829d..44c333f1 100644 --- a/examples/atmelavr-and-arduino/adafruit-blink/README.rst +++ b/examples/atmelavr-and-arduino/adafruit-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst b/examples/atmelavr-and-arduino/arduino-external-libs/README.rst index 279d4a5d..dfbaac94 100644 --- a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-external-libs/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst b/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst index fc4b9880..e727a3d4 100644 --- a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst b/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst index 835e4a31..ac1cf1c8 100644 --- a/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst +++ b/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst index 52e113be..520b9575 100644 --- a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst +++ b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst b/examples/atmelavr-and-arduino/digitstump-mouse/README.rst index 0526181f..afcefad9 100644 --- a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst +++ b/examples/atmelavr-and-arduino/digitstump-mouse/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst b/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst index 707a7232..9c56a802 100644 --- a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst +++ b/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/panstamp-blink/README.rst b/examples/atmelavr-and-arduino/panstamp-blink/README.rst index 248e83a3..8b4ad97a 100644 --- a/examples/atmelavr-and-arduino/panstamp-blink/README.rst +++ b/examples/atmelavr-and-arduino/panstamp-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/desktop/hello-world/README.rst b/examples/desktop/hello-world/README.rst index 2ddc6368..add2fb02 100644 --- a/examples/desktop/hello-world/README.rst +++ b/examples/desktop/hello-world/README.rst @@ -25,5 +25,5 @@ How to build PlatformIO based project # Process example project > platformio run - # Clean build files - > platformio run --target clean + # Run program + > .pioenvs/native/program diff --git a/examples/espressif/esp8266-native/README.rst b/examples/espressif/esp8266-native/README.rst index 1741b677..a7ebb110 100644 --- a/examples/espressif/esp8266-native/README.rst +++ b/examples/espressif/esp8266-native/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/espressif/esp8266-webserver/README.rst b/examples/espressif/esp8266-webserver/README.rst index 4a95b045..4716db4d 100644 --- a/examples/espressif/esp8266-webserver/README.rst +++ b/examples/espressif/esp8266-webserver/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/espressif/esp8266-wifiscan/README.rst b/examples/espressif/esp8266-wifiscan/README.rst index c4afff90..34743571 100644 --- a/examples/espressif/esp8266-wifiscan/README.rst +++ b/examples/espressif/esp8266-wifiscan/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/mbed/mbed-blink/README.rst b/examples/mbed/mbed-blink/README.rst index 57d7bfb7..10be3a99 100644 --- a/examples/mbed/mbed-blink/README.rst +++ b/examples/mbed/mbed-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/mbed/mbed-dsp/README.rst b/examples/mbed/mbed-dsp/README.rst index 519e8f49..3ade03f0 100644 --- a/examples/mbed/mbed-dsp/README.rst +++ b/examples/mbed/mbed-dsp/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/mbed/mbed-http-client/README.rst b/examples/mbed/mbed-http-client/README.rst index 58eeaabe..3658d85d 100644 --- a/examples/mbed/mbed-http-client/README.rst +++ b/examples/mbed/mbed-http-client/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/mbed/mbed-rtos/README.rst b/examples/mbed/mbed-rtos/README.rst index 07bd14d1..81fb6556 100644 --- a/examples/mbed/mbed-rtos/README.rst +++ b/examples/mbed/mbed-rtos/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/mbed/mbed-serial/README.rst b/examples/mbed/mbed-serial/README.rst index ce0d997e..8d36c8f7 100644 --- a/examples/mbed/mbed-serial/README.rst +++ b/examples/mbed/mbed-serial/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/stm32/stm32-cmsis-blink/README.rst b/examples/stm32/stm32-cmsis-blink/README.rst index 96ae3b4a..b8250201 100644 --- a/examples/stm32/stm32-cmsis-blink/README.rst +++ b/examples/stm32/stm32-cmsis-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/stm32/stm32-opencm3-blink/README.rst b/examples/stm32/stm32-opencm3-blink/README.rst index e20dc086..4c8c21ad 100644 --- a/examples/stm32/stm32-opencm3-blink/README.rst +++ b/examples/stm32/stm32-opencm3-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/stm32/stm32-spl-blink/README.rst b/examples/stm32/stm32-spl-blink/README.rst index f5c49a3c..1d9dc1dd 100644 --- a/examples/stm32/stm32-spl-blink/README.rst +++ b/examples/stm32/stm32-spl-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/teensy/teensy-hid-usb-mouse/README.rst b/examples/teensy/teensy-hid-usb-mouse/README.rst index abcaa507..4b5d40b0 100644 --- a/examples/teensy/teensy-hid-usb-mouse/README.rst +++ b/examples/teensy/teensy-hid-usb-mouse/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/teensy/teensy-internal-libs/README.rst b/examples/teensy/teensy-internal-libs/README.rst index 6876b7d0..07452ca1 100644 --- a/examples/teensy/teensy-internal-libs/README.rst +++ b/examples/teensy/teensy-internal-libs/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/timsp430/panstamp-blink/README.rst b/examples/timsp430/panstamp-blink/README.rst index d666a983..a4bbe100 100644 --- a/examples/timsp430/panstamp-blink/README.rst +++ b/examples/timsp430/panstamp-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/timsp430/timsp430-energia-blink/README.rst b/examples/timsp430/timsp430-energia-blink/README.rst index b8ee24f2..3c66c847 100644 --- a/examples/timsp430/timsp430-energia-blink/README.rst +++ b/examples/timsp430/timsp430-energia-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/timsp430/timsp430-native-blink/README.rst b/examples/timsp430/timsp430-native-blink/README.rst index 0357935c..dabf9e09 100644 --- a/examples/timsp430/timsp430-native-blink/README.rst +++ b/examples/timsp430/timsp430-native-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/titiva/titiva-energia-blink/README.rst b/examples/titiva/titiva-energia-blink/README.rst index 02ffa896..3a92313f 100644 --- a/examples/titiva/titiva-energia-blink/README.rst +++ b/examples/titiva/titiva-energia-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/titiva/titiva-native-blink/README.rst b/examples/titiva/titiva-native-blink/README.rst index d70ae849..ab756424 100644 --- a/examples/titiva/titiva-native-blink/README.rst +++ b/examples/titiva/titiva-native-blink/README.rst @@ -27,6 +27,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - - # Clean build files - > platformio run --target clean diff --git a/examples/wiring-blink/README.rst b/examples/wiring-blink/README.rst index 2e599e25..8b61744d 100644 --- a/examples/wiring-blink/README.rst +++ b/examples/wiring-blink/README.rst @@ -28,5 +28,3 @@ How to build PlatformIO based project # Upload firmware > platformio run --target upload - # Clean build files - > platformio run --target clean From abf4376d2017c310ea16d8574ffa273bbb2f0935 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 13 Dec 2015 22:09:50 +0200 Subject: [PATCH 17/41] Add example with upload_port=IP_ADDRESS for OTA --- docs/projectconf.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/projectconf.rst b/docs/projectconf.rst index abf14071..da086d04 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -196,6 +196,7 @@ This option is used by "uploader" tool when sending firmware to board via * ``/dev/ttyUSB0`` - Unix-based OS * ``COM3`` - Windows OS +* ``192.168.0.13`` - IP address when using OTA If ``upload_port`` isn't specified, then *PlatformIO* will try to detect it automatically. From 1541537d0d8bf6aa688b6a79dc1aeb6dc350e4a0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 13 Dec 2015 23:27:37 +0200 Subject: [PATCH 18/41] Don't print any maintenance information for --json-output requests --- platformio/maintenance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 5d5d9496..6209e19c 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -40,7 +40,8 @@ def on_platformio_start(ctx, force, caller): telemetry.on_command() # skip any check operations when upgrade command - if len(ctx.args or []) and ctx.args[0] == "upgrade": + ctx_args = ctx.args or [] + if ctx_args and (ctx.args[0] == "upgrade" or "--json-output" in ctx_args): return after_upgrade(ctx) From 73cc3e3ac8ff61de83a80a49a93ed6c99d7be112 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 00:05:33 +0200 Subject: [PATCH 19/41] Handle more search args for "lib search" --- platformio/commands/lib.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index 7a988900..144589c4 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -60,16 +60,16 @@ def cli(): @click.option("-k", "--keyword", multiple=True) @click.option("-f", "--framework", multiple=True) @click.option("-p", "--platform", multiple=True) -@click.argument("query", required=False) +@click.argument("query", required=False, nargs=-1) def lib_search(query, **filters): if not query: - query = "" + query = [] for key, values in filters.iteritems(): for value in values: - query += ' %s:"%s"' % (key, value) + query.append('%s:"%s"' % (key, value)) - result = get_api_result("/lib/search", dict(query=query)) + result = get_api_result("/lib/search", dict(query=" ".join(query))) if result['total'] == 0: click.secho( "Nothing has been found by your request\n" @@ -100,7 +100,7 @@ def lib_search(query, **filters): click.confirm("Show next libraries?")): result = get_api_result( "/lib/search", - dict(query=query, page=str(int(result['page']) + 1)) + dict(query=" ".join(query), page=str(int(result['page']) + 1)) ) else: break From 3595c2cc880c76dc1cda95c417eb41b33a1c269d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 00:40:41 +0200 Subject: [PATCH 20/41] More explanation about telemetry service --- docs/userguide/cmd_settings.rst | 10 +++++++--- platformio/app.py | 7 +++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/userguide/cmd_settings.rst b/docs/userguide/cmd_settings.rst index 0ffb4f64..6ea784da 100644 --- a/docs/userguide/cmd_settings.rst +++ b/docs/userguide/cmd_settings.rst @@ -113,8 +113,12 @@ Can PlatformIO communicate with you via prompts? :Default: Yes :Values: Yes/No -Shares commands, platforms and libraries usage to help us make PlatformIO -better. +Share diagnostics and usage information (PlatformIO fatal errors/exceptions, +platforms, boards, frameworks, commands) to help us make PlatformIO better. +The `source code for telemetry service `_ +is open source. You can make sure that we DO NOT share PRIVATE information or +source code of your project. All information shares anonymously. Thanks a lot +that live this setting enabled. .. note:: @@ -138,7 +142,7 @@ Examples check_platformio_interval 3 Check for the new PlatformIO interval (days) check_platforms_interval 7 Check for the platform updates interval (days) enable_prompts Yes Can PlatformIO communicate with you via prompts: propose to install platforms which aren't installed yet, paginate over library search results and etc.)? ATTENTION!!! If you call PlatformIO like subprocess, please disable prompts to avoid blocking (Yes/No) - enable_telemetry Yes Shares commands, platforms and libraries usage to help us make PlatformIO better (Yes/No) + enable_telemetry Yes Share diagnostics and usage information (PlatformIO fatal errors/exceptions, platforms, boards, frameworks, commands) to help us make PlatformIO better (Yes/No) 2. Show specified setting diff --git a/platformio/app.py b/platformio/app.py index 8b2d9417..0c52cff1 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -46,8 +46,11 @@ DEFAULT_SETTINGS = { "value": False }, "enable_telemetry": { - "description": ("Shares commands, platforms and libraries usage" - " to help us make PlatformIO better (Yes/No)"), + "description": ( + "Share diagnostics and usage information (PlatformIO fatal " + "errors/exceptions, platforms, boards, frameworks, commands) " + "to help us make PlatformIO better. We DO NOT share PRIVATE " + "information (Yes/No)"), "value": True }, "enable_prompts": { From c4d5960eb664806bf43076f03c82a338d634f449 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 00:46:17 +0200 Subject: [PATCH 21/41] Fix multiple search queries to "lib search" --- platformio/commands/lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index 144589c4..b8d8c90a 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -64,6 +64,8 @@ def cli(): def lib_search(query, **filters): if not query: query = [] + if not isinstance(query, list): + query = list(query) for key, values in filters.iteritems(): for value in values: From 4e90a2fd424eeb078957b779a211d9643c516566 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 01:14:02 +0200 Subject: [PATCH 22/41] Fix test for settings command --- tests/commands/test_settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/commands/test_settings.py b/tests/commands/test_settings.py index 312b0e80..b12d398e 100644 --- a/tests/commands/test_settings.py +++ b/tests/commands/test_settings.py @@ -18,7 +18,8 @@ from platformio import app def test_settings_check(clirunner, validate_cliresult): result = clirunner.invoke(cli, ["get"]) - validate_cliresult(result) + assert result.exit_code == 0 + assert not result.exception assert len(result.output) for item in app.DEFAULT_SETTINGS.items(): assert item[0] in result.output From 9eae55f03c7245232017d8463d4ddbbccaa691ba Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 11:30:39 +0200 Subject: [PATCH 23/41] Add link to telemetry setting --- docs/userguide/cmd_settings.rst | 2 +- platformio/app.py | 6 ++---- tests/commands/test_settings.py | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/userguide/cmd_settings.rst b/docs/userguide/cmd_settings.rst index 6ea784da..95a2187e 100644 --- a/docs/userguide/cmd_settings.rst +++ b/docs/userguide/cmd_settings.rst @@ -142,7 +142,7 @@ Examples check_platformio_interval 3 Check for the new PlatformIO interval (days) check_platforms_interval 7 Check for the platform updates interval (days) enable_prompts Yes Can PlatformIO communicate with you via prompts: propose to install platforms which aren't installed yet, paginate over library search results and etc.)? ATTENTION!!! If you call PlatformIO like subprocess, please disable prompts to avoid blocking (Yes/No) - enable_telemetry Yes Share diagnostics and usage information (PlatformIO fatal errors/exceptions, platforms, boards, frameworks, commands) to help us make PlatformIO better (Yes/No) + enable_telemetry Yes Telemetry service (Yes/No) 2. Show specified setting diff --git a/platformio/app.py b/platformio/app.py index 0c52cff1..2e522aa6 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -47,10 +47,8 @@ DEFAULT_SETTINGS = { }, "enable_telemetry": { "description": ( - "Share diagnostics and usage information (PlatformIO fatal " - "errors/exceptions, platforms, boards, frameworks, commands) " - "to help us make PlatformIO better. We DO NOT share PRIVATE " - "information (Yes/No)"), + "Telemetry service (Yes/No)"), "value": True }, "enable_prompts": { diff --git a/tests/commands/test_settings.py b/tests/commands/test_settings.py index b12d398e..312b0e80 100644 --- a/tests/commands/test_settings.py +++ b/tests/commands/test_settings.py @@ -18,8 +18,7 @@ from platformio import app def test_settings_check(clirunner, validate_cliresult): result = clirunner.invoke(cli, ["get"]) - assert result.exit_code == 0 - assert not result.exception + validate_cliresult(result) assert len(result.output) for item in app.DEFAULT_SETTINGS.items(): assert item[0] in result.output From becec986eafa84a2d17c4423be3b560aec469b75 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 18:47:50 +0200 Subject: [PATCH 24/41] More explanations about library.json --- docs/librarymanager/config.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/librarymanager/config.rst b/docs/librarymanager/config.rst index d6ae06a6..b2ef756f 100644 --- a/docs/librarymanager/config.rst +++ b/docs/librarymanager/config.rst @@ -15,11 +15,17 @@ library.json ============ -``library.json`` is a manifest file of development library. +``library.json`` is a manifest file of development library. It allows developers +to keep project in own structure and define: -Initially it was -developed for :ref:`librarymanager`, but later was accepted by worldwide embedded -community like a **standard library specification**. +* location of source code +* examples list +* compatible frameworks and platforms +* library dependencies + +PlatformIO Library Crawler uses ``library.json`` manifest to extract +source code from developer's location and keeps cleaned library in own +Libraries Storage. A data in ``library.json`` should be represented in `JSON-style `_ via From 94bb0dc43e9af5f6f7f96c8ea31bd7d1d8ed9807 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 19:21:23 +0200 Subject: [PATCH 25/41] Revert back step with upgrading for pip/setuptools // Resolve #371 --- docs/installation.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/installation.rst b/docs/installation.rst index d810dbae..5912a302 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -57,6 +57,10 @@ The latest stable version of PlatformIO may be installed or upgraded via .. code-block:: bash + # update package installer + pip install -U pip setuptools + + # install or upgrade PlatformIO pip install -U platformio Note that you may run into permissions issues running these commands. You have @@ -126,6 +130,10 @@ c) Full Guide .. code-block:: bash + # update package installer + pip install -U pip setuptools + + # install or upgrade PlatformIO pip install -U platformio If your computer does not recognize ``pip`` command, try to install it first @@ -144,6 +152,10 @@ Install the latest PlatformIO from the ``develop`` branch: .. code-block:: bash + # update package installer + pip install -U pip setuptools + + # install the latest development version of PlatformIO pip install -U https://github.com/platformio/platformio/archive/develop.zip If you want to be up-to-date with the latest ``develop`` version of PlatformIO, From d4e4ab07a675c9273b232c1b186ff89ccafc63f9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 19:40:59 +0200 Subject: [PATCH 26/41] Add copyrights --- docs/frameworks/arduino.rst | 11 +++++++++++ docs/frameworks/cmsis.rst | 11 +++++++++++ docs/frameworks/energia.rst | 11 +++++++++++ docs/frameworks/libopencm3.rst | 11 +++++++++++ docs/frameworks/mbed.rst | 11 +++++++++++ docs/frameworks/spl.rst | 11 +++++++++++ 6 files changed, 66 insertions(+) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 2d7994d1..78d26895 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -1,3 +1,14 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + .. _framework_arduino: Framework ``arduino`` diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index 9f23425c..cb0b293f 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -1,3 +1,14 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + .. _framework_cmsis: Framework ``cmsis`` diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst index 0f2b4397..f78ddf1c 100644 --- a/docs/frameworks/energia.rst +++ b/docs/frameworks/energia.rst @@ -1,3 +1,14 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + .. _framework_energia: Framework ``energia`` diff --git a/docs/frameworks/libopencm3.rst b/docs/frameworks/libopencm3.rst index a4a3aca7..3a6fbaa2 100644 --- a/docs/frameworks/libopencm3.rst +++ b/docs/frameworks/libopencm3.rst @@ -1,3 +1,14 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + .. _framework_libopencm3: Framework ``libopencm3`` diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index 77cd07a6..54783fe3 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -1,3 +1,14 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + .. _framework_mbed: Framework ``mbed`` diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index 1d131c34..54b7f680 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -1,3 +1,14 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + .. _framework_spl: Framework ``spl`` From 004125a2ca451191554842fca8cc8220e1052e89 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 19:50:50 +0200 Subject: [PATCH 27/41] Add support for Raspberry Pi WiringPi framework // Resolve #372 --- HISTORY.rst | 5 +- docs/frameworks/index.rst | 1 + docs/frameworks/wiringpi.rst | 62 +++++++++++++++ docs/platforms/native.rst | 45 ++++++++++- .../raspberrypi/wiringpi-blink/.gitignore | 1 + examples/raspberrypi/wiringpi-blink/.skiptest | 0 .../raspberrypi/wiringpi-blink/.travis.yml | 65 ++++++++++++++++ .../raspberrypi/wiringpi-blink/README.rst | 29 +++++++ .../raspberrypi/wiringpi-blink/lib/readme.txt | 38 ++++++++++ .../raspberrypi/wiringpi-blink/platformio.ini | 23 ++++++ .../raspberrypi/wiringpi-blink/src/blink.c | 48 ++++++++++++ .../raspberrypi/wiringpi-serial/.gitignore | 1 + .../raspberrypi/wiringpi-serial/.skiptest | 0 .../raspberrypi/wiringpi-serial/.travis.yml | 65 ++++++++++++++++ .../raspberrypi/wiringpi-serial/README.rst | 29 +++++++ .../wiringpi-serial/lib/readme.txt | 38 ++++++++++ .../wiringpi-serial/platformio.ini | 23 ++++++ .../wiringpi-serial/src/serialTest.c | 75 +++++++++++++++++++ platformio/__init__.py | 2 +- platformio/boards/raspberrypi.json | 53 +++++++++++++ .../builder/scripts/frameworks/wiringpi.py | 65 ++++++++++++++++ platformio/builder/tools/platformio.py | 38 ++++++---- scripts/docspregen.py | 16 ++++ tests/test_examples.py | 2 +- 24 files changed, 704 insertions(+), 20 deletions(-) create mode 100644 docs/frameworks/wiringpi.rst create mode 100644 examples/raspberrypi/wiringpi-blink/.gitignore create mode 100644 examples/raspberrypi/wiringpi-blink/.skiptest create mode 100644 examples/raspberrypi/wiringpi-blink/.travis.yml create mode 100644 examples/raspberrypi/wiringpi-blink/README.rst create mode 100644 examples/raspberrypi/wiringpi-blink/lib/readme.txt create mode 100644 examples/raspberrypi/wiringpi-blink/platformio.ini create mode 100644 examples/raspberrypi/wiringpi-blink/src/blink.c create mode 100644 examples/raspberrypi/wiringpi-serial/.gitignore create mode 100644 examples/raspberrypi/wiringpi-serial/.skiptest create mode 100644 examples/raspberrypi/wiringpi-serial/.travis.yml create mode 100644 examples/raspberrypi/wiringpi-serial/README.rst create mode 100644 examples/raspberrypi/wiringpi-serial/lib/readme.txt create mode 100644 examples/raspberrypi/wiringpi-serial/platformio.ini create mode 100644 examples/raspberrypi/wiringpi-serial/src/serialTest.c create mode 100644 platformio/boards/raspberrypi.json create mode 100644 platformio/builder/scripts/frameworks/wiringpi.py diff --git a/HISTORY.rst b/HISTORY.rst index 387714aa..52bda7be 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,9 +4,12 @@ Release History PlatformIO 2.0 -------------- -2.5.1 (2015-12-??) +2.6.0 (2015-12-??) ~~~~~~~~~~~~~~~~~~ +* Added support for Raspberry Pi `WiringPi `__ + framework + (`issue #372 `_) * Implemented Over The Air (OTA) upgrades for `Espressif `__ development platform. (`issue #365 `_) diff --git a/docs/frameworks/index.rst b/docs/frameworks/index.rst index e1b2bd89..1aff07e4 100644 --- a/docs/frameworks/index.rst +++ b/docs/frameworks/index.rst @@ -23,3 +23,4 @@ Frameworks libopencm3 mbed spl + wiringpi diff --git a/docs/frameworks/wiringpi.rst b/docs/frameworks/wiringpi.rst new file mode 100644 index 00000000..004a7ff2 --- /dev/null +++ b/docs/frameworks/wiringpi.rst @@ -0,0 +1,62 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +.. _framework_wiringpi: + +Framework ``wiringpi`` +====================== +WiringPi is a GPIO access library written in C for the BCM2835 used in the Raspberry Pi. It's designed to be familiar to people who have used the Arduino "wiring" system. + +For more detailed information please visit `vendor site `_. + +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Boards Explorer `_ + * For more detailed ``board`` information please scroll tables below by horizontal. + +Raspberry Pi +~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``raspberrypi_1b`` + - `Raspberry Pi 1 Model B `_ + - BCM2835 + - 700 MHz + - 524288 Kb + - 524288 Kb + + * - ``raspberrypi_2b`` + - `Raspberry Pi 2 Model B `_ + - BCM2836 + - 900 MHz + - 1048576 Kb + - 1048576 Kb + + * - ``raspberrypi_zero`` + - `Raspberry Pi Zero `_ + - BCM2835 + - 1000 MHz + - 524288 Kb + - 524288 Kb diff --git a/docs/platforms/native.rst b/docs/platforms/native.rst index ba4864d0..8094d0bc 100644 --- a/docs/platforms/native.rst +++ b/docs/platforms/native.rst @@ -17,4 +17,47 @@ Native development platform is intended to be used for desktop OS. This platform For more detailed information please visit `vendor site `_. -.. contents:: \ No newline at end of file +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Boards Explorer `_ + * For more detailed ``board`` information please scroll tables below by + horizontal. + +Raspberry Pi +~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``raspberrypi_1b`` + - `Raspberry Pi 1 Model B `_ + - BCM2835 + - 700 MHz + - 524288 Kb + - 524288 Kb + + * - ``raspberrypi_2b`` + - `Raspberry Pi 2 Model B `_ + - BCM2836 + - 900 MHz + - 1048576 Kb + - 1048576 Kb + + * - ``raspberrypi_zero`` + - `Raspberry Pi Zero `_ + - BCM2835 + - 1000 MHz + - 524288 Kb + - 524288 Kb diff --git a/examples/raspberrypi/wiringpi-blink/.gitignore b/examples/raspberrypi/wiringpi-blink/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/raspberrypi/wiringpi-blink/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/raspberrypi/wiringpi-blink/.skiptest b/examples/raspberrypi/wiringpi-blink/.skiptest new file mode 100644 index 00000000..e69de29b diff --git a/examples/raspberrypi/wiringpi-blink/.travis.yml b/examples/raspberrypi/wiringpi-blink/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/raspberrypi/wiringpi-blink/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/raspberrypi/wiringpi-blink/README.rst b/examples/raspberrypi/wiringpi-blink/README.rst new file mode 100644 index 00000000..c6a571ca --- /dev/null +++ b/examples/raspberrypi/wiringpi-blink/README.rst @@ -0,0 +1,29 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +How to build PlatformIO based project +===================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/raspberrypi/wiringpi-blink + + # Process example project + > platformio run + + # Run program + > .pioenvs/raspberrypi_2b/program diff --git a/examples/raspberrypi/wiringpi-blink/lib/readme.txt b/examples/raspberrypi/wiringpi-blink/lib/readme.txt new file mode 100644 index 00000000..b06c9408 --- /dev/null +++ b/examples/raspberrypi/wiringpi-blink/lib/readme.txt @@ -0,0 +1,38 @@ + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory, like +"lib/private_lib/[here are source files]". + +For example, see how can be organised `Foo` and `Bar` libraries: + +|--lib +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| |--Foo +| | |- Foo.c +| | |- Foo.h +| |- readme.txt --> THIS FILE +|- platformio.ini +|--src + |- main.c + +Then in `src/main.c` you should use: + +#include +#include + +// rest H/C/CPP code + +PlatformIO will find your libraries automatically, configure preprocessor's +include paths and build them. + +See additional options for PlatformIO Library Dependency Finder `lib_*`: + +http://docs.platformio.org/en/latest/projectconf.html#lib-install + diff --git a/examples/raspberrypi/wiringpi-blink/platformio.ini b/examples/raspberrypi/wiringpi-blink/platformio.ini new file mode 100644 index 00000000..e295bad2 --- /dev/null +++ b/examples/raspberrypi/wiringpi-blink/platformio.ini @@ -0,0 +1,23 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + +[env:raspberrypi_2b] +platform = native +framework = wiringpi +board = raspberrypi_2b diff --git a/examples/raspberrypi/wiringpi-blink/src/blink.c b/examples/raspberrypi/wiringpi-blink/src/blink.c new file mode 100644 index 00000000..c27a20e3 --- /dev/null +++ b/examples/raspberrypi/wiringpi-blink/src/blink.c @@ -0,0 +1,48 @@ +/* + * blink.c: + * Standard "blink" program in wiringPi. Blinks an LED connected + * to the first GPIO pin. + * + * Copyright (c) 2012-2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#include +#include + +// LED Pin - wiringPi pin 0 is BCM_GPIO 17. + +#define LED 0 + +int main (void) +{ + printf ("Raspberry Pi blink\n") ; + + wiringPiSetup () ; + pinMode (LED, OUTPUT) ; + + for (;;) + { + digitalWrite (LED, HIGH) ; // On + delay (500) ; // mS + digitalWrite (LED, LOW) ; // Off + delay (500) ; + } + return 0 ; +} diff --git a/examples/raspberrypi/wiringpi-serial/.gitignore b/examples/raspberrypi/wiringpi-serial/.gitignore new file mode 100644 index 00000000..e90612ed --- /dev/null +++ b/examples/raspberrypi/wiringpi-serial/.gitignore @@ -0,0 +1 @@ +.pioenvs \ No newline at end of file diff --git a/examples/raspberrypi/wiringpi-serial/.skiptest b/examples/raspberrypi/wiringpi-serial/.skiptest new file mode 100644 index 00000000..e69de29b diff --git a/examples/raspberrypi/wiringpi-serial/.travis.yml b/examples/raspberrypi/wiringpi-serial/.travis.yml new file mode 100644 index 00000000..b57f6fa8 --- /dev/null +++ b/examples/raspberrypi/wiringpi-serial/.travis.yml @@ -0,0 +1,65 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/en/latest/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/en/latest/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# env: +# - PLATFORMIO_CI_SRC=path/to/test/file.c +# - PLATFORMIO_CI_SRC=examples/file.ino +# - PLATFORMIO_CI_SRC=path/to/test/directory +# +# install: +# - pip install -U platformio +# +# script: +# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N diff --git a/examples/raspberrypi/wiringpi-serial/README.rst b/examples/raspberrypi/wiringpi-serial/README.rst new file mode 100644 index 00000000..fbcc9f28 --- /dev/null +++ b/examples/raspberrypi/wiringpi-serial/README.rst @@ -0,0 +1,29 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +How to build PlatformIO based project +===================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/raspberrypi/wiringpi-serial + + # Process example project + > platformio run + + # Run program + > .pioenvs/raspberrypi_2b/program diff --git a/examples/raspberrypi/wiringpi-serial/lib/readme.txt b/examples/raspberrypi/wiringpi-serial/lib/readme.txt new file mode 100644 index 00000000..b06c9408 --- /dev/null +++ b/examples/raspberrypi/wiringpi-serial/lib/readme.txt @@ -0,0 +1,38 @@ + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory, like +"lib/private_lib/[here are source files]". + +For example, see how can be organised `Foo` and `Bar` libraries: + +|--lib +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| |--Foo +| | |- Foo.c +| | |- Foo.h +| |- readme.txt --> THIS FILE +|- platformio.ini +|--src + |- main.c + +Then in `src/main.c` you should use: + +#include +#include + +// rest H/C/CPP code + +PlatformIO will find your libraries automatically, configure preprocessor's +include paths and build them. + +See additional options for PlatformIO Library Dependency Finder `lib_*`: + +http://docs.platformio.org/en/latest/projectconf.html#lib-install + diff --git a/examples/raspberrypi/wiringpi-serial/platformio.ini b/examples/raspberrypi/wiringpi-serial/platformio.ini new file mode 100644 index 00000000..e295bad2 --- /dev/null +++ b/examples/raspberrypi/wiringpi-serial/platformio.ini @@ -0,0 +1,23 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + +[env:raspberrypi_2b] +platform = native +framework = wiringpi +board = raspberrypi_2b diff --git a/examples/raspberrypi/wiringpi-serial/src/serialTest.c b/examples/raspberrypi/wiringpi-serial/src/serialTest.c new file mode 100644 index 00000000..0d6da5f0 --- /dev/null +++ b/examples/raspberrypi/wiringpi-serial/src/serialTest.c @@ -0,0 +1,75 @@ +/* + * serialTest.c: + * Very simple program to test the serial port. Expects + * the port to be looped back to itself + * + * Copyright (c) 2012-2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#include +#include +#include + +#include +#include + +int main () +{ + int fd ; + int count ; + unsigned int nextTime ; + + if ((fd = serialOpen ("/dev/ttyAMA0", 115200)) < 0) + { + fprintf (stderr, "Unable to open serial device: %s\n", strerror (errno)) ; + return 1 ; + } + + if (wiringPiSetup () == -1) + { + fprintf (stdout, "Unable to start wiringPi: %s\n", strerror (errno)) ; + return 1 ; + } + + nextTime = millis () + 300 ; + + for (count = 0 ; count < 256 ; ) + { + if (millis () > nextTime) + { + printf ("\nOut: %3d: ", count) ; + fflush (stdout) ; + serialPutchar (fd, count) ; + nextTime += 300 ; + ++count ; + } + + delay (3) ; + + while (serialDataAvail (fd)) + { + printf (" -> %3d", serialGetchar (fd)) ; + fflush (stdout) ; + } + } + + printf ("\n") ; + return 0 ; +} diff --git a/platformio/__init__.py b/platformio/__init__.py index 7c330bb1..0e62f577 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (2, 5, "1.dev1") +VERSION = (2, 6, "0.dev0") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/boards/raspberrypi.json b/platformio/boards/raspberrypi.json new file mode 100644 index 00000000..9499b8a0 --- /dev/null +++ b/platformio/boards/raspberrypi.json @@ -0,0 +1,53 @@ +{ + "raspberrypi_1b": { + "build": { + "extra_flags": "-DRASPBERRYPI -DRASPBERRYPI1", + "f_cpu": "700000000L", + "mcu": "bcm2835" + }, + "frameworks": ["wiringpi"], + "name": "Raspberry Pi 1 Model B", + "platform": "native", + "upload": { + "maximum_ram_size": 536870912, + "maximum_size": 536870912 + }, + "url": "https://www.raspberrypi.org", + "vendor": "Raspberry Pi" + }, + + "raspberrypi_2b": { + "build": { + "core": "esp8266", + "extra_flags": "-DRASPBERRYPI -DRASPBERRYPI2", + "f_cpu": "900000000L", + "mcu": "bcm2836" + }, + "frameworks": ["wiringpi"], + "name": "Raspberry Pi 2 Model B", + "platform": "native", + "upload": { + "maximum_ram_size": 1073741824, + "maximum_size": 1073741824 + }, + "url": "https://www.raspberrypi.org", + "vendor": "Raspberry Pi" + }, + + "raspberrypi_zero": { + "build": { + "extra_flags": "-DRASPBERRYPI -DRASPBERRYPIZERO", + "f_cpu": "1000000000L", + "mcu": "bcm2835" + }, + "frameworks": ["wiringpi"], + "name": "Raspberry Pi Zero", + "platform": "native", + "upload": { + "maximum_ram_size": 536870912, + "maximum_size": 536870912 + }, + "url": "https://www.raspberrypi.org", + "vendor": "Raspberry Pi" + } +} diff --git a/platformio/builder/scripts/frameworks/wiringpi.py b/platformio/builder/scripts/frameworks/wiringpi.py new file mode 100644 index 00000000..7ef80892 --- /dev/null +++ b/platformio/builder/scripts/frameworks/wiringpi.py @@ -0,0 +1,65 @@ +# Copyright 2014-2015 Ivan Kravets +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +WiringPi + +WiringPi is a GPIO access library written in C for the BCM2835 used in the +Raspberry Pi. It's designed to be familiar to people who have used the Arduino +"wiring" system. + +http://wiringpi.com +""" + +from os.path import join + +from SCons.Script import DefaultEnvironment + +env = DefaultEnvironment() + +env.Replace( + CPPFLAGS=[ + "-O2", + "-Wformat=2", + "-Wall", + "-Winline", + "-pipe", + "-fPIC" + ], + + LIBS=["pthread"] +) + +env.Append( + CPPDEFINES=[ + "_GNU_SOURCE" + ], + + CPPPATH=[ + join("$BUILD_DIR", "FrameworkWiringPi") + ] +) + + +# +# Target: Build Core Library +# + +libs = [] +libs.append(env.BuildLibrary( + join("$BUILD_DIR", "FrameworkWiringPi"), + join("$PIOPACKAGES_DIR", "framework-wiringpi", "wiringPi") +)) + +env.Append(LIBS=libs) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index c9e82a22..6db8acfe 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -46,7 +46,10 @@ def BuildProgram(env): env.get("BUILD_FLAGS"), getenv("PLATFORMIO_BUILD_FLAGS"), ]) - env.BuildFramework() + + if env.get("FRAMEWORK"): + env.BuildFrameworks([ + f.lower().strip() for f in env.get("FRAMEWORK", "").split(",")]) # build dependent libs deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR") @@ -171,23 +174,26 @@ def LookupSources(env, variant_dir, src_dir, duplicate=True, src_filter=None): return sources -def BuildFramework(env): - if "FRAMEWORK" not in env or "uploadlazy" in COMMAND_LINE_TARGETS: +def BuildFrameworks(env, frameworks): + if not frameworks or "uploadlazy" in COMMAND_LINE_TARGETS: return - if env['FRAMEWORK'].lower() in ("arduino", "energia"): - env.ConvertInoToCpp() - - for f in env['FRAMEWORK'].split(","): - framework = f.strip().lower() - if framework in env.get("BOARD_OPTIONS", {}).get("frameworks"): - SConscript( - env.subst(join("$PIOBUILDER_DIR", "scripts", "frameworks", - "%s.py" % framework)) - ) + board_frameworks = env.get("BOARD_OPTIONS", {}).get("frameworks") + if frameworks == ["platformio"]: + if board_frameworks: + frameworks.insert(0, board_frameworks[0]) else: - Exit("Error: This board doesn't support %s framework!" % - framework) + Exit("Error: Please specify board type") + + for f in frameworks: + if f in ("arduino", "energia"): + env.ConvertInoToCpp() + + if f in board_frameworks: + SConscript(env.subst( + join("$PIOBUILDER_DIR", "scripts", "frameworks", "%s.py" % f))) + else: + Exit("Error: This board doesn't support %s framework!" % f) def BuildLibrary(env, variant_dir, src_dir, src_filter=None): @@ -351,7 +357,7 @@ def generate(env): env.AddMethod(IsFileWithExt) env.AddMethod(VariantDirWrap) env.AddMethod(LookupSources) - env.AddMethod(BuildFramework) + env.AddMethod(BuildFrameworks) env.AddMethod(BuildLibrary) env.AddMethod(BuildDependentLibraries) return env diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 378d42d9..290c34fe 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -226,6 +226,18 @@ def generate_framework(type_, data): print "Processing framework: %s" % type_ lines = [] + lines.append(""".. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""") + lines.append(".. _framework_%s:" % type_) lines.append("") @@ -248,15 +260,19 @@ Platforms * - Name - Description""") + _found_platform = False for platform in sorted(PlatformFactory.get_platforms().keys()): if not is_compat_platform_and_framework(platform, type_): continue + _found_platform = True p = PlatformFactory.newPlatform(platform) lines.append(""" * - :ref:`platform_{type_}` - {description}""".format( type_=platform, description=p.get_description())) + if not _found_platform: + del lines[-1] lines.append(""" Boards diff --git a/tests/test_examples.py b/tests/test_examples.py index 702a82ab..0089c27f 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -28,7 +28,7 @@ def pytest_generate_tests(metafunc): example_dirs = normpath(join(dirname(__file__), "..", "examples")) project_dirs = [] for root, _, files in walk(example_dirs): - if "platformio.ini" not in files: + if "platformio.ini" not in files or ".skiptest" in files: continue project_dirs.append(root) project_dirs.sort() From a85bf3270062d945c4c17378ff74a80f3e142a52 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Dec 2015 22:44:16 +0200 Subject: [PATCH 28/41] Use "format" to format exception messages --- platformio/exception.py | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/platformio/exception.py b/platformio/exception.py index 48d109ae..ee7f565d 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -19,7 +19,7 @@ class PlatformioException(Exception): def __str__(self): # pragma: no cover if self.MESSAGE: - return self.MESSAGE % self.args + return self.MESSAGE.format(*self.args) else: return Exception.__str__(self) @@ -39,13 +39,13 @@ class AbortedByUser(PlatformioException): class UnknownPlatform(PlatformioException): - MESSAGE = "Unknown platform '%s'" + MESSAGE = "Unknown platform '{0}'" class PlatformNotInstalledYet(PlatformioException): - MESSAGE = "The platform '%s' has not been installed yet. "\ - "Use `platformio platforms install` command" + MESSAGE = "The platform '{0}' has not been installed yet. "\ + "Use `platformio platforms install {0}` command" class BoardNotDefined(PlatformioException): @@ -57,61 +57,61 @@ class BoardNotDefined(PlatformioException): class UnknownBoard(PlatformioException): - MESSAGE = "Unknown board type '%s'" + MESSAGE = "Unknown board type '{0}'" class UnknownFramework(PlatformioException): - MESSAGE = "Unknown framework '%s'" + MESSAGE = "Unknown framework '{0}'" class UnknownPackage(PlatformioException): - MESSAGE = "Detected unknown package '%s'" + MESSAGE = "Detected unknown package '{0}'" class InvalidPackageVersion(PlatformioException): - MESSAGE = "The package '%s' with version '%d' does not exist" + MESSAGE = "The package '{0}' with version '{1:d}' does not exist" class NonSystemPackage(PlatformioException): - MESSAGE = "The package '%s' is not available for your system '%s'" + MESSAGE = "The package '{0}' is not available for your system '{1}'" class FDUnrecognizedStatusCode(PlatformioException): - MESSAGE = "Got an unrecognized status code '%s' when downloaded %s" + MESSAGE = "Got an unrecognized status code '{0}' when downloaded {1}" class FDSizeMismatch(PlatformioException): - MESSAGE = "The size (%d bytes) of downloaded file '%s' "\ - "is not equal to remote size (%d bytes)" + MESSAGE = "The size ({0:d} bytes) of downloaded file '{1}' "\ + "is not equal to remote size ({2:d} bytes)" class FDSHASumMismatch(PlatformioException): - MESSAGE = "The 'sha1' sum '%s' of downloaded file '%s' "\ - "is not equal to remote '%s'" + MESSAGE = "The 'sha1' sum '{0}' of downloaded file '{1}' "\ + "is not equal to remote '{2}'" class NotPlatformProject(PlatformioException): MESSAGE = "Not a PlatformIO project. `platformio.ini` file has not been "\ - "found in current working directory (%s). To initialize new project "\ + "found in current working directory ({0}). To initialize new project "\ "please use `platformio init` command" class UndefinedEnvPlatform(PlatformioException): - MESSAGE = "Please specify platform for '%s' environment" + MESSAGE = "Please specify platform for '{0}' environment" class UnsupportedArchiveType(PlatformioException): - MESSAGE = "Can not unpack file '%s'" + MESSAGE = "Can not unpack file '{0}'" class ProjectEnvsNotAvailable(PlatformioException): @@ -121,23 +121,23 @@ class ProjectEnvsNotAvailable(PlatformioException): class InvalidEnvName(PlatformioException): - MESSAGE = "Invalid environment '%s'. The name must start with 'env:'" + MESSAGE = "Invalid environment '{0}'. The name must start with 'env:'" class UnknownEnvNames(PlatformioException): - MESSAGE = "Unknown environment names '%s'. Valid names are '%s'" + MESSAGE = "Unknown environment names '{0}'. Valid names are '{1}'" class CleanPioenvsDirError(PlatformioException): - MESSAGE = "Can not remove temporary directory `%s`. "\ + MESSAGE = "Can not remove temporary directory `{0}`. "\ "Please remove it manually" class GetSerialPortsError(PlatformioException): - MESSAGE = "No implementation for your platform ('%s') available" + MESSAGE = "No implementation for your platform ('{0}') available" class GetLatestVersionError(PlatformioException): @@ -147,7 +147,7 @@ class GetLatestVersionError(PlatformioException): class APIRequestError(PlatformioException): - MESSAGE = "[API] %s" + MESSAGE = "[API] {0}" class LibAlreadyInstalled(PlatformioException): @@ -156,32 +156,32 @@ class LibAlreadyInstalled(PlatformioException): class LibNotInstalled(PlatformioException): - MESSAGE = "Library #%d has not been installed yet" + MESSAGE = "Library #{0:d} has not been installed yet" class LibInstallDependencyError(PlatformioException): - MESSAGE = "Error has been occurred for library dependency '%s'" + MESSAGE = "Error has been occurred for library dependency '{0}'" class InvalidLibConfURL(PlatformioException): - MESSAGE = "Invalid library config URL '%s'" + MESSAGE = "Invalid library config URL '{0}'" class BuildScriptNotFound(PlatformioException): - MESSAGE = "Invalid path '%s' to build script" + MESSAGE = "Invalid path '{0}' to build script" class InvalidSettingName(PlatformioException): - MESSAGE = "Invalid setting with the name '%s'" + MESSAGE = "Invalid setting with the name '{0}'" class InvalidSettingValue(PlatformioException): - MESSAGE = "Invalid value '%s' for the setting '%s'" + MESSAGE = "Invalid value '{0}' for the setting '{1}'" class CIBuildEnvsEmpty(PlatformioException): @@ -200,7 +200,7 @@ class SConsNotInstalledError(PlatformioException): class UpgradeError(PlatformioException): - MESSAGE = """%s + MESSAGE = """{0} * Upgrade using `pip install -U platformio` * Try different installation/upgrading steps: From 3b7de598d34cdcca5bfe16312dda4c7eccf173f2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 00:50:14 +0200 Subject: [PATCH 29/41] Replace native with linux_arm platform for Raspberry Pi --- docs/frameworks/wiringpi.rst | 11 ++++ docs/platforms/creating_platform.rst | 4 ++ docs/platforms/linux_arm.rst | 59 ++++++++++++++++++- docs/platforms/native.rst | 45 +------------- .../raspberrypi/wiringpi-blink/platformio.ini | 2 +- .../wiringpi-serial/platformio.ini | 2 +- platformio/boards/raspberrypi.json | 6 +- 7 files changed, 79 insertions(+), 50 deletions(-) diff --git a/docs/frameworks/wiringpi.rst b/docs/frameworks/wiringpi.rst index 004a7ff2..ca3f414e 100644 --- a/docs/frameworks/wiringpi.rst +++ b/docs/frameworks/wiringpi.rst @@ -19,6 +19,17 @@ For more detailed information please visit `vendor site `_. .. contents:: +Platforms +--------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`platform_linux_arm` + - Linux ARM is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. Using host OS (Mac OS X, Linux ARM) you can build native application for Linux ARM platform. + Boards ------ diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 3f5a29d2..598d7d56 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.rst @@ -86,6 +86,9 @@ Packages * - ``framework-spl`` - `Standard Peripheral Library for STM32 MCUs `_ + * - ``framework-wiringpi`` + - `GPIO Interface library for the Raspberry Pi `_ + * - ``ldscripts`` - `Linker Scripts `_ @@ -440,3 +443,4 @@ and copy there two files: Now, we should see ``ststm32gdb`` platform using :ref:`cmd_platforms_search` command output and can install it via :ref:`platformio platforms install ststm32gdb ` command. + diff --git a/docs/platforms/linux_arm.rst b/docs/platforms/linux_arm.rst index cc93db4b..80c89084 100644 --- a/docs/platforms/linux_arm.rst +++ b/docs/platforms/linux_arm.rst @@ -28,5 +28,62 @@ Packages * - Name - Contents + * - ``framework-wiringpi`` + - `GPIO Interface library for the Raspberry Pi `_ + * - ``toolchain-gccarmlinuxgnueabi`` - - `GCC for Linux ARM GNU EABI `_, `GDB `_ \ No newline at end of file + - `GCC for Linux ARM GNU EABI `_, `GDB `_ + +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_wiringpi` + - WiringPi is a GPIO access library written in C for the BCM2835 used in the Raspberry Pi. It's designed to be familiar to people who have used the Arduino "wiring" system. + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Boards Explorer `_ + * For more detailed ``board`` information please scroll tables below by + horizontal. + +Raspberry Pi +~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``raspberrypi_1b`` + - `Raspberry Pi 1 Model B `_ + - BCM2835 + - 700 MHz + - 524288 Kb + - 524288 Kb + + * - ``raspberrypi_2b`` + - `Raspberry Pi 2 Model B `_ + - BCM2836 + - 900 MHz + - 1048576 Kb + - 1048576 Kb + + * - ``raspberrypi_zero`` + - `Raspberry Pi Zero `_ + - BCM2835 + - 1000 MHz + - 524288 Kb + - 524288 Kb diff --git a/docs/platforms/native.rst b/docs/platforms/native.rst index 8094d0bc..ba4864d0 100644 --- a/docs/platforms/native.rst +++ b/docs/platforms/native.rst @@ -17,47 +17,4 @@ Native development platform is intended to be used for desktop OS. This platform For more detailed information please visit `vendor site `_. -.. contents:: - -Boards ------- - -.. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Boards Explorer `_ - * For more detailed ``board`` information please scroll tables below by - horizontal. - -Raspberry Pi -~~~~~~~~~~~~ - -.. list-table:: - :header-rows: 1 - - * - Type ``board`` - - Name - - Microcontroller - - Frequency - - Flash - - RAM - - * - ``raspberrypi_1b`` - - `Raspberry Pi 1 Model B `_ - - BCM2835 - - 700 MHz - - 524288 Kb - - 524288 Kb - - * - ``raspberrypi_2b`` - - `Raspberry Pi 2 Model B `_ - - BCM2836 - - 900 MHz - - 1048576 Kb - - 1048576 Kb - - * - ``raspberrypi_zero`` - - `Raspberry Pi Zero `_ - - BCM2835 - - 1000 MHz - - 524288 Kb - - 524288 Kb +.. contents:: \ No newline at end of file diff --git a/examples/raspberrypi/wiringpi-blink/platformio.ini b/examples/raspberrypi/wiringpi-blink/platformio.ini index e295bad2..201a6f35 100644 --- a/examples/raspberrypi/wiringpi-blink/platformio.ini +++ b/examples/raspberrypi/wiringpi-blink/platformio.ini @@ -18,6 +18,6 @@ # targets = upload [env:raspberrypi_2b] -platform = native +platform = linux_arm framework = wiringpi board = raspberrypi_2b diff --git a/examples/raspberrypi/wiringpi-serial/platformio.ini b/examples/raspberrypi/wiringpi-serial/platformio.ini index e295bad2..201a6f35 100644 --- a/examples/raspberrypi/wiringpi-serial/platformio.ini +++ b/examples/raspberrypi/wiringpi-serial/platformio.ini @@ -18,6 +18,6 @@ # targets = upload [env:raspberrypi_2b] -platform = native +platform = linux_arm framework = wiringpi board = raspberrypi_2b diff --git a/platformio/boards/raspberrypi.json b/platformio/boards/raspberrypi.json index 9499b8a0..ec4b7878 100644 --- a/platformio/boards/raspberrypi.json +++ b/platformio/boards/raspberrypi.json @@ -7,7 +7,7 @@ }, "frameworks": ["wiringpi"], "name": "Raspberry Pi 1 Model B", - "platform": "native", + "platform": "linux_arm", "upload": { "maximum_ram_size": 536870912, "maximum_size": 536870912 @@ -25,7 +25,7 @@ }, "frameworks": ["wiringpi"], "name": "Raspberry Pi 2 Model B", - "platform": "native", + "platform": "linux_arm", "upload": { "maximum_ram_size": 1073741824, "maximum_size": 1073741824 @@ -42,7 +42,7 @@ }, "frameworks": ["wiringpi"], "name": "Raspberry Pi Zero", - "platform": "native", + "platform": "linux_arm", "upload": { "maximum_ram_size": 536870912, "maximum_size": 536870912 From cb4c4e13a3ea28757a86e32a6a53d422b904f800 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 15:58:52 +0200 Subject: [PATCH 30/41] Install only required packages depending on build environment // Resolve #308 --- HISTORY.rst | 2 + platformio/__init__.py | 2 +- platformio/builder/main.py | 1 + platformio/commands/platforms.py | 9 ++- platformio/commands/run.py | 32 +-------- platformio/platforms/atmelavr.py | 32 ++++----- platformio/platforms/atmelsam.py | 5 +- platformio/platforms/base.py | 88 ++++++++++++++++++------ platformio/platforms/espressif.py | 10 ++- platformio/platforms/freescalekinetis.py | 2 +- platformio/platforms/linux_arm.py | 20 +++++- platformio/platforms/nordicnrf51.py | 2 +- platformio/platforms/nxplpc.py | 2 +- platformio/platforms/siliconlabsefm32.py | 2 +- platformio/platforms/ststm32.py | 11 ++- platformio/platforms/teensy.py | 32 ++++----- platformio/platforms/timsp430.py | 7 +- platformio/platforms/titiva.py | 7 +- 18 files changed, 150 insertions(+), 116 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 52bda7be..cec8face 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,8 @@ PlatformIO 2.0 2.6.0 (2015-12-??) ~~~~~~~~~~~~~~~~~~ +* Install only required packages depending on build environment + (`issue #308 `_) * Added support for Raspberry Pi `WiringPi `__ framework (`issue #372 `_) diff --git a/platformio/__init__.py b/platformio/__init__.py index 0e62f577..547416a9 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (2, 6, "0.dev0") +VERSION = (2, 6, "0.dev1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 387fed55..26bc853f 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -57,6 +57,7 @@ commonvars.AddVariables( # package aliases ("PIOPACKAGE_TOOLCHAIN",), + ("PIOPACKAGE_FRAMEWORK",), ("PIOPACKAGE_UPLOADER",), # options diff --git a/platformio/commands/platforms.py b/platformio/commands/platforms.py index 71899117..1a3a6e3a 100644 --- a/platformio/commands/platforms.py +++ b/platformio/commands/platforms.py @@ -38,8 +38,11 @@ def platforms_install(platforms, with_package, without_package, for platform in platforms: p = PlatformFactory.newPlatform(platform) if p.install(with_package, without_package, skip_default_package): - click.secho("The platform '%s' has been successfully installed!" % - platform, fg="green") + click.secho( + "The platform '%s' has been successfully installed!\n" + "The rest of packages will be installed automatically " + "depending on your build environment." % platform, + fg="green") @cli.command("list", short_help="List installed platforms") @@ -131,7 +134,7 @@ def platforms_show(ctx, platform): installed_packages = PackageManager.get_installed() for name in p.get_installed_packages(): data = installed_packages[name] - pkgalias = p.get_pkg_alias(name) + pkgalias = p.get_package_alias(name) click.echo("----------") click.echo("Package: %s" % click.style(name, fg="yellow")) if pkgalias: diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 1a756dfc..1747f25e 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -181,8 +181,7 @@ class EnvironmentProcessor(object): telemetry.on_run_environment(self.options, build_targets) - # install platform and libs dependencies - _autoinstall_platform(self.cmd_ctx, platform, build_targets) + # install dependent libraries if "lib_install" in self.options: _autoinstall_libs(self.cmd_ctx, self.options['lib_install']) @@ -190,35 +189,6 @@ class EnvironmentProcessor(object): return p.run(build_vars, build_targets, self.verbose_level) -def _autoinstall_platform(ctx, platform, targets): - installed_platforms = PlatformFactory.get_platforms(installed=True).keys() - cmd_options = {} - p = PlatformFactory.newPlatform(platform) - - if "uploadlazy" in targets: - upload_tools = p.pkg_aliases_to_names(["uploader"]) - - # platform without uploaders - if not upload_tools and platform in installed_platforms: - return - # uploaders are already installed - if set(upload_tools) <= set(p.get_installed_packages()): - return - - cmd_options['skip_default_package'] = True - if upload_tools: - cmd_options['with_package'] = ["uploader"] - - elif (platform in installed_platforms and - set(p.get_default_packages()) <= set(p.get_installed_packages())): - return - - if (not app.get_setting("enable_prompts") or - click.confirm("The platform '%s' has not been installed yet. " - "Would you like to install it now?" % platform)): - ctx.invoke(cmd_platforms_install, platforms=[platform], **cmd_options) - - def _autoinstall_libs(ctx, libids_list): require_libs = [int(l.strip()) for l in libids_list.split(",")] installed_libs = [ diff --git a/platformio/platforms/atmelavr.py b/platformio/platforms/atmelavr.py index 25d07a7f..de18ad20 100644 --- a/platformio/platforms/atmelavr.py +++ b/platformio/platforms/atmelavr.py @@ -36,39 +36,35 @@ class AtmelavrPlatform(BasePlatform): }, "tool-avrdude": { - "alias": "uploader", - "default": True + "alias": "uploader" }, "tool-micronucleus": { - "alias": "uploader", - "default": True + "alias": "uploader" }, "framework-arduinoavr": { - "default": True + "alias": "framework" } } def get_name(self): return "Atmel AVR" + def configure_default_packages(self, envoptions, targets): + if envoptions.get("board"): + board = get_boards(envoptions.get("board")) + disable_tool = "tool-micronucleus" + if "digispark" in board['build']['core']: + disable_tool = "tool-avrdude" + del self.PACKAGES[disable_tool]['alias'] + + return BasePlatform.configure_default_packages( + self, envoptions, targets) + def on_run_err(self, line): # pylint: disable=R0201 # fix STDERR "flash written" for avrdude if "avrdude" in line: self.on_run_out(line) else: BasePlatform.on_run_err(self, line) - - def run(self, variables, targets, verbose): - for v in variables: - if "BOARD=" not in v: - continue - disable_tool = "tool-micronucleus" - _, board = v.split("=") - bdata = get_boards(board) - if "digispark" in bdata['build']['core']: - disable_tool = "tool-avrdude" - del self.PACKAGES[disable_tool]['alias'] - break - return BasePlatform.run(self, variables, targets, verbose) diff --git a/platformio/platforms/atmelsam.py b/platformio/platforms/atmelsam.py index 16e3ca51..e1a84170 100644 --- a/platformio/platforms/atmelsam.py +++ b/platformio/platforms/atmelsam.py @@ -37,12 +37,11 @@ class AtmelsamPlatform(BasePlatform): }, "framework-arduinosam": { - "default": True + "alias": "framework" }, "tool-bossac": { - "alias": "uploader", - "default": True + "alias": "uploader" } } diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index 16c8901c..45f1acf1 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -20,7 +20,7 @@ from os.path import isdir, isfile, join import click -from platformio import exception, util +from platformio import app, exception, util from platformio.app import get_state_item, set_state_item from platformio.pkgmanager import PackageManager @@ -71,6 +71,9 @@ PLATFORM_PACKAGES = { "framework-mbed": [ ("mbed Framework", "http://mbed.org") ], + "framework-wiringpi": [ + ("GPIO Interface library for the Raspberry Pi", "http://wiringpi.com") + ], "sdk-esp8266": [ ("ESP8266 SDK", "http://bbs.espressif.com") ], @@ -258,8 +261,8 @@ class BasePlatform(object): def get_packages(self): return self.PACKAGES - def get_pkg_alias(self, pkgname): - return self.PACKAGES[pkgname].get("alias", None) + def get_package_alias(self, pkgname): + return self.PACKAGES[pkgname].get("alias") def pkg_aliases_to_names(self, aliases): names = [] @@ -267,10 +270,12 @@ class BasePlatform(object): name = alias # lookup by package aliases for _name, _opts in self.get_packages().items(): - if _opts.get("alias", None) == alias: - name = _name - break - names.append(name) + if _opts.get("alias") == alias: + name = None + names.append(_name) + # if alias is the right name + if name: + names.append(name) return names def get_default_packages(self): @@ -281,9 +286,12 @@ class BasePlatform(object): pm = PackageManager() return [n for n in self.get_packages().keys() if pm.is_installed(n)] - def install(self, with_packages, without_packages, skip_default_packages): - with_packages = set(self.pkg_aliases_to_names(with_packages)) - without_packages = set(self.pkg_aliases_to_names(without_packages)) + def install(self, with_packages=None, without_packages=None, + skip_default_packages=False): + with_packages = set( + self.pkg_aliases_to_names(with_packages or [])) + without_packages = set( + self.pkg_aliases_to_names(without_packages or [])) upkgs = with_packages | without_packages ppkgs = set(self.get_packages().keys()) @@ -295,7 +303,7 @@ class BasePlatform(object): if name in without_packages: continue elif (name in with_packages or (not skip_default_packages and - opts['default'])): + opts.get("default"))): requirements.append(name) pm = PackageManager() @@ -347,34 +355,74 @@ class BasePlatform(object): obsolated = pm.get_outdated() return not set(self.get_packages().keys()).isdisjoint(set(obsolated)) + def configure_default_packages(self, envoptions, targets): + # enbale used frameworks + for pkg_name in self.pkg_aliases_to_names(["framework"]): + for framework in envoptions.get("framework", "").split(","): + framework = framework.lower().strip() + if not framework: + continue + if framework in pkg_name: + self.PACKAGES[pkg_name]['default'] = True + + # enable upload tools for upload targets + if (set(["upload", "uploadlazy", "uploadeep", "program"]) + & set(targets)): + for _name, _opts in self.PACKAGES.iteritems(): + if _opts.get("alias") == "uploader": + self.PACKAGES[_name]['default'] = True + elif "uploadlazy" in targets: + # skip all packages, allow only upload tools + self.PACKAGES[_name]['default'] = False + + def install_default_packages(self, targets): + installed_platforms = PlatformFactory.get_platforms( + installed=True).keys() + + if (self.get_type() in installed_platforms and + set(self.get_default_packages()) <= + set(self.get_installed_packages())): + return True + + if (not app.get_setting("enable_prompts") or + self.get_type() in installed_platforms or + click.confirm( + "The platform '%s' has not been installed yet. " + "Would you like to install it now?" % self.get_type())): + return self.install() + else: + raise exception.PlatformNotInstalledYet(self.get_type()) + def run(self, variables, targets, verbose): assert isinstance(variables, list) assert isinstance(targets, list) + envoptions = {} + for v in variables: + _name, _value = v.split("=", 1) + envoptions[_name.lower()] = _value + + self.configure_default_packages(envoptions, targets) + self.install_default_packages(targets) + self._verbose_level = int(verbose) - installed_platforms = PlatformFactory.get_platforms( - installed=True).keys() - installed_packages = PackageManager.get_installed() - - if self.get_type() not in installed_platforms: - raise exception.PlatformNotInstalledYet(self.get_type()) - if "clean" in targets: targets.remove("clean") targets.append("-c") - if not any([v.startswith("BUILD_SCRIPT=") for v in variables]): + if "build_script" not in envoptions: variables.append("BUILD_SCRIPT=%s" % self.get_build_script()) for v in variables: if not v.startswith("BUILD_SCRIPT="): continue - _, path = v.split("=", 2) + _, path = v.split("=", 1) if not isfile(path): raise exception.BuildScriptNotFound(path) # append aliases of the installed packages + installed_packages = PackageManager.get_installed() for name, options in self.get_packages().items(): if "alias" not in options or name not in installed_packages: continue diff --git a/platformio/platforms/espressif.py b/platformio/platforms/espressif.py index 1b4ea3ab..a6784e1a 100644 --- a/platformio/platforms/espressif.py +++ b/platformio/platforms/espressif.py @@ -42,13 +42,19 @@ class EspressifPlatform(BasePlatform): }, "sdk-esp8266": { - "default": True }, "framework-arduinoespressif": { - "default": True + "alias": "framework" } } def get_name(self): return "Espressif" + + def configure_default_packages(self, envoptions, targets): + if not envoptions.get("framework"): + self.PACKAGES['sdk-esp8266']['default'] = True + + return BasePlatform.configure_default_packages( + self, envoptions, targets) diff --git a/platformio/platforms/freescalekinetis.py b/platformio/platforms/freescalekinetis.py index d076fd67..2420309f 100644 --- a/platformio/platforms/freescalekinetis.py +++ b/platformio/platforms/freescalekinetis.py @@ -34,7 +34,7 @@ class FreescalekinetisPlatform(BasePlatform): }, "framework-mbed": { - "default": True + "alias": "framework" } } diff --git a/platformio/platforms/linux_arm.py b/platformio/platforms/linux_arm.py index 87f2c26a..95775976 100644 --- a/platformio/platforms/linux_arm.py +++ b/platformio/platforms/linux_arm.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from platformio import exception, util from platformio.platforms.base import BasePlatform -from platformio.util import get_systype class Linux_armPlatform(BasePlatform): @@ -34,10 +34,26 @@ class Linux_armPlatform(BasePlatform): "toolchain-gccarmlinuxgnueabi": { "alias": "toolchain", "default": True + }, + + "framework-wiringpi": { + "alias": "framework" } } def __init__(self): - if "linux_arm" in get_systype(): + if "linux_arm" in util.get_systype(): del self.PACKAGES['toolchain-gccarmlinuxgnueabi'] BasePlatform.__init__(self) + + def configure_default_packages(self, envoptions, targets): + if (envoptions.get("framework") == "wiringpi" and + "linux_arm" not in util.get_systype()): + raise exception.PlatformioException( + "PlatformIO does not support temporary cross-compilation " + "for WiringPi framework. Please run PlatformIO directly on " + "Raspberry Pi" + ) + + return BasePlatform.configure_default_packages( + self, envoptions, targets) diff --git a/platformio/platforms/nordicnrf51.py b/platformio/platforms/nordicnrf51.py index cbdca343..b2ef7197 100644 --- a/platformio/platforms/nordicnrf51.py +++ b/platformio/platforms/nordicnrf51.py @@ -36,7 +36,7 @@ class Nordicnrf51Platform(BasePlatform): }, "framework-mbed": { - "default": True + "alias": "framework" } } diff --git a/platformio/platforms/nxplpc.py b/platformio/platforms/nxplpc.py index 80700560..d924ba76 100644 --- a/platformio/platforms/nxplpc.py +++ b/platformio/platforms/nxplpc.py @@ -36,7 +36,7 @@ class NxplpcPlatform(BasePlatform): }, "framework-mbed": { - "default": True + "alias": "framework" } } diff --git a/platformio/platforms/siliconlabsefm32.py b/platformio/platforms/siliconlabsefm32.py index ea3c44d8..889c650f 100644 --- a/platformio/platforms/siliconlabsefm32.py +++ b/platformio/platforms/siliconlabsefm32.py @@ -39,7 +39,7 @@ class Siliconlabsefm32Platform(BasePlatform): }, "framework-mbed": { - "default": True + "alias": "framework" } } diff --git a/platformio/platforms/ststm32.py b/platformio/platforms/ststm32.py index 29cedebe..7aee7f1a 100644 --- a/platformio/platforms/ststm32.py +++ b/platformio/platforms/ststm32.py @@ -40,24 +40,23 @@ class Ststm32Platform(BasePlatform): }, "tool-stlink": { - "alias": "uploader", - "default": True + "alias": "uploader" }, "framework-cmsis": { - "default": True + "alias": "framework" }, "framework-spl": { - "default": True + "alias": "framework" }, "framework-libopencm3": { - "default": True + "alias": "framework" }, "framework-mbed": { - "default": True + "alias": "framework" } } diff --git a/platformio/platforms/teensy.py b/platformio/platforms/teensy.py index 31688f4e..0dcd6351 100644 --- a/platformio/platforms/teensy.py +++ b/platformio/platforms/teensy.py @@ -31,11 +31,9 @@ class TeensyPlatform(BasePlatform): PACKAGES = { "toolchain-atmelavr": { - "default": True }, "toolchain-gccarmnoneeabi": { - "default": True }, "ldscripts": { @@ -43,32 +41,30 @@ class TeensyPlatform(BasePlatform): }, "framework-arduinoteensy": { - "default": True + "alias": "framework" }, "framework-mbed": { - "default": True + "alias": "framework" }, "tool-teensy": { - "alias": "uploader", - "default": True + "alias": "uploader" } } def get_name(self): return "Teensy" - def run(self, variables, targets, verbose): - for v in variables: - if "BOARD=" not in v: - continue - _, board = v.split("=") - bdata = get_boards(board) - if bdata['build']['core'] == "teensy": - tpackage = "toolchain-atmelavr" + def configure_default_packages(self, envoptions, targets): + if envoptions.get("board"): + board = get_boards(envoptions.get("board")) + if board['build']['core'] == "teensy": + name = "toolchain-atmelavr" else: - tpackage = "toolchain-gccarmnoneeabi" - self.PACKAGES[tpackage]['alias'] = "toolchain" - break - return BasePlatform.run(self, variables, targets, verbose) + name = "toolchain-gccarmnoneeabi" + self.PACKAGES[name]['alias'] = "toolchain" + self.PACKAGES[name]['default'] = True + + return BasePlatform.configure_default_packages( + self, envoptions, targets) diff --git a/platformio/platforms/timsp430.py b/platformio/platforms/timsp430.py index e4f7c0e2..ca78e2ca 100644 --- a/platformio/platforms/timsp430.py +++ b/platformio/platforms/timsp430.py @@ -34,16 +34,15 @@ class Timsp430Platform(BasePlatform): }, "tool-mspdebug": { - "alias": "uploader", - "default": True + "alias": "uploader" }, "framework-energiamsp430": { - "default": True + "alias": "framework" }, "framework-arduinomsp430": { - "default": True + "alias": "framework" } } diff --git a/platformio/platforms/titiva.py b/platformio/platforms/titiva.py index 5ba21463..2db28880 100644 --- a/platformio/platforms/titiva.py +++ b/platformio/platforms/titiva.py @@ -38,16 +38,15 @@ class TitivaPlatform(BasePlatform): }, "tool-lm4flash": { - "alias": "uploader", - "default": True + "alias": "uploader" }, "framework-energiativa": { - "default": True + "alias": "framework" }, "framework-libopencm3": { - "default": True + "alias": "framework" } } From 4c65093a669c16a7e184aeb4ef88a8daa429e52b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 16:09:35 +0200 Subject: [PATCH 31/41] Remove unused imports --- platformio/commands/run.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 1747f25e..b9d1dd73 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -23,8 +23,6 @@ import click from platformio import app, exception, telemetry, util from platformio.commands.lib import lib_install as cmd_lib_install -from platformio.commands.platforms import \ - platforms_install as cmd_platforms_install from platformio.libmanager import LibraryManager from platformio.platforms.base import PlatformFactory From 62b41e0994660b6933e2ce80c218db32cffb6974 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 17:04:28 +0200 Subject: [PATCH 32/41] Fix PyLint warnings --- platformio/platforms/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index 45f1acf1..0824b4ca 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -375,7 +375,7 @@ class BasePlatform(object): # skip all packages, allow only upload tools self.PACKAGES[_name]['default'] = False - def install_default_packages(self, targets): + def _install_default_packages(self): installed_platforms = PlatformFactory.get_platforms( installed=True).keys() @@ -403,7 +403,7 @@ class BasePlatform(object): envoptions[_name.lower()] = _value self.configure_default_packages(envoptions, targets) - self.install_default_packages(targets) + self._install_default_packages() self._verbose_level = int(verbose) From 7ce780bcc62d9606f4a87eaac951b6031307f765 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Tue, 15 Dec 2015 19:28:58 +0200 Subject: [PATCH 33/41] Update builder for CMSIS framework. --- examples/stm32/stm32-cmsis-blink/src/main.c | 2 +- platformio/boards/ststm32.json | 22 +++++++----- .../builder/scripts/frameworks/cmsis.py | 34 +++++++++++++++++-- 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/examples/stm32/stm32-cmsis-blink/src/main.c b/examples/stm32/stm32-cmsis-blink/src/main.c index 9d4917e2..37757c87 100644 --- a/examples/stm32/stm32-cmsis-blink/src/main.c +++ b/examples/stm32/stm32-cmsis-blink/src/main.c @@ -6,7 +6,7 @@ #define ENABLE_GPIO_CLOCK (RCC->AHBENR |= RCC_AHBENR_GPIOBEN) #define GPIOMODER ((GPIO_MODER_MODER7_0|GPIO_MODER_MODER6_0)) #elif STM32F3 - #include "stm32f30x.h" + #include "stm32f3xx.h" #define LEDPORT (GPIOE) #define LED1 (8) #define LED2 (9) diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index cd5483a3..f843170f 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -2,12 +2,12 @@ "disco_f407vg": { "build": { "core": "stm32", - "extra_flags": "-DSTM32F40_41xxx", + "extra_flags": "-DSTM32F4 -DSTM32F407xx -DSTM32F40_41xxx", "f_cpu": "168000000L", "ldscript": "stm32f405x6.ld", "cpu": "cortex-m4", "mcu": "stm32f407vgt6", - "variant": "stm32f4" + "variant": "stm32f407xx" }, "frameworks": ["cmsis", "spl", "libopencm3", "mbed"], "name": "ST STM32F4DISCOVERY", @@ -22,14 +22,14 @@ "disco_l152rb": { "build": { "core": "stm32", - "extra_flags": "-DSTM32L1XX_MD", + "extra_flags": "-DSTM32L1 -DSTM32L152xB -DSTM32L1XX_MD", "f_cpu": "32000000L", "ldscript": "stm32l15xx6.ld", "cpu": "cortex-m3", "mcu": "stm32l152rbt6", - "variant": "stm32l1" + "variant": "stm32l152xb" }, - "frameworks": ["cmsis","spl","libopencm3"], + "frameworks": ["cmsis", "spl", "libopencm3"], "name": "ST STM32LDISCOVERY", "platform": "ststm32", "upload": { @@ -42,12 +42,12 @@ "disco_f303vc": { "build": { "core": "stm32", - "extra_flags": "-DSTM32F303xC", + "extra_flags": "-DSTM32F3 -DSTM32F303xC", "f_cpu": "72000000L", "ldscript": "stm32f30xx.ld", "cpu": "cortex-m4", "mcu": "stm32f303vct6", - "variant": "stm32f3" + "variant": "stm32f303xc" }, "frameworks": ["cmsis", "spl", "libopencm3", "mbed"], "name": "ST STM32F3DISCOVERY", @@ -272,11 +272,15 @@ }, "nucleo_f401re": { "build": { + "core": "stm32", + "extra_flags": "-DSTM32F4 -DSTM32F401xE", "f_cpu": "84000000L", + "ldscript": "stm32f401xe.ld", "cpu": "cortex-m4", - "mcu": "stm32f401ret6" + "mcu": "stm32f401ret6", + "variant": "stm32f401xe" }, - "frameworks": ["mbed"], + "frameworks": ["cmsis", "mbed"], "name": "ST Nucleo F401RE", "platform": "ststm32", "upload": { diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index a0098d84..c83ab478 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -26,7 +26,7 @@ and cutting the time-to-market for devices. http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php """ -from os.path import join +from os.path import isfile, join from SCons.Script import DefaultEnvironment @@ -44,6 +44,7 @@ env.VariantDirWrap( env.Append( CPPPATH=[ join("$BUILD_DIR", "FrameworkCMSIS"), + join("$BUILD_DIR", "FrameworkCMSISCommon"), join("$BUILD_DIR", "FrameworkCMSISVariant") ] ) @@ -54,10 +55,39 @@ envsafe = env.Clone() # Target: Build Core Library # +# use mbed ldscript with bootloader section +ldscript = env.get("BOARD_OPTIONS", {}).get("build", {}).get("ldscript") +if not isfile(join(env.subst("$PIOPACKAGES_DIR"), "ldscripts", ldscript)): + if "mbed" in env.get("BOARD_OPTIONS", {}).get("frameworks", {}): + env.Append( + LINKFLAGS=[ + "-Wl,-T", + join( + "$PIOPACKAGES_DIR", "framework-mbed", "variant", + env.subst("$BOARD").upper(), "mbed", + "TARGET_%s" % env.subst( + "$BOARD").upper(), "TOOLCHAIN_GCC_ARM", + "%s.ld" % ldscript.upper()[:-3] + ) + ] + ) + libs = [] libs.append(envsafe.BuildLibrary( join("$BUILD_DIR", "FrameworkCMSISVariant"), - join("$PLATFORMFW_DIR", "variants", "${BOARD_OPTIONS['build']['variant']}") + join( + "$PLATFORMFW_DIR", "variants", + env.subst("${BOARD_OPTIONS['build']['variant']}")[0:7], + "${BOARD_OPTIONS['build']['variant']}" + ) +)) + +libs.append(envsafe.BuildLibrary( + join("$BUILD_DIR", "FrameworkCMSISCommon"), + join( + "$PLATFORMFW_DIR", "variants", + env.subst("${BOARD_OPTIONS['build']['variant']}")[0:7], "common" + ) )) env.Append(LIBS=libs) From 7e985219ad14f1651ac6662bd55cb897be8a5736 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Tue, 15 Dec 2015 19:29:37 +0200 Subject: [PATCH 34/41] Update builder for SPL framework. --- examples/stm32/stm32-spl-blink/platformio.ini | 6 ++-- platformio/builder/scripts/frameworks/spl.py | 29 ++++++++++++++++--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/examples/stm32/stm32-spl-blink/platformio.ini b/examples/stm32/stm32-spl-blink/platformio.ini index 1324053c..29d797e9 100644 --- a/examples/stm32/stm32-spl-blink/platformio.ini +++ b/examples/stm32/stm32-spl-blink/platformio.ini @@ -19,15 +19,15 @@ [env:disco_f407vg] platform = ststm32 -framework = cmsis,spl +framework = spl board = disco_f407vg [env:disco_l152rb] platform = ststm32 -framework = cmsis,spl +framework = spl board = disco_l152rb [env:disco_f303vc] platform = ststm32 -framework = cmsis,spl +framework = spl board = disco_f303vc diff --git a/platformio/builder/scripts/frameworks/spl.py b/platformio/builder/scripts/frameworks/spl.py index 41832a3f..13e8cac0 100644 --- a/platformio/builder/scripts/frameworks/spl.py +++ b/platformio/builder/scripts/frameworks/spl.py @@ -34,13 +34,24 @@ env.Replace( ) env.VariantDirWrap( - join("$BUILD_DIR", "FrameworkSPLInc"), + join("$BUILD_DIR", "FrameworkCMSIS"), join("$PLATFORMFW_DIR", "${BOARD_OPTIONS['build']['core']}", - "variants", "${BOARD_OPTIONS['build']['variant']}", "inc") + "cmsis", "cores", "${BOARD_OPTIONS['build']['core']}") +) + +env.VariantDirWrap( + join("$BUILD_DIR", "FrameworkSPLInc"), + join( + "$PLATFORMFW_DIR", "${BOARD_OPTIONS['build']['core']}", "spl", + "variants", env.subst("${BOARD_OPTIONS['build']['variant']}")[0:7], + "inc" + ) ) env.Append( CPPPATH=[ + join("$BUILD_DIR", "FrameworkCMSIS"), + join("$BUILD_DIR", "FrameworkCMSISVariant"), join("$BUILD_DIR", "FrameworkSPLInc"), join("$BUILD_DIR", "FrameworkSPL") ] @@ -71,10 +82,20 @@ elif "STM32L1XX_MD" in extra_flags: src_filter_patterns += ["-"] libs = [] + +libs.append(envsafe.BuildLibrary( + join("$BUILD_DIR", "FrameworkCMSISVariant"), + join( + "$PLATFORMFW_DIR", "${BOARD_OPTIONS['build']['core']}", "cmsis", + "variants", env.subst("${BOARD_OPTIONS['build']['variant']}")[0:7] + ) +)) + libs.append(envsafe.BuildLibrary( join("$BUILD_DIR", "FrameworkSPL"), - join("$PLATFORMFW_DIR", "${BOARD_OPTIONS['build']['core']}", "variants", - "${BOARD_OPTIONS['build']['variant']}", "src"), + join("$PLATFORMFW_DIR", "${BOARD_OPTIONS['build']['core']}", + "spl", "variants", + env.subst("${BOARD_OPTIONS['build']['variant']}")[0:7], "src"), src_filter=" ".join(src_filter_patterns) )) From 8eebd394260b039d8a373962ca3e06c9ca930550 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Tue, 15 Dec 2015 19:30:11 +0200 Subject: [PATCH 35/41] Fix libopenCM3 framework. --- platformio/builder/scripts/frameworks/libopencm3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/builder/scripts/frameworks/libopencm3.py b/platformio/builder/scripts/frameworks/libopencm3.py index c523b0d8..c2bf08b3 100644 --- a/platformio/builder/scripts/frameworks/libopencm3.py +++ b/platformio/builder/scripts/frameworks/libopencm3.py @@ -166,7 +166,7 @@ env.Append( root_dir = env.subst( join("$PLATFORMFW_DIR", "lib", BOARD_BUILDOPTS.get("core"))) if BOARD_BUILDOPTS.get("core") == "stm32": - root_dir = join(root_dir, BOARD_BUILDOPTS.get("variant")[-2:]) + root_dir = join(root_dir, BOARD_BUILDOPTS.get("variant")[5:7]) ldscript_path = find_ldscript(root_dir) merge_ld_scripts(ldscript_path) From 3afc8c79086baf583047d3148440e7132ca83fe2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 20:10:04 +0200 Subject: [PATCH 36/41] Add make related keywords --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f9cefef4..36231163 100644 --- a/setup.py +++ b/setup.py @@ -74,6 +74,7 @@ setup( keywords=[ "iot", "build tool", "compiler", "builder", "library manager", "embedded", "ci", "continuous integration", "arduino", "mbed", - "framework", "ide", "ide integration", "library.json" + "framework", "ide", "ide integration", "library.json", "make", "cmake", + "makefile", "mk" ] ) From 997cfbf48894761220437c12469c1f9ca4af4f7c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 20:10:28 +0200 Subject: [PATCH 37/41] Change framework order --- platformio/boards/ststm32.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index f843170f..272c1286 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -9,7 +9,7 @@ "mcu": "stm32f407vgt6", "variant": "stm32f407xx" }, - "frameworks": ["cmsis", "spl", "libopencm3", "mbed"], + "frameworks": ["mbed", "cmsis", "spl", "libopencm3"], "name": "ST STM32F4DISCOVERY", "platform": "ststm32", "upload": { @@ -49,7 +49,7 @@ "mcu": "stm32f303vct6", "variant": "stm32f303xc" }, - "frameworks": ["cmsis", "spl", "libopencm3", "mbed"], + "frameworks": ["mbed", "cmsis", "spl", "libopencm3"], "name": "ST STM32F3DISCOVERY", "platform": "ststm32", "upload": { From a5878c55445f49c68eb0a11143066250e939fa06 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 20:19:27 +0200 Subject: [PATCH 38/41] Updated CMSIS framework and added CMSIS support for Nucleo F401RE board // Issue #373 --- HISTORY.rst | 3 +++ docs/frameworks/cmsis.rst | 7 +++++++ platformio/platforms/ststm32.py | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index cec8face..f22e2f62 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,9 @@ PlatformIO 2.0 * Implemented Over The Air (OTA) upgrades for `Espressif `__ development platform. (`issue #365 `_) +* Updated `CMSIS framework `__ + and added CMSIS support for Nucleo F401RE board + (`issue #373 `_) * Added support for Espressif ESP8266 ESP-01-1MB board (ready for OTA) * Handle ``upload_flags`` option in `platformio.ini `__ (`issue #368 `_) diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index cb0b293f..a3b70489 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -105,3 +105,10 @@ ST - 32 MHz - 128 Kb - 16 Kb + + * - ``nucleo_f401re`` + - `ST Nucleo F401RE `_ + - STM32F401RET6 + - 84 MHz + - 512 Kb + - 96 Kb diff --git a/platformio/platforms/ststm32.py b/platformio/platforms/ststm32.py index 7aee7f1a..92f4c49a 100644 --- a/platformio/platforms/ststm32.py +++ b/platformio/platforms/ststm32.py @@ -62,3 +62,10 @@ class Ststm32Platform(BasePlatform): def get_name(self): return "ST STM32" + + def configure_default_packages(self, envoptions, targets): + if envoptions.get("framework") == "cmsis": + self.PACKAGES['framework-mbed']['default'] = True + + return BasePlatform.configure_default_packages( + self, envoptions, targets) From 2afbe2a64bbe64580f96fdecb9b13daa05c0a2d1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 20:25:59 +0200 Subject: [PATCH 39/41] Better handling of upload targets --- platformio/platforms/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index 0824b4ca..88d5377d 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -366,8 +366,7 @@ class BasePlatform(object): self.PACKAGES[pkg_name]['default'] = True # enable upload tools for upload targets - if (set(["upload", "uploadlazy", "uploadeep", "program"]) - & set(targets)): + if any(["upload" in t for t in targets] + ["program" in targets]): for _name, _opts in self.PACKAGES.iteritems(): if _opts.get("alias") == "uploader": self.PACKAGES[_name]['default'] = True From f778bdb741a5e2e1664fc9209ece619a6dce73ce Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Tue, 15 Dec 2015 20:45:47 +0200 Subject: [PATCH 40/41] Fix test with ldscripts. --- tests/commands/test_boards.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/commands/test_boards.py b/tests/commands/test_boards.py index 3dc92f9b..0574c39e 100644 --- a/tests/commands/test_boards.py +++ b/tests/commands/test_boards.py @@ -65,6 +65,7 @@ def test_board_ldscripts(platformio_setup, clirunner, validate_cliresult): ldscripts_path = join(util.get_home_dir(), "packages", "ldscripts") for _, opts in util.get_boards().iteritems(): if opts['build'].get("ldscript"): - if "libopencm3" in opts['frameworks']: + frameworks = opts['frameworks'] + if any(fw in frameworks for fw in ["libopencm3", "mbed"]): continue assert isfile(join(ldscripts_path, opts['build'].get("ldscript"))) From b073760711861529d75cf06aec679737dfd14905 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 15 Dec 2015 20:54:19 +0200 Subject: [PATCH 41/41] Version bump to 2.6.0 (issues #308, #365, #368, #371, #372, #373, #375) --- HISTORY.rst | 2 +- platformio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f22e2f62..f62c654e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release History PlatformIO 2.0 -------------- -2.6.0 (2015-12-??) +2.6.0 (2015-12-15) ~~~~~~~~~~~~~~~~~~ * Install only required packages depending on build environment diff --git a/platformio/__init__.py b/platformio/__init__.py index 547416a9..784f1715 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (2, 6, "0.dev1") +VERSION = (2, 6, 0) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"