diff --git a/HISTORY.rst b/HISTORY.rst index 8cf78a3a..6ab8840d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,37 @@ Release History PlatformIO 2.0 -------------- +2.3.5 (2015-11-18) +~~~~~~~~~~~~~~~~~~ + +* Added support of `libOpenCM3 `_ + framework for Nucleo F103RB board + (`issue #309 `_) +* Added support for Espressif ESP8266 ESP-12E board (NodeMCU) + (`issue #310 `_) +* Added support for pySerial 3.0 + (`issue #307 `_) +* Updated Arduino AVR/SAM frameworks to 1.6.6 + (`issue #321 `_) +* Upload firmware using external programmer via `platformio run --target program `__ + target + (`issue #311 `_) +* Fixed handling of upload port when ``board`` option is not specified in + `platformio.ini `__ + (`issue #313 `_) +* Fixed firmware uploading for `nordicrf51 `__ + development platform + (`issue #316 `_) +* Fixed installation on Mac OS X El Capitan + (`issue #312 `_) +* Fixed project generator for CLion IDE under Windows OS with invalid path to + executable + (`issue #326 `_) +* Fixed empty list with serial ports on Mac OS X + (`isge #294 `_) +* Fixed compilation error ``TWI_Disable not declared`` for Arduino Due board + (`issue #329 `_) + 2.3.4 (2015-10-13) ~~~~~~~~~~~~~~~~~~ diff --git a/LICENSE b/LICENSE index 50d24ce8..2f79a3b3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,174 @@ -The MIT License (MIT) +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ -Copyright (c) 2014-2015 Ivan Kravets +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1. Definitions. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all +other entities that control, are controlled by, or are under common +control with that entity. For the purposes of this definition, +"control" means (i) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or +otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation +source, and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or +Object form, made available under the License, as indicated by a +copyright notice that is included in or attached to the work +(an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including +the original version of the Work and any modifications or additions +to that Work or Derivative Works thereof, that is intentionally +submitted to Licensor for inclusion in the Work by the copyright owner +or by an individual or Legal Entity authorized to submit on behalf of +the copyright owner. For the purposes of this definition, "submitted" +means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, +and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise +designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable +by such Contributor that are necessarily infringed by their +Contribution(s) alone or by combination of their Contribution(s) +with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You +meet the following conditions: + +(a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + +(b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + +You may add Your own copyright statement to Your modifications and +may provide additional or different license terms and conditions +for use, reproduction, or distribution of Your modifications, or +for any such Derivative Works as a whole, provided Your use, +reproduction, and distribution of the Work otherwise complies with +the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. diff --git a/README.rst b/README.rst index e27d5901..5581be75 100644 --- a/README.rst +++ b/README.rst @@ -42,9 +42,9 @@ PlatformIO .. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-logo.png :target: http://platformio.org -`PlatformIO `_ is a cross-platform code builder -and the missing library manager (Ready for embedded development, IDE and -Continuous integration, Arduino and MBED compatible). +`PlatformIO `_ is an open-source cross-platform code +builder and the missing library manager (Ready for embedded development, IDE +and Continuous integration, Arduino and MBED compatible). *Atmel AVR & SAM, Espressif, Freescale Kinetis, Nordic nRF51, NXP LPC, Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed, @@ -170,6 +170,7 @@ Frameworks: Licence ------- -Copyright (C) 2014-2015 Ivan Kravets +Copyright 2014-2015 Ivan Kravets -Licenced under the MIT Licence. +The PlatformIO is licensed under the permissive Apache 2.0 licence, +so you can use it in both commercial and personal projects with confidence. diff --git a/circle.yml b/circle.yml index b0553fc8..a2ec6207 100644 --- a/circle.yml +++ b/circle.yml @@ -10,6 +10,7 @@ machine: checkout: post: - git submodule update --init + - pip install -U pip setuptools virtualenv dependencies: pre: diff --git a/docs/articles.rst b/docs/articles.rst index 1351bc6d..26b5291e 100644 --- a/docs/articles.rst +++ b/docs/articles.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. + .. _articles: Articles about us @@ -12,13 +23,18 @@ Here are recent articles about PlatformIO: 2015 ^^^^ +* Nov 09, 2015 - **ÁLvaro García Gómez** - `Programar con Arduino "The good way" (Programming with Arduino "The good way", Spanish) `_ +* Nov 06, 2015 - **nocd5** - `PlatformIOでmbedをオフラインビルドしSTM32 Nucleoボードでmrubyを使う (Use mruby in the offline build for STM32 Nucleo board with mbed and PlatformIO, Japanese) `_ +* Oct 18, 2015 - **Nico Coetzee** - `First Arduino I2C Experience with PlatformIO `_ * Sep 01, 2015 - **Thomas P. Weldon, Ph.D.** - `Improvised MBED FRDM-K64F Eclipse/PlatformIO Setup and Software Installation `_ * Aug 01, 2015 - **Russell Davis** - `PlatformIO on the Raspberry Pi `_ -* Jul 25, 2015 - **DinoTools** - `Erste Schritte mit PlatformIO (German) `_ +* Jul 25, 2015 - **DinoTools** - `Erste Schritte mit PlatformIO (Getting Started with PlatformIO, German) `_ * Jul 20, 2015 - **Eli Fatsi** - `Arduino Development in Atom Editor `_ -* Jul 14, 2015 - **ElbinarIO** - `Programar para Arduino y otros microcontroladores desde la linea de comandos (Spanish) `_ +* Jul 14, 2015 - **ElbinarIO** - `Programar para Arduino y otros microcontroladores desde la linea de comandos (Program Arguino and other microcontrollers from the command line, Spanish) `_ * Jul 11, 2015 - **TrojanC** - `Learning Arduino GitHub Repository `_ -* Jun 02, 2015 - **Alejandro Guirao Rodriguez** - `Discovering PlatformIO: The RaspberryPi / Arduino combo kit is a winner option when prototyping an IoT-style project `_ +* Jul 07, 2015 - **Sho Hashimoto** - `PlatformIOでArduino開発する(Arduino development in PlatformIO, Japanese) `_ +* Jun 02, 2015 - **Alejandro Guirao Rodríguez** - `Discovering PlatformIO: The RaspberryPi / Arduino combo kit is a winner option when prototyping an IoT-style project `_ +* May 17, 2015 - **S.S** - `コマンドラインでArduino開発 : vim + platformio (Arduino development at the command line: VIM + PlatformIO, Japanese) `_ * May 11, 2015 - **IT Hare** - `From Web Developer to Embedded One: Interview with Ivan Kravets, The Guy Behind PlatformIO. Part II `_ * May 4, 2015 - **IT Hare** - `From Web Developer to Embedded One: Interview with Ivan Kravets, The Guy Behind PlatformIO. Part I `_ * April 17, 2015 - **Michael Ball** - `PlatformIO - A Cross-Platform Code Builder and Missing Library Manager `_ diff --git a/docs/ci/appveyor.rst b/docs/ci/appveyor.rst index e05ca4f2..d9273c05 100644 --- a/docs/ci/appveyor.rst +++ b/docs/ci/appveyor.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. + .. _ci_appveyor: AppVeyor @@ -22,6 +33,8 @@ containing the build results (showing success or failure), or by posting a message on an IRC channel. It can be configured to build project on a range of different :ref:`platforms`. +.. contents:: + Integration ----------- diff --git a/docs/ci/circleci.rst b/docs/ci/circleci.rst index daf7e674..773d7769 100644 --- a/docs/ci/circleci.rst +++ b/docs/ci/circleci.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. + .. _ci_circleci: Circle CI @@ -21,6 +32,8 @@ containing the build results (showing success or failure), or by posting a message on an IRC channel. It can be configured to build project on a range of different :ref:`platforms`. +.. contents:: + Integration ----------- diff --git a/docs/ci/drone.rst b/docs/ci/drone.rst index 912b546b..c1035910 100644 --- a/docs/ci/drone.rst +++ b/docs/ci/drone.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. + .. _ci_drone: Drone @@ -20,6 +31,8 @@ the way it has been configured to do so — for example, by sending an email containing the build results (showing success or failure). It can be configured to build project on a range of different :ref:`platforms`. +.. contents:: + Integration ----------- diff --git a/docs/ci/index.rst b/docs/ci/index.rst index 480974bf..877785b3 100644 --- a/docs/ci/index.rst +++ b/docs/ci/index.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. + .. _ci: Continuous Integration diff --git a/docs/ci/shippable.rst b/docs/ci/shippable.rst index 9d27df52..2dda6567 100644 --- a/docs/ci/shippable.rst +++ b/docs/ci/shippable.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. + .. _ci_shippable: Shippable @@ -24,6 +35,8 @@ containing the build results (showing success or failure), or by posting a message on an IRC channel. It can be configured to build project on a range of different :ref:`platforms`. +.. contents:: + Integration ----------- diff --git a/docs/ci/travis.rst b/docs/ci/travis.rst index 8eeff63d..691018cf 100644 --- a/docs/ci/travis.rst +++ b/docs/ci/travis.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. + .. _ci_travis: Travis CI @@ -21,10 +32,17 @@ containing the build results (showing success or failure), or by posting a message on an IRC channel. It can be configured to build project on a range of different :ref:`platforms`. +.. contents:: + Integration ----------- -Please put ``.travis.yml`` to the root directory of the GitHub repository. +Please make sure to read Travis CI `Getting Started `_ +and `general build configuration `_ +guides first. + +PlatformIO is written in Python and is recommended to be run within +`Travis CI Python isolated environment `_: .. code-block:: yaml @@ -32,28 +50,111 @@ Please put ``.travis.yml`` to the root directory of the GitHub repository. python: - "2.7" + # Cache PlatformIO packages using Travis CI container-based infrastructure + sudo: false + cache: + directories: + - "~/.platformio" + env: - - PLATFORMIO_CI_SRC=path/to/source/file.c - - PLATFORMIO_CI_SRC=path/to/source/file.ino - - PLATFORMIO_CI_SRC=path/to/source/directory + - PLATFORMIO_CI_SRC=path/to/test/file.c + - PLATFORMIO_CI_SRC=examples/file.ino + - PLATFORMIO_CI_SRC=path/to/test/directory install: - - python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)" + - pip install -U platformio script: - platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N +Then perform steps 1, 2 and 4 from http://docs.travis-ci.com/user/getting-started/ -Then see step 1, 2, and step 4 here: http://docs.travis-ci.com/user/getting-started/ +For more details as for PlatformIO build process please look into :ref:`cmd_ci`. -For more details as for PlatformIO build process please look into :ref:`cmd_ci` -command. +Project as a library +~~~~~~~~~~~~~~~~~~~~ + +When project is written as a library (where own examples or testing code use +it), please use ``--lib="."`` option for :ref:`cmd_ci` command + +.. code-block:: yaml + + script: + - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N + +Library dependecies +~~~~~~~~~~~~~~~~~~~ + +There 2 options to test source code with dependent libraries: + +Install dependent library using :ref:`librarymanager` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: yaml + + install: + - pip install -U platformio + + # + # Libraries from PlatformIO Library Registry: + # + # http://platformio.org/#!/lib/show/1/OneWire + platformio lib install 1 + +Manually download dependent library and include in build process via ``--lib`` option +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: yaml + + install: + - pip install -U platformio + + # download library to the temporary directory + wget https://github.com/PaulStoffregen/OneWire/archive/master.zip -O /tmp/onewire_source.zip + unzip /tmp/onewire_source.zip -d /tmp/ + + script: + - platformio ci --lib="/tmp/OneWire-master" --board=TYPE_1 --board=TYPE_2 --board=TYPE_N + +Custom Build Flags +~~~~~~~~~~~~~~~~~~ + +PlatformIO allows to specify own build flags using :envvar:`PLATFORMIO_BUILD_FLAGS` environment + +.. code-block:: yaml + + env: + - PLATFORMIO_CI_SRC=path/to/test/file.c PLATFORMIO_BUILD_FLAGS="-D SPECIFIC_MACROS_PER_TEST_ENV -I/extra/inc" + - PLATFORMIO_CI_SRC=examples/file.ino + - PLATFORMIO_CI_SRC=path/to/test/directory + + install: + - pip install -U platformio + + export PLATFORMIO_BUILD_FLAGS=-D GLOBAL_MACROS_FOR_ALL_TEST_ENV + + +For the more details, please follow to +:ref:`available build flags/options `. + + +Advanced configuration +~~~~~~~~~~~~~~~~~~~~~~ + +PlatformIO allows to configure multiple build environments for the single +source code using :ref:`projectconf`. + +Instead of ``--board`` option, please use :option:`platformio ci --project-conf` + +.. code-block:: yaml + + script: + - platformio ci --project-conf=/path/to/platoformio.ini Examples -------- -1. Integration for `USB_Host_Shield_2.0 `_ - project. The ``.travis.yml`` configuration file: +1. Custom build flags .. code-block:: yaml @@ -61,6 +162,12 @@ Examples python: - "2.7" + # Cache PlatformIO packages using Travis CI container-based infrastructure + sudo: false + cache: + directories: + - "~/.platformio" + env: - PLATFORMIO_CI_SRC=examples/acm/acm_terminal - PLATFORMIO_CI_SRC=examples/Bluetooth/WiiIRCamera PLATFORMIO_BUILD_FLAGS="-DWIICAMERA" @@ -69,9 +176,11 @@ Examples # - ... install: - - python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)" + - pip install -U platformio - # Libraries from PlatformIO Library Registry + # + # Libraries from PlatformIO Library Registry: + # # http://platformio.org/#!/lib/show/416/TinyGPS # http://platformio.org/#!/lib/show/417/SPI4Teensy3 - platformio lib install 416 417 @@ -81,3 +190,74 @@ Examples * Configuration file: https://github.com/felis/USB_Host_Shield_2.0/blob/master/.travis.yml * Build History: https://travis-ci.org/felis/USB_Host_Shield_2.0 + +2. Dependency on external libraries + +.. code-block:: yaml + + language: python + python: + - "2.7" + + # Cache PlatformIO packages using Travis CI container-based infrastructure + sudo: false + cache: + directories: + - "~/.platformio" + + env: + - PLATFORMIO_CI_SRC=examples/backSoon/backSoon.ino + - PLATFORMIO_CI_SRC=examples/etherNode/etherNode.ino + # - + + install: + - pip install -U platformio + + - wget https://github.com/jcw/jeelib/archive/master.zip -O /tmp/jeelib.zip + - unzip /tmp/jeelib.zip -d /tmp + + - wget https://github.com/Rodot/Gamebuino/archive/master.zip -O /tmp/gamebuino.zip + - unzip /tmp/gamebuino.zip -d /tmp + + script: + - platformio ci --lib="." --lib="/tmp/jeelib-master" --lib="/tmp/Gamebuino-master/libraries/tinyFAT" --board=uno --board=megaatmega2560 + +* Configuration file: https://github.com/jcw/ethercard/blob/master/.travis.yml +* Build History: https://travis-ci.org/jcw/ethercard + +3. Dynamic testing of the boards + +.. code-block:: yaml + + language: python + python: + - "2.7" + + # Cache PlatformIO packages using Travis CI container-based infrastructure + sudo: false + cache: + directories: + - "~/.platformio" + + env: + - PLATFORMIO_CI_SRC=examples/TimeArduinoDue PLATFORMIO_CI_BOARDS_ARGS="--board=due" + - PLATFORMIO_CI_SRC=examples/TimeGPS + - PLATFORMIO_CI_SRC=examples/TimeNTP + - PLATFORMIO_CI_SRC=examples/TimeTeensy3 PLATFORMIO_CI_BOARDS_ARGS="--board=teensy31" + # - ... + + install: + - pip install -U platformio + - rm -rf ./linux + + # + # Libraries from PlatformIO Library Registry: + # + # http://platformio.org/#!/lib/show/416/TinyGPS + - platformio lib install 416 421 422 + + script: + - if [[ $PLATFORMIO_CI_BOARDS_ARGS ]]; then bash -c 'platformio ci --lib="." $PLATFORMIO_CI_BOARDS_ARGS'; else bash -c 'platformio ci --lib="." --board=uno --board=teensy20pp'; fi + +* Configuration file: https://github.com/ivankravets/Time/blob/master/.travis.yml +* Build History: https://travis-ci.org/ivankravets/Time diff --git a/docs/demo.rst b/docs/demo.rst index 15db587a..6e84f7f9 100644 --- a/docs/demo.rst +++ b/docs/demo.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. + .. _demo: Demo diff --git a/docs/envvars.rst b/docs/envvars.rst index 8682e51d..c495e8c8 100644 --- a/docs/envvars.rst +++ b/docs/envvars.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. + .. _envvars: Environment variables diff --git a/docs/faq.rst b/docs/faq.rst index 833eb024..9a11def4 100644 --- a/docs/faq.rst +++ b/docs/faq.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. + .. _faq: Frequently Asked Questions @@ -13,8 +24,8 @@ General What is PlatformIO? ~~~~~~~~~~~~~~~~~~~ -`PlatformIO `_ is a cross-platform code builder -and the missing library manager. +`PlatformIO `_ is an open-source cross-platform code +builder and the missing library manager. PlatformIO is independent from the platform, in which it is running. In fact, the only requirement is Python, which exists pretty much everywhere. What this @@ -92,8 +103,8 @@ Troubleshooting Installation ~~~~~~~~~~~~ -PlatformIO and ``scons`` aren't installed properly -'''''''''''''''''''''''''''''''''''''''''''''''''' +PlatformIO and SCons aren't installed properly +'''''''''''''''''''''''''''''''''''''''''''''' Try these solutions: @@ -104,7 +115,7 @@ Try these solutions: [sudo] pip uninstall scons [sudo] pip install scons - # if you have "error: option --single-version-externally-managed not recognized", then + # 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`. diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 0e76b4f1..8d2ea38e 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -474,12 +474,19 @@ Espressif - RAM * - ``esp01`` - - `Espressif ESP8266 board `_ + - `Espressif ESP8266 ESP-01 board `_ - ESP8266 - 40 MHz - 512 Kb - 32 Kb + * - ``esp12e`` + - `Espressif ESP8266 ESP-12E board (NodeMCU) `_ + - ESP8266 + - 80 MHz + - 512 Kb + - 32 Kb + LightUp ~~~~~~~ diff --git a/docs/frameworks/index.rst b/docs/frameworks/index.rst index 9abdf801..e1b2bd89 100644 --- a/docs/frameworks/index.rst +++ b/docs/frameworks/index.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. + .. _frameworks: Frameworks diff --git a/docs/frameworks/libopencm3.rst b/docs/frameworks/libopencm3.rst index dfde004a..a4a3aca7 100644 --- a/docs/frameworks/libopencm3.rst +++ b/docs/frameworks/libopencm3.rst @@ -64,6 +64,13 @@ ST - 128 Kb - 16 Kb + * - ``nucleo_f103rb`` + - `ST Nucleo F103RB `_ + - STM32F103RBT6 + - 72 MHz + - 128 Kb + - 20 Kb + TI ~~ diff --git a/docs/history.rst b/docs/history.rst index 25064996..26e3db01 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -1 +1,12 @@ +.. 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. + .. include:: ../HISTORY.rst diff --git a/docs/ide.rst b/docs/ide.rst index aa76637b..723e342e 100644 --- a/docs/ide.rst +++ b/docs/ide.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. + .. _ide: IDE Integration diff --git a/docs/ide/arduino.rst b/docs/ide/arduino.rst index 894cb461..b2af515a 100644 --- a/docs/ide/arduino.rst +++ b/docs/ide/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. + .. _ide_arduino: Arduino diff --git a/docs/ide/atom.rst b/docs/ide/atom.rst index c4fa674c..346747d3 100644 --- a/docs/ide/atom.rst +++ b/docs/ide/atom.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. + .. _ide_atom: Atom diff --git a/docs/ide/clion.rst b/docs/ide/clion.rst index 8e1093ae..3360b1f6 100644 --- a/docs/ide/clion.rst +++ b/docs/ide/clion.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. + .. _ide_clion: CLion diff --git a/docs/ide/eclipse.rst b/docs/ide/eclipse.rst index 753ff838..62f9c045 100644 --- a/docs/ide/eclipse.rst +++ b/docs/ide/eclipse.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. + .. _ide_eclipse: Eclipse diff --git a/docs/ide/energia.rst b/docs/ide/energia.rst index d047e2d0..abad3d2a 100644 --- a/docs/ide/energia.rst +++ b/docs/ide/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. + .. _ide_energia: Energia diff --git a/docs/ide/qtcreator.rst b/docs/ide/qtcreator.rst index 8e687052..6474bfd2 100644 --- a/docs/ide/qtcreator.rst +++ b/docs/ide/qtcreator.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. + .. _ide_qtcreator: Qt Creator diff --git a/docs/ide/sublimetext.rst b/docs/ide/sublimetext.rst index 7241c25c..8f00cc58 100644 --- a/docs/ide/sublimetext.rst +++ b/docs/ide/sublimetext.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. + .. _ide_sublimetext: Sublime Text diff --git a/docs/ide/vim.rst b/docs/ide/vim.rst index cad03289..fd147487 100644 --- a/docs/ide/vim.rst +++ b/docs/ide/vim.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. + .. _ide_vim: VIM diff --git a/docs/ide/visualstudio.rst b/docs/ide/visualstudio.rst index 26885b39..2e680694 100644 --- a/docs/ide/visualstudio.rst +++ b/docs/ide/visualstudio.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. + .. _ide_visualstudio: Visual Studio diff --git a/docs/index.rst b/docs/index.rst index 33e9d7ce..4cf5c3f5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,16 @@ -PlatformIO is a cross-platform code builder and the missing library manager -=========================================================================== +.. 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. + +PlatformIO is an open-source cross-platform code builder and the missing library manager +======================================================================================== **Ready for embedded development, IDE and Continuous integration, Arduino and MBED compatible** diff --git a/docs/installation.rst b/docs/installation.rst index 8d071240..02d0227c 100644 --- a/docs/installation.rst +++ b/docs/installation.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. + .. _installation: Installation @@ -41,7 +52,7 @@ Please *choose one of* the following installation options: Python Package Manager ~~~~~~~~~~~~~~~~~~~~~~ -The latest stable version of PlatformIO may be done via +The latest stable version of PlatformIO may be installed/upgraded via `pip `_ as follows: .. code-block:: bash @@ -52,9 +63,6 @@ The latest stable version of PlatformIO may be done via # install/upgrade the latest version of PlatformIO pip install -U platformio -.. warning:: - Known Issue: :ref:`faq_troubleshooting_sconssingverextmanaged` - Note that you may run into permissions issues running these commands. You have a few options here: diff --git a/docs/librarymanager/config.rst b/docs/librarymanager/config.rst index 8544ac35..db169136 100644 --- a/docs/librarymanager/config.rst +++ b/docs/librarymanager/config.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. + .. |PIOAPICR| replace:: *PlatformIO Library Registry Crawler* .. _library_config: diff --git a/docs/librarymanager/creating.rst b/docs/librarymanager/creating.rst index 88011f12..3ab2a74c 100644 --- a/docs/librarymanager/creating.rst +++ b/docs/librarymanager/creating.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. + .. _library_creating: .. |PIOAPICR| replace:: *PlatformIO Library Registry Crawler* diff --git a/docs/librarymanager/index.rst b/docs/librarymanager/index.rst index 7f00a0bd..c9dc5f15 100644 --- a/docs/librarymanager/index.rst +++ b/docs/librarymanager/index.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. + .. _librarymanager: Library Manager diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index c86340e0..72f0e342 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.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. + .. _platform_atmelavr: Platform ``atmelavr`` diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index 92f515dc..90691dbd 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.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. + .. _platform_atmelsam: Platform ``atmelsam`` diff --git a/docs/platforms/creating_board.rst b/docs/platforms/creating_board.rst index 76c5ed2e..51dabba3 100644 --- a/docs/platforms/creating_board.rst +++ b/docs/platforms/creating_board.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. + .. _board_creating: Creating Board diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 2521f0a0..2eb22c8d 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.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. + .. _platform_creating: Creating Platform diff --git a/docs/platforms/espressif.rst b/docs/platforms/espressif.rst index 5fde9300..ee2b297d 100644 --- a/docs/platforms/espressif.rst +++ b/docs/platforms/espressif.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. + .. _platform_espressif: Platform ``espressif`` @@ -75,8 +86,15 @@ Espressif - RAM * - ``esp01`` - - `Espressif ESP8266 board `_ + - `Espressif ESP8266 ESP-01 board `_ - ESP8266 - 40 MHz - 512 Kb - 32 Kb + + * - ``esp12e`` + - `Espressif ESP8266 ESP-12E board (NodeMCU) `_ + - ESP8266 + - 80 MHz + - 512 Kb + - 32 Kb diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index c2ebcc80..028dcdd3 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.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. + .. _platform_freescalekinetis: Platform ``freescalekinetis`` diff --git a/docs/platforms/index.rst b/docs/platforms/index.rst index f39029f9..2509b8c5 100644 --- a/docs/platforms/index.rst +++ b/docs/platforms/index.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. + .. _platforms: Platforms & Embedded Boards diff --git a/docs/platforms/linux_arm.rst b/docs/platforms/linux_arm.rst index 9a3b3f02..cc93db4b 100644 --- a/docs/platforms/linux_arm.rst +++ b/docs/platforms/linux_arm.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. + .. _platform_linux_arm: Platform ``linux_arm`` diff --git a/docs/platforms/linux_i686.rst b/docs/platforms/linux_i686.rst index 8b0e18d4..9b10f9fd 100644 --- a/docs/platforms/linux_i686.rst +++ b/docs/platforms/linux_i686.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. + .. _platform_linux_i686: Platform ``linux_i686`` diff --git a/docs/platforms/linux_x86_64.rst b/docs/platforms/linux_x86_64.rst index a19f02a4..6964f787 100644 --- a/docs/platforms/linux_x86_64.rst +++ b/docs/platforms/linux_x86_64.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. + .. _platform_linux_x86_64: Platform ``linux_x86_64`` diff --git a/docs/platforms/native.rst b/docs/platforms/native.rst index 5a01d633..ba4864d0 100644 --- a/docs/platforms/native.rst +++ b/docs/platforms/native.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. + .. _platform_native: Platform ``native`` diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index a4f21e32..542fcc44 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.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. + .. _platform_nordicnrf51: Platform ``nordicnrf51`` diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index 52edd4e5..dc9fbff7 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.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. + .. _platform_nxplpc: Platform ``nxplpc`` diff --git a/docs/platforms/siliconlabsefm32.rst b/docs/platforms/siliconlabsefm32.rst index 4c1b987a..d5fb44c1 100644 --- a/docs/platforms/siliconlabsefm32.rst +++ b/docs/platforms/siliconlabsefm32.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. + .. _platform_siliconlabsefm32: Platform ``siliconlabsefm32`` diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index 7e1d16b4..d0dd3655 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.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. + .. _platform_ststm32: Platform ``ststm32`` diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index 02e0c732..46d2c0d0 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.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. + .. _platform_teensy: Platform ``teensy`` diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index b81aada7..e9a2324d 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.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. + .. _platform_timsp430: Platform ``timsp430`` diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index d54e6f33..7eb7c000 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.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. + .. _platform_titiva: Platform ``titiva`` diff --git a/docs/platforms/windows_x86.rst b/docs/platforms/windows_x86.rst index a8b72c95..af02f044 100644 --- a/docs/platforms/windows_x86.rst +++ b/docs/platforms/windows_x86.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. + .. _platform_windows_x86: Platform ``windows_x86`` diff --git a/docs/projectconf.rst b/docs/projectconf.rst index da5fb058..ea1d5768 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.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. + .. _projectconf: Project Configuration File ``platformio.ini`` @@ -504,7 +515,9 @@ Examples platform = atmelavr framework = arduino board = pro8MHzatmega328 - upload_protocol = usbasp - B5 + upload_protocol = usbasp -B5 + +Then upload firmware using :option:`platformio run --target program` 4. :ref:`platform_ststm32`: Upload firmware using GDB script ``upload.gdb``, diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 7ef08e6d..f66ba358 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.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. + .. _quickstart: Quickstart diff --git a/docs/userguide/cmd_boards.rst b/docs/userguide/cmd_boards.rst index d5735999..0d452325 100644 --- a/docs/userguide/cmd_boards.rst +++ b/docs/userguide/cmd_boards.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. + .. _cmd_boards: platformio boards diff --git a/docs/userguide/cmd_ci.rst b/docs/userguide/cmd_ci.rst index 77d9d08b..e4087399 100644 --- a/docs/userguide/cmd_ci.rst +++ b/docs/userguide/cmd_ci.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. + .. _cmd_ci: platformio ci diff --git a/docs/userguide/cmd_init.rst b/docs/userguide/cmd_init.rst index 88be4447..41c7b2ab 100644 --- a/docs/userguide/cmd_init.rst +++ b/docs/userguide/cmd_init.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. + .. _cmd_init: platformio init diff --git a/docs/userguide/cmd_run.rst b/docs/userguide/cmd_run.rst index d1a52aa7..0e24018b 100644 --- a/docs/userguide/cmd_run.rst +++ b/docs/userguide/cmd_run.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. + .. _cmd_run: platformio run @@ -38,8 +49,9 @@ Process specified targets. Pre-built targets: * ``clean`` delete compiled object files, libraries and firmware/program binaries -* ``upload`` enable "auto-uploading" for embedded platforms after building - operation +* ``upload`` firmware "auto-uploading" for embedded platforms +* ``program`` firmware "auto-uploading" for embedded platforms using external + programmer (available only for :ref:`platform_atmelavr`) * ``uploadlazy`` upload existing firmware without project rebuilding * ``envdump`` dump current build environment * ``size`` print the size of the sections in a firmware/program diff --git a/docs/userguide/cmd_serialports.rst b/docs/userguide/cmd_serialports.rst index 53bae993..8cea3be5 100644 --- a/docs/userguide/cmd_serialports.rst +++ b/docs/userguide/cmd_serialports.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. + .. _cmd_serialports: platformio serialports @@ -140,30 +151,41 @@ Set initial ``RTS`` line state, default ``0`` Set initial ``DTR`` line state, default ``0`` .. option:: - --echo + --encoding -Enable local echo, default ``Off`` +Set the encoding for the serial port (e.g. ``hexlify``, ``Latin1``, ``UTF-8``), +default ``UTF-8``. + +**NEW**: Available in Miniterm/PySerial 3.0 .. option:: - --cr + -f, --filter -Do not send ``CR+LF``, send ``R`` only, default ``Off`` +Add text transformation. Available filters: + +* ``colorize`` Apply different colors for received and echo +* ``debug`` Print what is sent and received +* ``default`` Remove typical terminal control codes from input +* ``direct`` Do-nothing: forward all data unchanged +* ``nocontrol`` Remove all control codes, incl. CR+LF +* ``printable`` Show decimal code for all non-ASCII characters and replace + most control codes + +**NEW**: Available in Miniterm/PySerial 3.0 .. option:: - --lf + --eol -Do not send ``CR+LF``, send ``LF`` only, default ``Off`` +End of line mode (``CR``, ``LF`` or ``CRLF``), default ``CRLF`` + +**NEW**: Available in Miniterm/PySerial 3.0 .. option:: - -d, --debug + --raw -Debug received data (escape non-printable chars). ``--debug`` can be given -multiple times: +Do not apply any encodings/transformations -0. just print what is received -1. escape non-printable characters, do newlines as unusual -2. escape non-printable characters, newlines too -3. hex dump everything +**NEW**: Available in Miniterm/PySerial 3.0 .. option:: --exit-char @@ -182,6 +204,43 @@ default ``0x14`` Diagnostics: suppress non-error messages, default ``Off`` + +.. option:: + --echo + +Enable local echo, default ``Off`` + +**REMOVED**: Is not available in Miniterm/PySerial 3.0 + +.. option:: + --cr + +Do not send ``CR+LF``, send ``R`` only, default ``Off`` + +**REMOVED**: Is not available in Miniterm/PySerial 3.0 + +.. option:: + --lf + +Do not send ``CR+LF``, send ``LF`` only, default ``Off`` + +**REMOVED**: Is not available in Miniterm/PySerial 3.0 + +.. option:: + -d, --debug + +Debug received data (escape non-printable chars). ``--debug`` can be given +multiple times: + +0. just print what is received +1. escape non-printable characters, do newlines as unusual +2. escape non-printable characters, newlines too +3. hex dump everything + +**REMOVED**: Is not available in Miniterm/PySerial 3.0. +See :option:`platformio serialports monitor --encoding` and +:option:`platformio serialports monitor --filter` options. + Examples ~~~~~~~~ @@ -201,21 +260,17 @@ Examples --rts [0|1] Set initial RTS line state, default=0 --dtr [0|1] Set initial DTR line state, default=0 --echo Enable local echo, default=Off - --cr Do not send CR+LF, send CR only, default=Off - --lf Do not send CR+LF, send LF only, default=Off - -d, --debug Debug received data (escape non-printable chars) - --debug can be given multiple times: - 0: just print what is received - 1: escape non-printable characters, do newlines as - unusual - 2: escape non-printable characters, newlines too - 3: hex dump everything + --encoding TEXT Set the encoding for the serial port (e.g. hexlify, + Latin1, UTF-8), default: UTF-8 + -f, --filter TEXT Add text transformation + --eol [CR|LF|CRLF] End of line mode, default=CRLF + --raw Do not apply any encodings/transformations --exit-char INTEGER ASCII code of special character that is used to exit - the application, default=0x1d + the application, default=29 (DEC) --menu-char INTEGER ASCII code of special character that is used to - control miniterm (menu), default=0x14 + control miniterm (menu), default=20 (DEC) --quiet Diagnostics: suppress non-error messages, default=Off - --help Show this message and exit. + -h, --help Show this message and exit. 2. Communicate with serial device and print help inside terminal diff --git a/docs/userguide/cmd_settings.rst b/docs/userguide/cmd_settings.rst index d1355dcf..0ffb4f64 100644 --- a/docs/userguide/cmd_settings.rst +++ b/docs/userguide/cmd_settings.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. + .. _cmd_settings: platformio settings diff --git a/docs/userguide/cmd_update.rst b/docs/userguide/cmd_update.rst index 60609fe2..91380b44 100644 --- a/docs/userguide/cmd_update.rst +++ b/docs/userguide/cmd_update.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. + .. _cmd_update: platformio update diff --git a/docs/userguide/cmd_upgrade.rst b/docs/userguide/cmd_upgrade.rst index a41099de..1cb20abd 100644 --- a/docs/userguide/cmd_upgrade.rst +++ b/docs/userguide/cmd_upgrade.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. + .. _cmd_upgrade: platformio upgrade diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst index 5f72d899..46449298 100644 --- a/docs/userguide/index.rst +++ b/docs/userguide/index.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. + .. _userguide: User Guide diff --git a/docs/userguide/lib/cmd_install.rst b/docs/userguide/lib/cmd_install.rst index bb4dd95f..54e032c0 100644 --- a/docs/userguide/lib/cmd_install.rst +++ b/docs/userguide/lib/cmd_install.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. + .. _cmd_lib_install: platformio lib install diff --git a/docs/userguide/lib/cmd_list.rst b/docs/userguide/lib/cmd_list.rst index 07c68bc3..965bc706 100644 --- a/docs/userguide/lib/cmd_list.rst +++ b/docs/userguide/lib/cmd_list.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. + .. _cmd_lib_list: platformio lib list diff --git a/docs/userguide/lib/cmd_register.rst b/docs/userguide/lib/cmd_register.rst index 1ba804f5..2ec77f09 100644 --- a/docs/userguide/lib/cmd_register.rst +++ b/docs/userguide/lib/cmd_register.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. + .. _cmd_lib_register: platformio lib register diff --git a/docs/userguide/lib/cmd_search.rst b/docs/userguide/lib/cmd_search.rst index 41bd8199..4952118a 100644 --- a/docs/userguide/lib/cmd_search.rst +++ b/docs/userguide/lib/cmd_search.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. + .. _cmd_lib_search: platformio lib search diff --git a/docs/userguide/lib/cmd_show.rst b/docs/userguide/lib/cmd_show.rst index 8c4730a4..e5c3aef6 100644 --- a/docs/userguide/lib/cmd_show.rst +++ b/docs/userguide/lib/cmd_show.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. + .. _cmd_lib_show: platformio lib show diff --git a/docs/userguide/lib/cmd_uninstall.rst b/docs/userguide/lib/cmd_uninstall.rst index c2a3d327..e2baf7bd 100644 --- a/docs/userguide/lib/cmd_uninstall.rst +++ b/docs/userguide/lib/cmd_uninstall.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. + .. _cmd_lib_uninstall: platformio lib uninstall diff --git a/docs/userguide/lib/cmd_update.rst b/docs/userguide/lib/cmd_update.rst index f58fab4c..e43e17e7 100644 --- a/docs/userguide/lib/cmd_update.rst +++ b/docs/userguide/lib/cmd_update.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. + .. _cmd_lib_update: platformio lib update diff --git a/docs/userguide/lib/index.rst b/docs/userguide/lib/index.rst index 6d2c5fea..2267c1ad 100644 --- a/docs/userguide/lib/index.rst +++ b/docs/userguide/lib/index.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. + .. _userguide_lib: Library Manager diff --git a/docs/userguide/platforms/cmd_install.rst b/docs/userguide/platforms/cmd_install.rst index ced397f8..559ea5b9 100644 --- a/docs/userguide/platforms/cmd_install.rst +++ b/docs/userguide/platforms/cmd_install.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. + .. _cmd_platforms_install: platformio platforms install diff --git a/docs/userguide/platforms/cmd_list.rst b/docs/userguide/platforms/cmd_list.rst index 90e5d9a5..3c001be2 100644 --- a/docs/userguide/platforms/cmd_list.rst +++ b/docs/userguide/platforms/cmd_list.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. + .. _cmd_platforms_list: platformio platforms list diff --git a/docs/userguide/platforms/cmd_search.rst b/docs/userguide/platforms/cmd_search.rst index 20d9e42e..bad21b69 100644 --- a/docs/userguide/platforms/cmd_search.rst +++ b/docs/userguide/platforms/cmd_search.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. + .. _cmd_platforms_search: platformio platforms search diff --git a/docs/userguide/platforms/cmd_show.rst b/docs/userguide/platforms/cmd_show.rst index 1948b4f2..a8769cb8 100644 --- a/docs/userguide/platforms/cmd_show.rst +++ b/docs/userguide/platforms/cmd_show.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. + .. _cmd_platforms_show: platformio platforms show diff --git a/docs/userguide/platforms/cmd_uninstall.rst b/docs/userguide/platforms/cmd_uninstall.rst index a7e307f9..e7f502b0 100644 --- a/docs/userguide/platforms/cmd_uninstall.rst +++ b/docs/userguide/platforms/cmd_uninstall.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. + .. _cmd_platforms_uninstall: platformio platforms uninstall diff --git a/docs/userguide/platforms/cmd_update.rst b/docs/userguide/platforms/cmd_update.rst index 398d9527..8dbe09f1 100644 --- a/docs/userguide/platforms/cmd_update.rst +++ b/docs/userguide/platforms/cmd_update.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. + .. _cmd_platforms_update: platformio platforms update diff --git a/docs/userguide/platforms/index.rst b/docs/userguide/platforms/index.rst index cdb6211e..eb544d97 100644 --- a/docs/userguide/platforms/index.rst +++ b/docs/userguide/platforms/index.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. + .. _userguide_platforms: Platform Manager diff --git a/examples/atmelavr-and-arduino/adafruit-blink/README.rst b/examples/atmelavr-and-arduino/adafruit-blink/README.rst index 222ce460..ca13829d 100644 --- a/examples/atmelavr-and-arduino/adafruit-blink/README.rst +++ b/examples/atmelavr-and-arduino/adafruit-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst b/examples/atmelavr-and-arduino/arduino-external-libs/README.rst index 8a2d15fa..279d4a5d 100644 --- a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-external-libs/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst b/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst index 826cc34e..fc4b9880 100644 --- a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-internal-libs/README.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. + How to build PlatformIO based project ===================================== 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 ec75a15c..835e4a31 100644 --- a/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst +++ b/examples/atmelavr-and-arduino/arduino-own-src_dir/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst index 7ba51060..52e113be 100644 --- a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst +++ b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst b/examples/atmelavr-and-arduino/digitstump-mouse/README.rst index 97b6e46d..0526181f 100644 --- a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst +++ b/examples/atmelavr-and-arduino/digitstump-mouse/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst b/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst index 6639e20c..707a7232 100644 --- a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst +++ b/examples/atmelavr-and-arduino/engduino-magnetometer/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/atmelavr-and-arduino/panstamp-blink/README.rst b/examples/atmelavr-and-arduino/panstamp-blink/README.rst index a3a0035f..248e83a3 100644 --- a/examples/atmelavr-and-arduino/panstamp-blink/README.rst +++ b/examples/atmelavr-and-arduino/panstamp-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/desktop/hello-world/README.rst b/examples/desktop/hello-world/README.rst index 27f3cb49..2ddc6368 100644 --- a/examples/desktop/hello-world/README.rst +++ b/examples/desktop/hello-world/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/espressif/esp8266-native/README.rst b/examples/espressif/esp8266-native/README.rst index 2704e158..1741b677 100644 --- a/examples/espressif/esp8266-native/README.rst +++ b/examples/espressif/esp8266-native/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/espressif/esp8266-webserver/README.rst b/examples/espressif/esp8266-webserver/README.rst index cf185df7..4a95b045 100644 --- a/examples/espressif/esp8266-webserver/README.rst +++ b/examples/espressif/esp8266-webserver/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/espressif/esp8266-wifiscan/README.rst b/examples/espressif/esp8266-wifiscan/README.rst index 44f46cf9..c4afff90 100644 --- a/examples/espressif/esp8266-wifiscan/README.rst +++ b/examples/espressif/esp8266-wifiscan/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/ide/clion/CMakeLists.txt b/examples/ide/clion/CMakeLists.txt index 19d9e858..c6cfed5a 100644 --- a/examples/ide/clion/CMakeLists.txt +++ b/examples/ide/clion/CMakeLists.txt @@ -1,8 +1,7 @@ cmake_minimum_required(VERSION 3.2) project(clion) -set(ENV{PATH} "/Volumes/SOFT/Projects/GitHub/platformio/origin/.tox/develop/bin:/usr/local/opt/pyenv/shims:/Users/ikravets/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin") -set(PLATFORMIO_CMD "/Volumes/SOFT/Projects/GitHub/platformio/origin/.tox/develop/bin/platformio") +set(PLATFORMIO_CMD platformio) include_directories("$ENV{HOME}/.platformio/packages/framework-arduinoavr/variants/standard") include_directories("$ENV{HOME}/.platformio/packages/framework-arduinoavr/cores/arduino") diff --git a/examples/mbed/mbed-blink/README.rst b/examples/mbed/mbed-blink/README.rst index 50389eb4..57d7bfb7 100644 --- a/examples/mbed/mbed-blink/README.rst +++ b/examples/mbed/mbed-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/mbed/mbed-dsp/README.rst b/examples/mbed/mbed-dsp/README.rst index 70645910..519e8f49 100644 --- a/examples/mbed/mbed-dsp/README.rst +++ b/examples/mbed/mbed-dsp/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/mbed/mbed-http-client/README.rst b/examples/mbed/mbed-http-client/README.rst index b2aa2faf..58eeaabe 100644 --- a/examples/mbed/mbed-http-client/README.rst +++ b/examples/mbed/mbed-http-client/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/mbed/mbed-rtos/README.rst b/examples/mbed/mbed-rtos/README.rst index b2e6ff03..07bd14d1 100644 --- a/examples/mbed/mbed-rtos/README.rst +++ b/examples/mbed/mbed-rtos/README.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. + How to build PlatformIO based project ==================================== diff --git a/examples/mbed/mbed-serial/README.rst b/examples/mbed/mbed-serial/README.rst index 11cc9a66..ce0d997e 100644 --- a/examples/mbed/mbed-serial/README.rst +++ b/examples/mbed/mbed-serial/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/stm32/stm32-cmsis-blink/README.rst b/examples/stm32/stm32-cmsis-blink/README.rst index f02757ad..96ae3b4a 100644 --- a/examples/stm32/stm32-cmsis-blink/README.rst +++ b/examples/stm32/stm32-cmsis-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/stm32/stm32-opencm3-blink/README.rst b/examples/stm32/stm32-opencm3-blink/README.rst index 32f77fe0..e20dc086 100644 --- a/examples/stm32/stm32-opencm3-blink/README.rst +++ b/examples/stm32/stm32-opencm3-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/stm32/stm32-spl-blink/README.rst b/examples/stm32/stm32-spl-blink/README.rst index 32ba57d8..f5c49a3c 100644 --- a/examples/stm32/stm32-spl-blink/README.rst +++ b/examples/stm32/stm32-spl-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/teensy/teensy-hid-usb-mouse/README.rst b/examples/teensy/teensy-hid-usb-mouse/README.rst index e2950ca7..abcaa507 100644 --- a/examples/teensy/teensy-hid-usb-mouse/README.rst +++ b/examples/teensy/teensy-hid-usb-mouse/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/teensy/teensy-internal-libs/README.rst b/examples/teensy/teensy-internal-libs/README.rst index 58dccb21..6876b7d0 100644 --- a/examples/teensy/teensy-internal-libs/README.rst +++ b/examples/teensy/teensy-internal-libs/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/timsp430/panstamp-blink/README.rst b/examples/timsp430/panstamp-blink/README.rst index 9a95c87d..d666a983 100644 --- a/examples/timsp430/panstamp-blink/README.rst +++ b/examples/timsp430/panstamp-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/timsp430/timsp430-energia-blink/README.rst b/examples/timsp430/timsp430-energia-blink/README.rst index bd60b1cc..b8ee24f2 100644 --- a/examples/timsp430/timsp430-energia-blink/README.rst +++ b/examples/timsp430/timsp430-energia-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/timsp430/timsp430-native-blink/README.rst b/examples/timsp430/timsp430-native-blink/README.rst index b7e2c7f9..0357935c 100644 --- a/examples/timsp430/timsp430-native-blink/README.rst +++ b/examples/timsp430/timsp430-native-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/titiva/titiva-energia-blink/README.rst b/examples/titiva/titiva-energia-blink/README.rst index 3d49993d..02ffa896 100644 --- a/examples/titiva/titiva-energia-blink/README.rst +++ b/examples/titiva/titiva-energia-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/titiva/titiva-native-blink/README.rst b/examples/titiva/titiva-native-blink/README.rst index a97487da..d70ae849 100644 --- a/examples/titiva/titiva-native-blink/README.rst +++ b/examples/titiva/titiva-native-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/titiva/titiva-opencm3-blink/README.rst b/examples/titiva/titiva-opencm3-blink/README.rst index 29e2d37f..49484550 100644 --- a/examples/titiva/titiva-opencm3-blink/README.rst +++ b/examples/titiva/titiva-opencm3-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/examples/wiring-blink/README.rst b/examples/wiring-blink/README.rst index 22a843ac..2e599e25 100644 --- a/examples/wiring-blink/README.rst +++ b/examples/wiring-blink/README.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. + How to build PlatformIO based project ===================================== diff --git a/platformio/__init__.py b/platformio/__init__.py index 7243c4ee..4c084e76 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,13 +1,24 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. -VERSION = (2, 3, 4) +VERSION = (2, 3, 5) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" __description__ = ( - "Cross-platform code builder and the missing library manager " - "(Ready for embedded development, IDE and Continuous integration, " + "An open-source cross-platform code builder and the missing library " + "manager (Ready for embedded development, IDE and Continuous integration, " "Arduino and MBED compatible)" ) __url__ = "http://platformio.org" @@ -15,7 +26,7 @@ __url__ = "http://platformio.org" __author__ = "Ivan Kravets" __email__ = "me@ikravets.com" -__license__ = "MIT License" -__copyright__ = "Copyright (C) 2014-2015 Ivan Kravets" +__license__ = "Apache Software License" +__copyright__ = "Copyright 2014-2015 Ivan Kravets" __apiurl__ = "http://api.platformio.org" diff --git a/platformio/__main__.py b/platformio/__main__.py index 011f8549..b437e760 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import listdir from os.path import join diff --git a/platformio/app.py b/platformio/app.py index 8690ed21..0fc162ee 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json from os import environ, getenv diff --git a/platformio/boards/espressif.json b/platformio/boards/espressif.json index e9017d2e..b42f129b 100644 --- a/platformio/boards/espressif.json +++ b/platformio/boards/espressif.json @@ -9,7 +9,29 @@ "variant": "generic" }, "frameworks": ["arduino"], - "name": "Espressif ESP8266 board", + "name": "Espressif ESP8266 ESP-01 board", + "platform": "espressif", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 524288, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://nurdspace.nl/ESP8266", + "vendor": "Espressif" + }, + "esp12e": { + "build": { + "core": "esp8266", + "extra_flags": "-DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.4m.ld", + "mcu": "esp8266", + "variant": "nodemcu" + }, + "frameworks": ["arduino"], + "name": "Espressif ESP8266 ESP-12E board (NodeMCU)", "platform": "espressif", "upload": { "maximum_ram_size": 32768, @@ -21,4 +43,4 @@ "url": "https://nurdspace.nl/ESP8266", "vendor": "Espressif" } -} \ No newline at end of file +} diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index 43913e6d..4eef729d 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -205,11 +205,14 @@ }, "nucleo_f103rb": { "build": { + "core": "stm32", "f_cpu": "72000000L", + "ldscript": "stm32f103xb.ld", "cpu": "cortex-m3", - "mcu": "stm32f103rbt6" + "mcu": "stm32f103rbt6", + "variant": "stm32f1" }, - "frameworks": ["mbed"], + "frameworks": ["mbed","libopencm3"], "name": "ST Nucleo F103RB", "platform": "ststm32", "upload": { diff --git a/platformio/builder/__init__.py b/platformio/builder/__init__.py index ca6f0304..cbfe6a0f 100644 --- a/platformio/builder/__init__.py +++ b/platformio/builder/__init__.py @@ -1,2 +1,13 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 4495e15b..7d61b529 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. try: from platformio import util @@ -18,6 +29,7 @@ except ImportError: sys.path.insert(0, _p) try: from platformio import util + import lockfile # NOQA pylint: disable=unused-import break except ImportError: pass diff --git a/platformio/builder/scripts/__init__.py b/platformio/builder/scripts/__init__.py index ca6f0304..cbfe6a0f 100644 --- a/platformio/builder/scripts/__init__.py +++ b/platformio/builder/scripts/__init__.py @@ -1,2 +1,13 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. diff --git a/platformio/builder/scripts/atmelavr.py b/platformio/builder/scripts/atmelavr.py index 6bdc2b62..ab4d181d 100644 --- a/platformio/builder/scripts/atmelavr.py +++ b/platformio/builder/scripts/atmelavr.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Atmel AVR series of microcontrollers @@ -16,10 +27,6 @@ from platformio.util import get_serialports def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 - def _rpi_sysgpio(path, value): - with open(path, "w") as f: - f.write(str(value)) - if "micronucleus" in env['UPLOADER']: print "Please unplug/plug device ..." @@ -30,18 +37,20 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 env.Replace(UPLOAD_SPEED=None) if env.subst("$UPLOAD_SPEED"): - env.Append(UPLOADERFLAGS=[ - "-b", "$UPLOAD_SPEED", - "-D" - ]) + env.Append(UPLOADERFLAGS=["-b", "$UPLOAD_SPEED"]) - if not upload_options.get("require_upload_port", False): + if upload_options and not upload_options.get("require_upload_port", False): return env.AutodetectUploadPort() env.Append(UPLOADERFLAGS=["-P", "$UPLOAD_PORT"]) if env.subst("$BOARD") == "raspduino": + + def _rpi_sysgpio(path, value): + with open(path, "w") as f: + f.write(str(value)) + _rpi_sysgpio("/sys/class/gpio/export", 18) _rpi_sysgpio("/sys/class/gpio/gpio18/direction", "out") _rpi_sysgpio("/sys/class/gpio/gpio18/value", 1) @@ -86,9 +95,9 @@ else: '"%s"' % join("$PIOPACKAGES_DIR", "tool-avrdude", "avrdude.conf"), "-c", "$UPLOAD_PROTOCOL" ], - - UPLOADHEXCMD='"$UPLOADER" $UPLOADERFLAGS -U flash:w:$SOURCES:i', - UPLOADEEPCMD='"$UPLOADER" $UPLOADERFLAGS -U eeprom:w:$SOURCES:i' + UPLOADHEXCMD='"$UPLOADER" $UPLOADERFLAGS -D -U flash:w:$SOURCES:i', + UPLOADEEPCMD='"$UPLOADER" $UPLOADERFLAGS -U eeprom:w:$SOURCES:i', + PROGRAMHEXCMD='"$UPLOADER" $UPLOADERFLAGS -U flash:w:$SOURCES:i' ) # @@ -132,10 +141,16 @@ AlwaysBuild(upload) # Target: Upload .eep file # -uploadeep = env.Alias("uploadeep", target_eep, [ - BeforeUpload, "$UPLOADEEPCMD"]) +uploadeep = env.Alias("uploadeep", target_eep, [BeforeUpload, "$UPLOADEEPCMD"]) AlwaysBuild(uploadeep) +# +# Target: Upload firmware using external programmer +# + +program = env.Alias("program", target_firm, [BeforeUpload, "$PROGRAMHEXCMD"]) +AlwaysBuild(program) + # # Setup default targets # diff --git a/platformio/builder/scripts/atmelsam.py b/platformio/builder/scripts/atmelsam.py index 00d0fa78..49abe370 100644 --- a/platformio/builder/scripts/atmelsam.py +++ b/platformio/builder/scripts/atmelsam.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Atmel SAM series of microcontrollers diff --git a/platformio/builder/scripts/basearm.py b/platformio/builder/scripts/basearm.py index cb685caf..3c689804 100644 --- a/platformio/builder/scripts/basearm.py +++ b/platformio/builder/scripts/basearm.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Base for ARM microcontrollers. diff --git a/platformio/builder/scripts/baseavr.py b/platformio/builder/scripts/baseavr.py index 7566bcc4..ae2aed7c 100644 --- a/platformio/builder/scripts/baseavr.py +++ b/platformio/builder/scripts/baseavr.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Base for Atmel AVR series of microcontrollers diff --git a/platformio/builder/scripts/espressif.py b/platformio/builder/scripts/espressif.py index d713a897..fde0f7b6 100644 --- a/platformio/builder/scripts/espressif.py +++ b/platformio/builder/scripts/espressif.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Espressif MCUs diff --git a/platformio/builder/scripts/frameworks/__init__.py b/platformio/builder/scripts/frameworks/__init__.py index ca6f0304..cbfe6a0f 100644 --- a/platformio/builder/scripts/frameworks/__init__.py +++ b/platformio/builder/scripts/frameworks/__init__.py @@ -1,2 +1,13 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index 69e00df3..b534f8ac 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Arduino diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index 2d8d55c7..a0098d84 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ CMSIS diff --git a/platformio/builder/scripts/frameworks/energia.py b/platformio/builder/scripts/frameworks/energia.py index 69bdb8fa..099e4051 100644 --- a/platformio/builder/scripts/frameworks/energia.py +++ b/platformio/builder/scripts/frameworks/energia.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Energia diff --git a/platformio/builder/scripts/frameworks/libopencm3.py b/platformio/builder/scripts/frameworks/libopencm3.py index ec6f37ce..8255c442 100644 --- a/platformio/builder/scripts/frameworks/libopencm3.py +++ b/platformio/builder/scripts/frameworks/libopencm3.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ libOpenCM3 diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index f4c18f42..fbd86801 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ mbed diff --git a/platformio/builder/scripts/frameworks/spl.py b/platformio/builder/scripts/frameworks/spl.py index 857de8c5..41832a3f 100644 --- a/platformio/builder/scripts/frameworks/spl.py +++ b/platformio/builder/scripts/frameworks/spl.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ SPL diff --git a/platformio/builder/scripts/freescalekinetis.py b/platformio/builder/scripts/freescalekinetis.py index 0f23c8f6..89e8326c 100644 --- a/platformio/builder/scripts/freescalekinetis.py +++ b/platformio/builder/scripts/freescalekinetis.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Freescale Kinetis series ARM microcontrollers. diff --git a/platformio/builder/scripts/linux_arm.py b/platformio/builder/scripts/linux_arm.py index b8864388..3d571cc5 100644 --- a/platformio/builder/scripts/linux_arm.py +++ b/platformio/builder/scripts/linux_arm.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Linux ARM diff --git a/platformio/builder/scripts/linux_i686.py b/platformio/builder/scripts/linux_i686.py index d0b0968e..8e07b247 100644 --- a/platformio/builder/scripts/linux_i686.py +++ b/platformio/builder/scripts/linux_i686.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Linux Linux i686 / 32-bit diff --git a/platformio/builder/scripts/linux_x86_64.py b/platformio/builder/scripts/linux_x86_64.py index ecb5e775..5f9647fa 100644 --- a/platformio/builder/scripts/linux_x86_64.py +++ b/platformio/builder/scripts/linux_x86_64.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Linux Linux x64_64 / 64-bit diff --git a/platformio/builder/scripts/native.py b/platformio/builder/scripts/native.py index 28e94fe9..90eb3cfa 100644 --- a/platformio/builder/scripts/native.py +++ b/platformio/builder/scripts/native.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for native platform diff --git a/platformio/builder/scripts/nordicnrf51.py b/platformio/builder/scripts/nordicnrf51.py index caed2f55..5d32791d 100644 --- a/platformio/builder/scripts/nordicnrf51.py +++ b/platformio/builder/scripts/nordicnrf51.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Nordic nRF51 series ARM microcontrollers. @@ -25,9 +36,9 @@ target_elf = env.BuildProgram() # if "uploadlazy" in COMMAND_LINE_TARGETS: - target_firm = join("$BUILD_DIR", "firmware.bin") + target_firm = join("$BUILD_DIR", "firmware.hex") else: - target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf) + target_firm = env.ElfToHex(join("$BUILD_DIR", "firmware"), target_elf) # # Target: Print binary size diff --git a/platformio/builder/scripts/nxplpc.py b/platformio/builder/scripts/nxplpc.py index 9585eb5a..20ee5e54 100644 --- a/platformio/builder/scripts/nxplpc.py +++ b/platformio/builder/scripts/nxplpc.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for NXP LPC series ARM microcontrollers. diff --git a/platformio/builder/scripts/siliconlabsefm32.py b/platformio/builder/scripts/siliconlabsefm32.py index 1fd710b9..2b28fb64 100644 --- a/platformio/builder/scripts/siliconlabsefm32.py +++ b/platformio/builder/scripts/siliconlabsefm32.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Silicon Labs EFM32 series ARM microcontrollers. diff --git a/platformio/builder/scripts/ststm32.py b/platformio/builder/scripts/ststm32.py index d9e7f6f5..276192bc 100644 --- a/platformio/builder/scripts/ststm32.py +++ b/platformio/builder/scripts/ststm32.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for ST STM32 Series ARM microcontrollers. diff --git a/platformio/builder/scripts/teensy.py b/platformio/builder/scripts/teensy.py index e7a5643f..f73d157b 100644 --- a/platformio/builder/scripts/teensy.py +++ b/platformio/builder/scripts/teensy.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Teensy boards diff --git a/platformio/builder/scripts/timsp430.py b/platformio/builder/scripts/timsp430.py index b38d4c12..7fc10303 100644 --- a/platformio/builder/scripts/timsp430.py +++ b/platformio/builder/scripts/timsp430.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Texas Instruments diff --git a/platformio/builder/scripts/titiva.py b/platformio/builder/scripts/titiva.py index a94a64e7..800f9a76 100644 --- a/platformio/builder/scripts/titiva.py +++ b/platformio/builder/scripts/titiva.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Texas Instruments diff --git a/platformio/builder/scripts/windows_x86.py b/platformio/builder/scripts/windows_x86.py index d06a9f80..e29a62d9 100644 --- a/platformio/builder/scripts/windows_x86.py +++ b/platformio/builder/scripts/windows_x86.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. """ Builder for Windows x86 / 32bit diff --git a/platformio/builder/tools/__init__.py b/platformio/builder/tools/__init__.py index ca6f0304..cbfe6a0f 100644 --- a/platformio/builder/tools/__init__.py +++ b/platformio/builder/tools/__init__.py @@ -1,2 +1,13 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. diff --git a/platformio/builder/tools/pioar.py b/platformio/builder/tools/pioar.py index c98fa6c0..cd3b9be0 100644 --- a/platformio/builder/tools/pioar.py +++ b/platformio/builder/tools/pioar.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from hashlib import md5 from os.path import join diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index ae1e2323..95e78e24 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import atexit import re diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 4a416c09..8bb33b9f 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -1,7 +1,18 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. -from os.path import join +from os.path import join, isfile from shutil import copyfile from time import sleep @@ -95,8 +106,11 @@ def AutodetectUploadPort(env): def UploadToDisk(_, target, source, env): # pylint: disable=W0613,W0621 env.AutodetectUploadPort() - copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), - join(env.subst("$UPLOAD_PORT"), "firmware.bin")) + for ext in ("bin", "hex"): + fpath = join(env.subst("$BUILD_DIR"), "firmware.%s" % ext) + if not isfile(fpath): + continue + copyfile(fpath, join(env.subst("$UPLOAD_PORT"), "firmware.%s" % ext)) print ("Firmware has been successfully uploaded.\n" "Please restart your board.") diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 26171436..c74ce530 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import re from glob import glob diff --git a/platformio/commands/__init__.py b/platformio/commands/__init__.py index ca6f0304..cbfe6a0f 100644 --- a/platformio/commands/__init__.py +++ b/platformio/commands/__init__.py @@ -1,2 +1,13 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. diff --git a/platformio/commands/boards.py b/platformio/commands/boards.py index dcec8f69..934d308a 100644 --- a/platformio/commands/boards.py +++ b/platformio/commands/boards.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json diff --git a/platformio/commands/ci.py b/platformio/commands/ci.py index b65f09fc..71d05fb2 100644 --- a/platformio/commands/ci.py +++ b/platformio/commands/ci.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import stat from glob import glob diff --git a/platformio/commands/init.py b/platformio/commands/init.py index c558fcd5..f58654db 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import getcwd, makedirs from os.path import isdir, isfile, join diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index b2fed51b..72c21737 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json diff --git a/platformio/commands/platforms.py b/platformio/commands/platforms.py index bdfae393..71899117 100644 --- a/platformio/commands/platforms.py +++ b/platformio/commands/platforms.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json from datetime import datetime diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 11a16325..1a756dfc 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from datetime import datetime from hashlib import sha1 diff --git a/platformio/commands/serialports.py b/platformio/commands/serialports.py index f4232a1b..6c6e58ff 100644 --- a/platformio/commands/serialports.py +++ b/platformio/commands/serialports.py @@ -1,10 +1,22 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json import sys import click +from serial import VERSION as PYSERIAL_VERSION from serial.tools import miniterm from platformio import app @@ -33,52 +45,117 @@ def serialports_list(json_output): click.echo("") -@cli.command("monitor", short_help="Monitor Serial port") -@click.option("--port", "-p", help="Port, a number or a device name") -@click.option("--baud", "-b", type=int, default=9600, - help="Set baud rate, default=9600") -@click.option("--parity", default="N", - type=click.Choice(["N", "E", "O", "S", "M"]), - help="Set parity, default=N") -@click.option("--rtscts", is_flag=True, - help="Enable RTS/CTS flow control, default=Off") -@click.option("--xonxoff", is_flag=True, - help="Enable software flow control, default=Off") -@click.option("--rts", default="0", type=click.Choice(["0", "1"]), - help="Set initial RTS line state, default=0") -@click.option("--dtr", default="0", type=click.Choice(["0", "1"]), - help="Set initial DTR line state, default=0") -@click.option("--echo", is_flag=True, - help="Enable local echo, default=Off") -@click.option("--cr", is_flag=True, - help="Do not send CR+LF, send CR only, default=Off") -@click.option("--lf", is_flag=True, - help="Do not send CR+LF, send LF only, default=Off") -@click.option("--debug", "-d", count=True, - help="""Debug received data (escape non-printable chars) -# --debug can be given multiple times: -# 0: just print what is received -# 1: escape non-printable characters, do newlines as unusual -# 2: escape non-printable characters, newlines too -# 3: hex dump everything""") -@click.option("--exit-char", type=int, default=29, - help="ASCII code of special character that is used to exit the " - "application, default=19 (DEC)") -@click.option("--menu-char", type=int, default=20, - help="ASCII code of special character that is used to control " - "miniterm (menu), default=20 (DEC)") -@click.option("--quiet", is_flag=True, - help="Diagnostics: suppress non-error messages, default=Off") -def serialports_monitor(**kwargs): - sys.argv = app.get_session_var("command_ctx").args[1:] +if int(PYSERIAL_VERSION[0]) == 3: + @cli.command("monitor", short_help="Monitor Serial port") + @click.option("--port", "-p", help="Port, a number or a device name") + @click.option("--baud", "-b", type=int, default=9600, + help="Set baud rate, default=9600") + @click.option("--parity", default="N", + type=click.Choice(["N", "E", "O", "S", "M"]), + help="Set parity, default=N") + @click.option("--rtscts", is_flag=True, + help="Enable RTS/CTS flow control, default=Off") + @click.option("--xonxoff", is_flag=True, + help="Enable software flow control, default=Off") + @click.option("--rts", default="0", type=click.Choice(["0", "1"]), + help="Set initial RTS line state, default=0") + @click.option("--dtr", default="0", type=click.Choice(["0", "1"]), + help="Set initial DTR line state, default=0") + @click.option("--encoding", default="UTF-8", + help="Set the encoding for the serial port (e.g. hexlify, " + "Latin1, UTF-8), default: UTF-8") + @click.option("--filter", "-f", multiple=True, + help="Add text transformation") + @click.option("--eol", default="CRLF", + type=click.Choice(["CR", "LF", "CRLF"]), + help="End of line mode, default=CRLF") + @click.option("--raw", is_flag=True, + help="Do not apply any encodings/transformations") + @click.option("--exit-char", type=int, default=29, + help="ASCII code of special character that is used to exit " + "the application, default=29 (DEC)") + @click.option("--menu-char", type=int, default=20, + help="ASCII code of special character that is used to " + "control miniterm (menu), default=20 (DEC)") + @click.option("--quiet", is_flag=True, + help="Diagnostics: suppress non-error messages, default=Off") + def serialports_monitor(**kwargs): + if not kwargs['port']: + for item in get_serialports(): + if "VID:PID" in item['hwid']: + kwargs['port'] = item['port'] + break - if not kwargs['port']: - for item in get_serialports(): - if "VID:PID" in item['hwid']: - sys.argv += ["--port", item['port']] - break + sys.argv = ["monitor"] + for k, v in kwargs.iteritems(): + if k in ("port", "baud", "rts", "dtr"): + continue + k = "--" + k.replace("_", "-") + if isinstance(v, bool): + if v: + sys.argv.append(k) + elif isinstance(v, tuple): + for i in v: + sys.argv.extend([k, i]) + else: + sys.argv.extend([k, str(v)]) - try: - miniterm.main() - except Exception as e: # pylint: disable=W0702 - raise MinitermException(e) + try: + miniterm.main( # pylint: disable=E1123 + default_port=kwargs['port'], + default_baudrate=kwargs['baud'], + default_rts=kwargs['rts'], + default_dtr=kwargs['dtr'] + ) + except Exception as e: # pylint: disable=W0702 + raise MinitermException(e) +else: + @cli.command("monitor", short_help="Monitor Serial port") + @click.option("--port", "-p", help="Port, a number or a device name") + @click.option("--baud", "-b", type=int, default=9600, + help="Set baud rate, default=9600") + @click.option("--parity", default="N", + type=click.Choice(["N", "E", "O", "S", "M"]), + help="Set parity, default=N") + @click.option("--rtscts", is_flag=True, + help="Enable RTS/CTS flow control, default=Off") + @click.option("--xonxoff", is_flag=True, + help="Enable software flow control, default=Off") + @click.option("--rts", default="0", type=click.Choice(["0", "1"]), + help="Set initial RTS line state, default=0") + @click.option("--dtr", default="0", type=click.Choice(["0", "1"]), + help="Set initial DTR line state, default=0") + @click.option("--echo", is_flag=True, + help="Enable local echo, default=Off") + @click.option("--cr", is_flag=True, + help="Do not send CR+LF, send CR only, default=Off") + @click.option("--lf", is_flag=True, + help="Do not send CR+LF, send LF only, default=Off") + @click.option("--debug", "-d", count=True, + help="""Debug received data (escape non-printable chars) + # --debug can be given multiple times: + # 0: just print what is received + # 1: escape non-printable characters, do newlines as unusual + # 2: escape non-printable characters, newlines too + # 3: hex dump everything""") + @click.option("--exit-char", type=int, default=29, + help="ASCII code of special character that is used to exit " + "the application, default=29 (DEC)") + @click.option("--menu-char", type=int, default=20, + help="ASCII code of special character that is used to " + "control miniterm (menu), default=20 (DEC)") + @click.option("--quiet", is_flag=True, + help="Diagnostics: suppress non-error messages, default=Off") + def serialports_monitor(**kwargs): + sys.argv = app.get_session_var("command_ctx").args[1:] + + if not kwargs['port']: + for item in get_serialports(): + if "VID:PID" in item['hwid']: + sys.argv += ["--port", item['port']] + break + + try: + miniterm.main() + except Exception as e: # pylint: disable=W0702 + raise MinitermException(e) diff --git a/platformio/commands/settings.py b/platformio/commands/settings.py index e600e197..05c2e37c 100644 --- a/platformio/commands/settings.py +++ b/platformio/commands/settings.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import click diff --git a/platformio/commands/update.py b/platformio/commands/update.py index 8afdc5ed..0b23a5e5 100644 --- a/platformio/commands/update.py +++ b/platformio/commands/update.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import click diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index c4c9011e..438e5dc2 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import click import requests diff --git a/platformio/downloader.py b/platformio/downloader.py index 304c5002..4391a39f 100644 --- a/platformio/downloader.py +++ b/platformio/downloader.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from email.utils import parsedate_tz from math import ceil diff --git a/platformio/exception.py b/platformio/exception.py index 8195912e..e0378083 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. class PlatformioException(Exception): diff --git a/platformio/ide/__init__.py b/platformio/ide/__init__.py index ca6f0304..cbfe6a0f 100644 --- a/platformio/ide/__init__.py +++ b/platformio/ide/__init__.py @@ -1,2 +1,13 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index a66bda87..7e90574c 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json import os diff --git a/platformio/ide/tpls/clion/CMakeLists.txt.tpl b/platformio/ide/tpls/clion/CMakeLists.txt.tpl index 680805a1..ddcb7eb8 100644 --- a/platformio/ide/tpls/clion/CMakeLists.txt.tpl +++ b/platformio/ide/tpls/clion/CMakeLists.txt.tpl @@ -6,7 +6,11 @@ set(PLATFORMIO_CMD "{{platformio_path}}") % for include in includes: % if include.startswith(user_home_dir): +% if "windows" in systype: +include_directories("$ENV{HOMEDRIVE}$ENV{HOMEPATH}{{include.replace(user_home_dir, '').replace("\\", "/")}}") +% else: include_directories("$ENV{HOME}{{include.replace(user_home_dir, '').replace("\\", "/")}}") +% end % else: include_directories("{{include.replace("\\", "/")}}") % end @@ -35,10 +39,10 @@ add_custom_target( ) % if main_src_file: -add_executable({{project_name}} {{main_src_file}}) +add_executable({{project_name}} {{main_src_file.replace("\\", "/")}}) % else: # -# To enable code auto-completion, please specify path +# To enable code auto-completion, please specify path # to main source file (*.c, *.cpp) and uncomment line below # # add_executable({{project_name}} src/main_change_me.cpp) diff --git a/platformio/libmanager.py b/platformio/libmanager.py index a358ae7f..0dbe0df0 100644 --- a/platformio/libmanager.py +++ b/platformio/libmanager.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json import re diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 97675dab..a60e90d9 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import re import struct diff --git a/platformio/pkgmanager.py b/platformio/pkgmanager.py index 110b9c23..47cde832 100644 --- a/platformio/pkgmanager.py +++ b/platformio/pkgmanager.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import makedirs, remove from os.path import basename, isdir, isfile, join diff --git a/platformio/platforms/__init__.py b/platformio/platforms/__init__.py index ca6f0304..cbfe6a0f 100644 --- a/platformio/platforms/__init__.py +++ b/platformio/platforms/__init__.py @@ -1,2 +1,13 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. diff --git a/platformio/platforms/atmelavr.py b/platformio/platforms/atmelavr.py index 11f7205c..25d07a7f 100644 --- a/platformio/platforms/atmelavr.py +++ b/platformio/platforms/atmelavr.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform from platformio.util import get_boards diff --git a/platformio/platforms/atmelsam.py b/platformio/platforms/atmelsam.py index e11d98a4..16e3ca51 100644 --- a/platformio/platforms/atmelsam.py +++ b/platformio/platforms/atmelsam.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index 21866942..2fcaf8cd 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import os import re diff --git a/platformio/platforms/espressif.py b/platformio/platforms/espressif.py index 4336aeb3..1b4ea3ab 100644 --- a/platformio/platforms/espressif.py +++ b/platformio/platforms/espressif.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/freescalekinetis.py b/platformio/platforms/freescalekinetis.py index 56239f17..d076fd67 100644 --- a/platformio/platforms/freescalekinetis.py +++ b/platformio/platforms/freescalekinetis.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/linux_arm.py b/platformio/platforms/linux_arm.py index 83aa75b1..87f2c26a 100644 --- a/platformio/platforms/linux_arm.py +++ b/platformio/platforms/linux_arm.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform from platformio.util import get_systype diff --git a/platformio/platforms/linux_i686.py b/platformio/platforms/linux_i686.py index c5928ab8..4598fc66 100644 --- a/platformio/platforms/linux_i686.py +++ b/platformio/platforms/linux_i686.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform from platformio.util import get_systype diff --git a/platformio/platforms/linux_x86_64.py b/platformio/platforms/linux_x86_64.py index a142d076..9cbe74e8 100644 --- a/platformio/platforms/linux_x86_64.py +++ b/platformio/platforms/linux_x86_64.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform from platformio.util import get_systype diff --git a/platformio/platforms/native.py b/platformio/platforms/native.py index f02478cb..8665e12a 100644 --- a/platformio/platforms/native.py +++ b/platformio/platforms/native.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/nordicnrf51.py b/platformio/platforms/nordicnrf51.py index e3a09a0d..cbdca343 100644 --- a/platformio/platforms/nordicnrf51.py +++ b/platformio/platforms/nordicnrf51.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/nxplpc.py b/platformio/platforms/nxplpc.py index b165731f..80700560 100644 --- a/platformio/platforms/nxplpc.py +++ b/platformio/platforms/nxplpc.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/siliconlabsefm32.py b/platformio/platforms/siliconlabsefm32.py index a39f7fb7..ea3c44d8 100644 --- a/platformio/platforms/siliconlabsefm32.py +++ b/platformio/platforms/siliconlabsefm32.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/ststm32.py b/platformio/platforms/ststm32.py index 45c029a9..29cedebe 100644 --- a/platformio/platforms/ststm32.py +++ b/platformio/platforms/ststm32.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/teensy.py b/platformio/platforms/teensy.py index 3ebc4002..31688f4e 100644 --- a/platformio/platforms/teensy.py +++ b/platformio/platforms/teensy.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform from platformio.util import get_boards diff --git a/platformio/platforms/timsp430.py b/platformio/platforms/timsp430.py index 8973cded..e4f7c0e2 100644 --- a/platformio/platforms/timsp430.py +++ b/platformio/platforms/timsp430.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/titiva.py b/platformio/platforms/titiva.py index ffb7e58b..5ba21463 100644 --- a/platformio/platforms/titiva.py +++ b/platformio/platforms/titiva.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/platforms/windows_x86.py b/platformio/platforms/windows_x86.py index a3ba1878..0c82db03 100644 --- a/platformio/platforms/windows_x86.py +++ b/platformio/platforms/windows_x86.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.platforms.base import BasePlatform diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 0d88cc65..17dccb38 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import atexit import platform @@ -177,16 +188,19 @@ class MPDataPusher(object): def _worker(self): while True: - item = self._queue.get() - _item = item.copy() - if "qt" not in _item: - _item['qt'] = time() - self._failedque.append(_item) - if self._send_data(item): - self._failedque.remove(_item) - else: - self._http_offline = True - self._queue.task_done() + try: + item = self._queue.get() + _item = item.copy() + if "qt" not in _item: + _item['qt'] = time() + self._failedque.append(_item) + if self._send_data(item): + self._failedque.remove(_item) + else: + self._http_offline = True + self._queue.task_done() + except: # pylint: disable=W0702 + pass def _send_data(self, data): result = False diff --git a/platformio/unpacker.py b/platformio/unpacker.py index 482aae96..80d66b9e 100644 --- a/platformio/unpacker.py +++ b/platformio/unpacker.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import chmod from os.path import join, splitext diff --git a/platformio/util.py b/platformio/util.py index e9f5efe6..6f2001b5 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import collections import functools @@ -243,14 +254,17 @@ def exec_command(*args, **kwargs): def get_serialports(): - if os.name == "nt": - from serial.tools.list_ports_windows import comports - elif os.name == "posix": - from serial.tools.list_ports_posix import comports - else: + try: + from serial.tools.list_ports import comports + except ImportError: raise exception.GetSerialPortsError(os.name) - return [{"port": p, "description": d, "hwid": h} - for p, d, h in comports() if p] + result = [{"port": p, "description": d, "hwid": h} + for p, d, h in comports() if p] + # fix for PySerial + if not result and system() == "Darwin": + for p in glob("/dev/tty.*"): + result.append({"port": p, "description": "", "hwid": ""}) + return result def get_logicaldisks(): diff --git a/requirements.txt b/requirements.txt index d942675f..2207d695 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -bottle==0.12.8 +bottle==0.12.9 click==5.1 colorama==0.3.3 -lockfile==0.10.2 +lockfile==0.11.0 pyserial==2.7 -requests==2.8.0 -scons==2.3.6 +requests==2.8.1 +scons==2.4.1 diff --git a/scripts/99-platformio-udev.rules b/scripts/99-platformio-udev.rules index ac0751e4..0bd48336 100644 --- a/scripts/99-platformio-udev.rules +++ b/scripts/99-platformio-udev.rules @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. # UDEV Rules for PlatformIO supported boards, http://platformio.org/#!/boards # diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 50dd4601..378d42d9 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from math import ceil from os.path import dirname, join, realpath @@ -110,6 +121,18 @@ def generate_platform(name): print "Processing platform: %s" % name 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(".. _platform_%s:" % name) lines.append("") diff --git a/scripts/fixsymlink.py b/scripts/fixsymlink.py index 28c24254..05b15b70 100644 --- a/scripts/fixsymlink.py +++ b/scripts/fixsymlink.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import chdir, getcwd, readlink, remove, symlink, walk from os.path import exists, islink, join, split diff --git a/scripts/get-platformio.py b/scripts/get-platformio.py index bcab3d14..866e2248 100644 --- a/scripts/get-platformio.py +++ b/scripts/get-platformio.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import os import subprocess @@ -62,11 +73,11 @@ def exec_command(*args, **kwargs): if p.returncode != 0: raise Exception("\n".join([out, err])) - return out + return out.strip() def exec_python_cmd(args): - return exec_command([CURINTERPRETER_PATH] + args).strip() + return exec_command([CURINTERPRETER_PATH] + args) def install_pip(): @@ -86,18 +97,20 @@ def install_pip(): os.unlink(f.name) -def install_pypi_packages(packages): - print (exec_python_cmd([ - "-m", "pip.__main__" if sys.version_info < (2, 7, 0) else "pip", - "install", "-U"] + packages)) +def install_platformio(): + cmd = ["-m", "pip.__main__" if sys.version_info < (2, 7, 0) else "pip"] + try: + print (exec_python_cmd(cmd + ["install", "-U", "platformio"])) + except Exception: + print (exec_python_cmd( + cmd + ["--no-cache-dir", "install", "-U", "platformio"])) def main(): steps = [ - ("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []), - ("Installing Python Package Manager", install_pip, []), - ("Installing PlatformIO and dependencies", install_pypi_packages, - [["setuptools", "platformio"]]) + ("Fixing Windows %PATH% Environment", fix_winpython_pathenv), + ("Installing Python Package Manager", install_pip), + ("Installing PlatformIO and dependencies", install_platformio) ] if not IS_WINDOWS: @@ -109,7 +122,7 @@ def main(): break print ("\n==> %s ..." % s[0]) try: - s[1](*s[2]) + s[1]() print ("[SUCCESS]") except Exception, e: is_error = True diff --git a/scripts/mbed_to_package.py b/scripts/mbed_to_package.py index 3e13e460..891fe153 100644 --- a/scripts/mbed_to_package.py +++ b/scripts/mbed_to_package.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import argparse import zipfile diff --git a/setup.py b/setup.py index 35d674df..8649b2e6 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platform import system @@ -12,7 +23,7 @@ install_requires = [ "bottle", "click>=3.2", "lockfile>=0.9.1", - "pyserial<3", + "pyserial", "requests>=2.4.0" ] @@ -52,7 +63,7 @@ setup( "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: C", "Programming Language :: Python", diff --git a/tests/commands/test_boards.py b/tests/commands/test_boards.py index 62a7f102..3dc92f9b 100644 --- a/tests/commands/test_boards.py +++ b/tests/commands/test_boards.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json from os.path import isfile, join @@ -54,4 +65,6 @@ 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']: + continue assert isfile(join(ldscripts_path, opts['build'].get("ldscript"))) diff --git a/tests/commands/test_init.py b/tests/commands/test_init.py index d354982e..db1178d4 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import makedirs, getcwd from os.path import getsize, isdir, isfile, join diff --git a/tests/commands/test_lib.py b/tests/commands/test_lib.py index aa41decd..17395049 100644 --- a/tests/commands/test_lib.py +++ b/tests/commands/test_lib.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import listdir from os.path import isdir, isfile, join diff --git a/tests/commands/test_platforms.py b/tests/commands/test_platforms.py index 310967a2..5e308e48 100644 --- a/tests/commands/test_platforms.py +++ b/tests/commands/test_platforms.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import json diff --git a/tests/commands/test_settings.py b/tests/commands/test_settings.py index 83bdb54e..312b0e80 100644 --- a/tests/commands/test_settings.py +++ b/tests/commands/test_settings.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from platformio.commands.settings import cli from platformio import app diff --git a/tests/conftest.py b/tests/conftest.py index 50170650..08ad1520 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from os import environ diff --git a/tests/test_examples.py b/tests/test_examples.py index 2e98739d..702a82ab 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. from glob import glob from os import listdir, walk diff --git a/tests/test_pkgmanifest.py b/tests/test_pkgmanifest.py index b59062b0..3e5965ae 100644 --- a/tests/test_pkgmanifest.py +++ b/tests/test_pkgmanifest.py @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. import pytest import requests diff --git a/tox.ini b/tox.ini index 20c742a7..1fb6216e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,16 @@ -# Copyright (C) Ivan Kravets -# See LICENSE for details. +# 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. [tox] envlist = py26, py27, docs, lint