diff --git a/HISTORY.rst b/HISTORY.rst index 517fbeee..adf1d2a5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,27 @@ Release History PlatformIO 2.0 -------------- +2.7.1 (2016-01-06) +~~~~~~~~~~~~~~~~~~ + +* Initial support for Arduino Zero board + (`issue #356 `_) +* Generate default targets for `supported IDE `__ + (CLion, Eclipse IDE, Emacs, Sublime Text, VIM): Build, + Clean, Upload, Upload SPIFFS image, Upload using Programmer, Update installed + platforms and libraries + (`issue #427 `_) +* Updated Teensy Arduino Framework to 1.27 + (`issue #434 `_) +* Fixed uploading of EEPROM data using ``uploadeep`` target for Atmel AVR + development platform +* Fixed project generator for CLion IDE + (`issue #422 `_) +* Fixed package ``shasum`` validation on Mac OS X 10.11.2 + (`issue #429 `_) +* Fixed CMakeLists.txt ``add_executable`` has only one source file + (`issue #421 `_) + 2.7.0 (2015-12-30) ~~~~~~~~~~~~~~~~~~ @@ -26,7 +47,7 @@ PlatformIO 2.0 Programmers `_: AVR ISP, AVRISP mkII, USBtinyISP, USBasp, Parallel Programmer and Arduino as ISP * Fixed issue with current Python interpreter for Python-based tools - (`pull #417 `_) + (`issue #417 `_) 2.6.3 (2015-12-21) ~~~~~~~~~~~~~~~~~~ diff --git a/README.rst b/README.rst index 6bfaa30a..43359b50 100644 --- a/README.rst +++ b/README.rst @@ -28,9 +28,6 @@ PlatformIO .. image:: https://badges.gitter.im/Join%20Chat.svg :alt: Join the chat at https://gitter.im/platformio/platformio :target: https://gitter.im/platformio/platformio -.. image:: https://img.shields.io/PlatformIO/donate.png?color=yellow - :alt: Support PlatformIO Team - :target: https://www.bountysource.com/teams/platformio `Home & Demo `_ | `Project Examples `_ | @@ -177,10 +174,29 @@ Frameworks: For further details, please refer to `What is PlatformIO? `_ +Contributing +------------ + +1. Fork the repository on GitHub. +2. Make a branch off of ``develop`` +3. Run ``pip install tox`` +4. Go to the root of project where is located ``tox.ini`` and run ``tox -e develop`` +5. Activate current development environment: + + * Windows: ``.tox\develop\Scripts\activate`` + * Bash/ZSH: ``source .tox/develop/bin/activate`` + * Fish: ``source .tox/bin/activate.fish`` + +6. Make changes to code, documentation, etc. +7. Lint source code ``tox -e lint`` +8. Run the tests ``tox -e py27`` +9. Commit changes to your forked repository +10. Submit a Pull Request on GitHub. + Licence ------- -Copyright 2014-2015 Ivan Kravets +Copyright 2014-2016 Ivan Kravets 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/docs/_static/extra.css b/docs/_static/extra.css index 1513daa2..b4848bff 100644 --- a/docs/_static/extra.css +++ b/docs/_static/extra.css @@ -1,5 +1,5 @@ /** - * Copyright 2014-2015 Ivan Kravets + * Copyright 2014-2016 Ivan Kravets * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/docs/_static/ide-platformio-eclipse.png b/docs/_static/ide-platformio-eclipse.png index 22f4246a..604ddb3d 100644 Binary files a/docs/_static/ide-platformio-eclipse.png and b/docs/_static/ide-platformio-eclipse.png differ diff --git a/docs/articles.rst b/docs/articles.rst index 8b6367be..52b89ce4 100644 --- a/docs/articles.rst +++ b/docs/articles.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -20,6 +20,11 @@ Articles about us Here are recent articles about PlatformIO: +2016 +^^^^ + +* Jan 05, 2016 - **Julien Rodrigues** - `Internet Of Things: The IDE scandal `_ + 2015 ^^^^ diff --git a/docs/ci/appveyor.rst b/docs/ci/appveyor.rst index d9273c05..b79c690f 100644 --- a/docs/ci/appveyor.rst +++ b/docs/ci/appveyor.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ci/circleci.rst b/docs/ci/circleci.rst index dd87976c..30fefe3f 100644 --- a/docs/ci/circleci.rst +++ b/docs/ci/circleci.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ci/drone.rst b/docs/ci/drone.rst index 1dcec0a4..37d0ac0b 100644 --- a/docs/ci/drone.rst +++ b/docs/ci/drone.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ci/index.rst b/docs/ci/index.rst index 877785b3..93b1b2a6 100644 --- a/docs/ci/index.rst +++ b/docs/ci/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ci/shippable.rst b/docs/ci/shippable.rst index a7a5224a..c64e96e9 100644 --- a/docs/ci/shippable.rst +++ b/docs/ci/shippable.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ci/travis.rst b/docs/ci/travis.rst index ad1949ee..43e1c2c4 100644 --- a/docs/ci/travis.rst +++ b/docs/ci/travis.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/conf.py b/docs/conf.py index ca57fece..2a3116cf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,7 +45,7 @@ master_doc = 'index' # General information about the project. project = u'PlatformIO' -copyright = u'2014-2015, Ivan Kravets' +copyright = u'2014-2016, Ivan Kravets' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/docs/demo.rst b/docs/demo.rst index 34d7669a..9f3bcb87 100644 --- a/docs/demo.rst +++ b/docs/demo.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/envvars.rst b/docs/envvars.rst index 508786ad..d2d4f244 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/faq.rst b/docs/faq.rst index 63e1feec..9658ec74 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 1b862d81..3e4ac33c 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index c81d75e6..8c495c17 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/cmsis_extra.rst b/docs/frameworks/cmsis_extra.rst index 9f5c5f64..7394366e 100644 --- a/docs/frameworks/cmsis_extra.rst +++ b/docs/frameworks/cmsis_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst index f78ddf1c..64a474ee 100644 --- a/docs/frameworks/energia.rst +++ b/docs/frameworks/energia.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/index.rst b/docs/frameworks/index.rst index 1aff07e4..3a385476 100644 --- a/docs/frameworks/index.rst +++ b/docs/frameworks/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/libopencm3.rst b/docs/frameworks/libopencm3.rst index 4da0cc62..729c7b30 100644 --- a/docs/frameworks/libopencm3.rst +++ b/docs/frameworks/libopencm3.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/libopencm3_extra.rst b/docs/frameworks/libopencm3_extra.rst index 26c0c9ac..3f719017 100644 --- a/docs/frameworks/libopencm3_extra.rst +++ b/docs/frameworks/libopencm3_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index e0dc18ce..d67ad290 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/mbed_extra.rst b/docs/frameworks/mbed_extra.rst index 2e252508..0b9fa855 100644 --- a/docs/frameworks/mbed_extra.rst +++ b/docs/frameworks/mbed_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index 2d054327..cae62d7b 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/spl_extra.rst b/docs/frameworks/spl_extra.rst index 0b3ad025..a8e7c984 100644 --- a/docs/frameworks/spl_extra.rst +++ b/docs/frameworks/spl_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/wiringpi.rst b/docs/frameworks/wiringpi.rst index d1ce9bdd..3e7876b3 100644 --- a/docs/frameworks/wiringpi.rst +++ b/docs/frameworks/wiringpi.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/frameworks/wiringpi_extra.rst b/docs/frameworks/wiringpi_extra.rst index e972593c..475e5bd4 100644 --- a/docs/frameworks/wiringpi_extra.rst +++ b/docs/frameworks/wiringpi_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/history.rst b/docs/history.rst index 26e3db01..08e44848 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ide.rst b/docs/ide.rst index b1be7714..54c69373 100644 --- a/docs/ide.rst +++ b/docs/ide.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ide/arduino.rst b/docs/ide/arduino.rst index 8348c046..5c36da12 100644 --- a/docs/ide/arduino.rst +++ b/docs/ide/arduino.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ide/atom.rst b/docs/ide/atom.rst index 23b63aad..424c1e55 100644 --- a/docs/ide/atom.rst +++ b/docs/ide/atom.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ide/clion.rst b/docs/ide/clion.rst index 60df921b..4ab28138 100644 --- a/docs/ide/clion.rst +++ b/docs/ide/clion.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -50,12 +50,15 @@ Then: 2. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``) 3. Build project (*DO NOT RUN*): ``Menu: Run > Build``. -There are 3 predefined targets for building (*NOT FOR RUNNING*, see marks on +There are 6 predefined targets for building (*NOT FOR RUNNING*, see marks on the screenshot below): -* ``PLATFORMIO_BUILD`` - build project without auto-uploading -* ``PLATFORMIO_UPLOAD`` - build and upload (if no errors) -* ``PLATFORMIO_CLEAN`` - clean compiled objects and etc. +* ``PLATFORMIO_BUILD`` - Build project without auto-uploading +* ``PLATFORMIO_UPLOAD`` - Build and upload (if no errors). +* ``PLATFORMIO_CLEAN`` - Clean compiled objects. +* ``PLATFORMIO_PROGRAM`` - Build and upload using external programmer (if no errors), see :ref:`atmelavr_upload_via_programmer`. +* ``PLATFORMIO_UPLOADFS`` - Upload files to file system SPIFFS, see :ref:`platform_espressif_uploadfs`. +* ``PLATFORMIO_UPDATE`` - Update installed platforms and libraries via :ref:`cmd_update`. .. warning:: The libraries which are added, installed or used in the project diff --git a/docs/ide/eclipse.rst b/docs/ide/eclipse.rst index cf17cdd0..006cf97a 100644 --- a/docs/ide/eclipse.rst +++ b/docs/ide/eclipse.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -53,7 +53,20 @@ Then: ``Menu: File > Import... > General > Existing Projects into Workspace > Next`` and specify root directory where is located :ref:`projectconf` 2. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``) -3. Build project: ``Menu: Project > Build Project``. +3. Build project using ``Menu: Project > Build Project`` or preconfigured + Make Targets (see screenshot below): + + + ``PlatformIO: Build`` - Build project without auto-uploading + + ``PlatformIO: Clean`` - Clean compiled objects. + + ``PlatformIO: Upload`` - Build and upload (if no errors) + + ``PlatformIO: Upload using Programmer`` see :ref:`atmelavr_upload_via_programmer` + + ``PlatformIO: Upload SPIFFS image`` see :ref:`platform_espressif_uploadfs` + + ``PlatformIO: Update platforms and libraries`` - Update installed platforms and libraries via :ref:`cmd_update`. + +If you have some problems with unresolved includes, defines, etc., then + +* Restart Eclipse IDE +* Rebuild index using ``Menu: Project > C/C++ Index > Rebuild``. .. warning:: The libraries which are added, installed or used in the project @@ -72,8 +85,10 @@ See a full list with :ref:`articles`. Screenshot ---------- +Cross-platform `Blink Project `_. + .. image:: ../_static/ide-platformio-eclipse.png - :target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio + :target: http://docs.platformio.org/en/latest/_static/ide-platformio-eclipse.png Examples -------- diff --git a/docs/ide/emacs.rst b/docs/ide/emacs.rst index bc3f92e6..5e1e19c4 100644 --- a/docs/ide/emacs.rst +++ b/docs/ide/emacs.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -40,7 +40,7 @@ An Emacs minor mode has been written to facilitate building and uploading from w It can be installed from the MELPA repository using ``M-x package-install``. See the MELPA `Getting Started `_ page for more information. -Setup instructions for the minor mode can be found at the `Github page `_. +Setup instructions and an example config can be found at the `Github page `_. Code completion can optionally be provided by installing `irony-mode `_ @@ -54,15 +54,16 @@ command and generate project via :option:`platformio init --ide` command: .. code-block:: shell platformio init --ide emacs --board %TYPE% - cmake . -There are 4 predefined targets for building. +There are 6 predefined targets for building. -* ``platformio_build`` - Build project without auto-uploading. (``C-c i b``) -* ``platformio_upload`` - Build and upload (if no errors). (``C-c i u``) -* ``platformio_clean`` - Clean compiled objects. (``C-c i c``) -* ``platformio_update`` - Update installed platforms and libraries. (``C-c i d``) +* ``platformio_build`` - Build project without auto-uploading. (``C-c i b``) +* ``platformio_clean`` - Clean compiled objects. (``C-c i c``) +* ``platformio_upload`` - Build and upload (if no errors). (``C-c i u``) +* ``platformio_programmer_upload`` - Build and upload using external programmer (if no errors, see :ref:`atmelavr_upload_via_programmer`). (``C-c i p``) +* ``platformio_spiffs_upload`` - Upload files to file system SPIFFS (see :ref:`platform_espressif_uploadfs`). (``C-c i s``) +* ``platformio_update`` - Update installed platforms and libraries. (``C-c i d``) .. warning:: The libraries which are added, installed or used in the project diff --git a/docs/ide/energia.rst b/docs/ide/energia.rst index e108ce99..0fd91280 100644 --- a/docs/ide/energia.rst +++ b/docs/ide/energia.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ide/qtcreator.rst b/docs/ide/qtcreator.rst index fabd1c4e..c9433ce4 100644 --- a/docs/ide/qtcreator.rst +++ b/docs/ide/qtcreator.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/ide/sublimetext.rst b/docs/ide/sublimetext.rst index 2a2bc05a..7e19c468 100644 --- a/docs/ide/sublimetext.rst +++ b/docs/ide/sublimetext.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -50,6 +50,15 @@ Then: 3. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``) 4. Build project: ``Menu: Tools > Build``. +Also, you can access to all pre-configured targets via +``Menu: Tools > Builds With...`` (ST3) + ++ ``PlatformIO - Build`` - Build project without auto-uploading ++ ``PlatformIO - Clean`` - Clean compiled objects. ++ ``PlatformIO - Upload`` - Build and upload (if no errors) ++ ``PlatformIO - Upload using Programmer`` see :ref:`atmelavr_upload_via_programmer` ++ ``PlatformIO - Upload SPIFFS image`` see :ref:`platform_espressif_uploadfs` ++ ``PlatformIO - Update platforms and libraries`` - Update installed platforms and libraries via :ref:`cmd_update`. Manual Integration ^^^^^^^^^^^^^^^^^^ diff --git a/docs/ide/vim.rst b/docs/ide/vim.rst index e0d06cde..e5e9c749 100644 --- a/docs/ide/vim.rst +++ b/docs/ide/vim.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -48,11 +48,33 @@ Put to the project directory ``Makefile`` wrapper with contents: #PATH := /usr/local/bin:$(PATH) all: + platformio -f -c vim run + + upload: platformio -f -c vim run --target upload clean: platformio -f -c vim run --target clean + program: + platformio -f -c vim run --target program + + uploadfs: + platformio -f -c vim run --target uploadfs + + update: + platformio -f -c vim update + + +Pre-defined targets: + ++ ``Build`` - Build project without auto-uploading ++ ``Clean`` - Clean compiled objects. ++ ``Upload`` - Build and upload (if no errors) ++ ``Upload using Programmer`` see :ref:`atmelavr_upload_via_programmer` ++ ``Upload SPIFFS image`` see :ref:`platform_espressif_uploadfs` ++ ``Update platforms and libraries`` - Update installed platforms and libraries via :ref:`cmd_update`. + Now, in VIM ``cd /path/to/this/project`` and press ``Ctrl+B`` or ``Cmd+B`` (Mac). *PlatformIO* should compile your source code from the ``src`` directory, diff --git a/docs/ide/visualstudio.rst b/docs/ide/visualstudio.rst index 20059aab..dfef7a9e 100644 --- a/docs/ide/visualstudio.rst +++ b/docs/ide/visualstudio.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/index.rst b/docs/index.rst index a112d571..d90add24 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -46,8 +46,8 @@ Embedded Development. *Easier Than Ever.* ----------------------------------------- * Colourful command-line output -* :ref:`IDE Integration ` with *Arduino, Eclipse, Emacs, Energia, Qt Creator, - Sublime Text, Vim, Visual Studio* +* :ref:`IDE Integration ` with *Arduino, Atom, CLion, Eclipse, Emacs, + Energia, Qt Creator, Sublime Text, Vim, Visual Studio* * Cloud compiling and :ref:`ci` with *AppVeyor, Circle CI, Drone, Shippable, Travis CI* * Built-in :ref:`Serial Port Monitor ` and configurable build :ref:`-flags/-options ` diff --git a/docs/installation.rst b/docs/installation.rst index 2ecbfe44..6a593987 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -58,6 +58,10 @@ The latest stable version of PlatformIO may be installed or upgraded via pip install -U platformio +If ``pip`` command is not available run ``easy_install pip`` or use +:ref:`installation_installer_script` which will install ``pip`` and +``platformio`` automatically. + Note that you may run into permissions issues running these commands. You have a few options here: @@ -67,9 +71,6 @@ a few options here: * Run the command in a `virtualenv `_ local to a specific project working set. -If ``pip`` command is not available or you have problems with it try -:ref:`installation_installer_script`. - .. _installation_installer_script: b) Installer Script diff --git a/docs/librarymanager/config.rst b/docs/librarymanager/config.rst index 9a8db121..945f9e15 100644 --- a/docs/librarymanager/config.rst +++ b/docs/librarymanager/config.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -150,18 +150,6 @@ Example: "url": "https://github.com/foo/bar.git" } - -.. _libjson_downloadurl: - -``downloadUrl`` ---------------- - -*Required* if :ref:`libjson_repository` field is not defined | Type: ``String`` - -It is the *HTTP URL* to the archived source code of library. It should end -with the type of archive (``.zip`` or ``.tar.gz``). - - .. _libjson_version: ``version`` @@ -173,15 +161,45 @@ with the type of archive (``.zip`` or ``.tar.gz``). A version of the current library source code. * Can contain a-z, digits, dots or dash. -* `Semantic Versioning `_ is recommended. -* A `CVS `_ - revision from the latest commit. Example: ``13`` (*SVN*) or first 10 - chars of *SHA* digest ``e4564b7da4`` (*Git*). +* `Semantic Versioning `_ IS RECOMMENDED. + +If :ref:`libjson_version` field is not defined and :ref:`libjson_repository` +field is defined, then |PIOAPICR| will use the +`CVS ` revision from +the latest commit as "current version". For example, ``13`` (*SVN*) or first +10 chars of *SHA* digest ``e4564b7da4`` (*Git*). + +If :ref:`libjson_version` and :ref:`libjson_repository` fields are defined, +then :ref:`libjson_version` has HIGHER PRIORITY. We recommend to use +:ref:`libjson_version` field and specify the real release version. In other +case, users will receive updates for library with each new commit to +:ref:`libjson_repository`. .. note:: - You can omit :ref:`libjson_version` field and define - :ref:`libjson_repository` field. In this case - |PIOAPICR| will use the *CVS*-revision from the latest commit. + |PIOAPICR| updates library only if: + - the :ref:`libjson_version` is changed + - ``library.json`` is modified + +Example: + +.. code-block:: javascript + + "repository": + { + "type": "git", + "url": "https://github.com/foo/bar.git" + }, + "version": "1.0.0" + +.. _libjson_downloadurl: + +``downloadUrl`` +--------------- + +*Required* if :ref:`libjson_repository` field is not defined | Type: ``String`` + +It is the *HTTP URL* to the archived source code of library. It should end +with the type of archive (``.zip`` or ``.tar.gz``). Example with fixed release/tag on GitHub: @@ -191,7 +209,6 @@ Example with fixed release/tag on GitHub: "downloadUrl": "https://github.com/foo/bar/archive/v1.0.0.tar.gz", "include": "bar-1.0.0" - See more ``library.json`` :ref:`library_creating_examples`. .. _libjson_url: diff --git a/docs/librarymanager/creating.rst b/docs/librarymanager/creating.rst index 1402488c..31ca2d50 100644 --- a/docs/librarymanager/creating.rst +++ b/docs/librarymanager/creating.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/librarymanager/index.rst b/docs/librarymanager/index.rst index 43974d67..704feac2 100644 --- a/docs/librarymanager/index.rst +++ b/docs/librarymanager/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index c68ca4bf..c6b78a7e 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/atmelavr_extra.rst b/docs/platforms/atmelavr_extra.rst index 28f1b7a8..ec2b42de 100644 --- a/docs/platforms/atmelavr_extra.rst +++ b/docs/platforms/atmelavr_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index c86f9710..8b7b62ce 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/creating_board.rst b/docs/platforms/creating_board.rst index cfe19f14..32b617a8 100644 --- a/docs/platforms/creating_board.rst +++ b/docs/platforms/creating_board.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 884aed97..c20cdf37 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/espressif.rst b/docs/platforms/espressif.rst index 7a7f8acc..32de397f 100644 --- a/docs/platforms/espressif.rst +++ b/docs/platforms/espressif.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/espressif_extra.rst b/docs/platforms/espressif_extra.rst index ae92131d..11c52dc8 100644 --- a/docs/platforms/espressif_extra.rst +++ b/docs/platforms/espressif_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -62,12 +62,13 @@ Uploading files to file system SPIFFS Please make sure to read `ESP8266 Flash layout `_ information first. -1. Create :ref:`projectconf_pio_data_dir` and put files here -2. Run target ``uploadfs`` via :option:`platformio run --target` command. +1. Initialise project :ref:`cmd_init` (if you have not initialized yet) +2. Create :ref:`projectconf_pio_data_dir` and put files here +3. Run target ``uploadfs`` using :option:`platformio run --target` command. To upload SPIFFS image using OTA update please specify ``upload_port`` / -``--upload-port`` as IP address or DNS name (``*.local``). For the details -please follow to :ref:`platform_espressif_ota`. +``--upload-port`` as IP address or mDNS host name (ending with the ``*.local``). +For the details please follow to :ref:`platform_espressif_ota`. By default, will be used default LD Script for the board where is specified SPIFFS offsets (start, end, page, block). You can override it using @@ -88,7 +89,7 @@ There are 2 options: .. code-block:: bash - platformio run --target upload --upload-port IP_ADDRESS_HERE or DNS_NAME.local + platformio run --target upload --upload-port IP_ADDRESS_HERE or mDNS_NAME.local * Specify ``upload_port`` option in :ref:`projectconf` @@ -96,7 +97,7 @@ There are 2 options: [env:myenv] ... - upload_port = IP_ADDRESS_HERE or DNS_NAME.local + upload_port = IP_ADDRESS_HERE or mDNS_NAME.local For example, diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index 028dcdd3..cab19469 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/index.rst b/docs/platforms/index.rst index bb890287..6f0ddadc 100644 --- a/docs/platforms/index.rst +++ b/docs/platforms/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/linux_arm.rst b/docs/platforms/linux_arm.rst index 80c89084..42c072ab 100644 --- a/docs/platforms/linux_arm.rst +++ b/docs/platforms/linux_arm.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/linux_i686.rst b/docs/platforms/linux_i686.rst index 9b10f9fd..5afbda65 100644 --- a/docs/platforms/linux_i686.rst +++ b/docs/platforms/linux_i686.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/linux_x86_64.rst b/docs/platforms/linux_x86_64.rst index 6964f787..a3353056 100644 --- a/docs/platforms/linux_x86_64.rst +++ b/docs/platforms/linux_x86_64.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/native.rst b/docs/platforms/native.rst index 7fb12ec3..4b501f1f 100644 --- a/docs/platforms/native.rst +++ b/docs/platforms/native.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index c6ba20e5..15f65721 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/nordicnrf51_extra.rst b/docs/platforms/nordicnrf51_extra.rst index e74e9338..ebaafa98 100644 --- a/docs/platforms/nordicnrf51_extra.rst +++ b/docs/platforms/nordicnrf51_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index dc9fbff7..c06c0934 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/siliconlabsefm32.rst b/docs/platforms/siliconlabsefm32.rst index d5fb44c1..4095ef5a 100644 --- a/docs/platforms/siliconlabsefm32.rst +++ b/docs/platforms/siliconlabsefm32.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index 3cebcb1a..62e0dc85 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/ststm32_extra.rst b/docs/platforms/ststm32_extra.rst index 3c9b57f6..c30f3b7e 100644 --- a/docs/platforms/ststm32_extra.rst +++ b/docs/platforms/ststm32_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index 46d2c0d0..2cf02492 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index 72b49659..3a824872 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/timsp430_extra.rst b/docs/platforms/timsp430_extra.rst index 678fb17c..364ac8d0 100644 --- a/docs/platforms/timsp430_extra.rst +++ b/docs/platforms/timsp430_extra.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index 7eb7c000..1548200a 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/platforms/windows_x86.rst b/docs/platforms/windows_x86.rst index af02f044..8f2c2ff6 100644 --- a/docs/platforms/windows_x86.rst +++ b/docs/platforms/windows_x86.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 8e809dc1..bb541a10 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -18,8 +18,8 @@ The Project configuration file is named ``platformio.ini``. This is a `INI-style `_ file. ``platformio.ini`` has sections (each denoted by a ``[header]``) and -key / value pairs within the sections. A sign ``#`` at the beginning of the -line indicates a comment. Comment lines are ignored. +key / value pairs within the sections. Lines beginning with ``#`` or ``;`` +are ignored and may be used to provide comments. The sections and their allowable values are described below. @@ -81,7 +81,8 @@ This option can be overridden by global environment variable A path to project's source directory. PlatformIO uses it for :ref:`cmd_run` command. -A default value is ``%project_dir%/src``. +A default value is ``src`` which means that folder is located in the root of +project. This option can be overridden by global environment variable :envvar:`PLATFORMIO_SRC_DIR`. @@ -105,7 +106,8 @@ fast! then PlatformIO will remove this folder automatically. It will be created on the next build operation. -A default value is ``%project_dir%/.pioenvs``. +A default value is ``.pioenvs`` which means that folder is located in the root of +project. This option can be overridden by global environment variable :envvar:`PLATFORMIO_ENVS_DIR`. @@ -122,7 +124,8 @@ This option can be overridden by global environment variable Data directory to store contents and :ref:`platform_espressif_uploadfs`. -A default value is ``%project_dir%/data``. +A default value is ``data`` which means that folder is located in the root of +project. This option can be overridden by global environment variable :envvar:`PLATFORMIO_DATA_DIR`. diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 3ec9f2df..af6dcc84 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/cmd_boards.rst b/docs/userguide/cmd_boards.rst index 0d452325..83b7f86f 100644 --- a/docs/userguide/cmd_boards.rst +++ b/docs/userguide/cmd_boards.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -21,23 +21,45 @@ Usage .. code-block:: bash - # Print all available pre-configured embedded boards - platformio boards - - # Filter boards by "Query" - platformio boards QUERY - + platformio boards [OPTIONS] [FILTER] Description ----------- List pre-configured Embedded Boards +Options +~~~~~~~ + +.. program:: platformio boards + +.. option:: + --json-output + +Return the output in `JSON `_ format Examples -------- -1. Show Arduino-based boards +1. Show all available pre-configured embedded boards + +.. code-block:: bash + + $ platformio boards + + Platform: atmelavr + --------------------------------------------------------------------------- + Type MCU Frequency Flash RAM Name + --------------------------------------------------------------------------- + btatmega168 atmega168 16Mhz 14Kb 1Kb Arduino BT ATmega168 + btatmega328 atmega328p 16Mhz 28Kb 2Kb Arduino BT ATmega328 + diecimilaatmega168 atmega168 16Mhz 14Kb 1Kb Arduino Duemilanove or Diecimila ATmega168 + diecimilaatmega328 atmega328p 16Mhz 30Kb 2Kb Arduino Duemilanove or Diecimila ATmega328 + esplora atmega32u4 16Mhz 28Kb 2Kb Arduino Esplora + ethernet atmega328p 16Mhz 31Kb 2Kb Arduino Ethernet + ... + +2. Filter Arduino-based boards .. code-block:: bash @@ -56,7 +78,7 @@ Examples ... -2. Show mbed-enabled boards +3. Filter mbed-enabled boards .. code-block:: bash @@ -95,7 +117,7 @@ Examples nucleo_f030r8 stm32f030r8t6 48Mhz 64Kb 8Kb ST Nucleo F030R8 ... -3. Show boards which are based on ``ATmega168`` MCU +4. Filter boards which are based on ``ATmega168`` MCU .. code-block:: bash @@ -116,7 +138,7 @@ Examples 168pa16m atmega168p 16Mhz 15Kb 1Kb Microduino Core (Atmega168PA@16M,5V) 168pa8m atmega168p 8Mhz 15Kb 1Kb Microduino Core (Atmega168PA@8M,3.3V) -4. Show boards by :ref:`platform_timsp430` +5. Show boards by :ref:`platform_timsp430` .. code-block:: bash @@ -133,4 +155,3 @@ Examples lpmsp430g2231 msp430g2231 1Mhz 2Kb 128B LaunchPad w/ msp430g2231 (1MHz) lpmsp430g2452 msp430g2452 16Mhz 8Kb 256B LaunchPad w/ msp430g2452 (16MHz) lpmsp430g2553 msp430g2553 16Mhz 16Kb 512B LaunchPad w/ msp430g2553 (16MHz) - diff --git a/docs/userguide/cmd_ci.rst b/docs/userguide/cmd_ci.rst index e4087399..be11b0bc 100644 --- a/docs/userguide/cmd_ci.rst +++ b/docs/userguide/cmd_ci.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/cmd_init.rst b/docs/userguide/cmd_init.rst index 49a43c22..5a4d88a2 100644 --- a/docs/userguide/cmd_init.rst +++ b/docs/userguide/cmd_init.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/cmd_run.rst b/docs/userguide/cmd_run.rst index ce6f43b7..00c33015 100644 --- a/docs/userguide/cmd_run.rst +++ b/docs/userguide/cmd_run.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/cmd_serialports.rst b/docs/userguide/cmd_serialports.rst index 3e5967e3..232ed883 100644 --- a/docs/userguide/cmd_serialports.rst +++ b/docs/userguide/cmd_serialports.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/cmd_settings.rst b/docs/userguide/cmd_settings.rst index 95a2187e..835ad70a 100644 --- a/docs/userguide/cmd_settings.rst +++ b/docs/userguide/cmd_settings.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -113,12 +113,19 @@ Can PlatformIO communicate with you via prompts? :Default: Yes :Values: Yes/No -Share diagnostics and usage information (PlatformIO fatal errors/exceptions, -platforms, boards, frameworks, commands) to help us make PlatformIO better. -The `source code for telemetry service `_ -is open source. You can make sure that we DO NOT share PRIVATE information or -source code of your project. All information shares anonymously. Thanks a lot -that live this setting enabled. +Share diagnostics and usage information to help us make PlatformIO better: + +* PlatformIO errors/exceptions +* The name of used platforms, boards, frameworks (for example, "espressif", "arduino", "uno", etc.) +* The name of commands (for example, "run", "lib list", etc.) +* The type of IDE (for example, "atom", "eclipse", etc.) + +This gives us a sense of what parts of the PlatformIO is most important. + +The source code of telemetry service is `open source `_. You can make sure that we DO NOT share PRIVATE information or +source code of your project. All information shares anonymously. + +Thanks a lot that keep this setting enabled. .. note:: diff --git a/docs/userguide/cmd_update.rst b/docs/userguide/cmd_update.rst index 91380b44..22a65099 100644 --- a/docs/userguide/cmd_update.rst +++ b/docs/userguide/cmd_update.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/cmd_upgrade.rst b/docs/userguide/cmd_upgrade.rst index 1cb20abd..98f2dfe3 100644 --- a/docs/userguide/cmd_upgrade.rst +++ b/docs/userguide/cmd_upgrade.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst index 39f844a0..7b4f8997 100644 --- a/docs/userguide/index.rst +++ b/docs/userguide/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/cmd_install.rst b/docs/userguide/lib/cmd_install.rst index 54e032c0..dbeaed73 100644 --- a/docs/userguide/lib/cmd_install.rst +++ b/docs/userguide/lib/cmd_install.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/cmd_list.rst b/docs/userguide/lib/cmd_list.rst index 965bc706..deb19b9c 100644 --- a/docs/userguide/lib/cmd_list.rst +++ b/docs/userguide/lib/cmd_list.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/cmd_register.rst b/docs/userguide/lib/cmd_register.rst index 2ec77f09..60f00c21 100644 --- a/docs/userguide/lib/cmd_register.rst +++ b/docs/userguide/lib/cmd_register.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/cmd_search.rst b/docs/userguide/lib/cmd_search.rst index 4952118a..51f12248 100644 --- a/docs/userguide/lib/cmd_search.rst +++ b/docs/userguide/lib/cmd_search.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/cmd_show.rst b/docs/userguide/lib/cmd_show.rst index e5c3aef6..0273f3a2 100644 --- a/docs/userguide/lib/cmd_show.rst +++ b/docs/userguide/lib/cmd_show.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/cmd_uninstall.rst b/docs/userguide/lib/cmd_uninstall.rst index e2baf7bd..8e487e36 100644 --- a/docs/userguide/lib/cmd_uninstall.rst +++ b/docs/userguide/lib/cmd_uninstall.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/cmd_update.rst b/docs/userguide/lib/cmd_update.rst index e43e17e7..6b24f699 100644 --- a/docs/userguide/lib/cmd_update.rst +++ b/docs/userguide/lib/cmd_update.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/lib/index.rst b/docs/userguide/lib/index.rst index 2267c1ad..3153ce8c 100644 --- a/docs/userguide/lib/index.rst +++ b/docs/userguide/lib/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/platforms/cmd_install.rst b/docs/userguide/platforms/cmd_install.rst index 559ea5b9..fc36d9ed 100644 --- a/docs/userguide/platforms/cmd_install.rst +++ b/docs/userguide/platforms/cmd_install.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/platforms/cmd_list.rst b/docs/userguide/platforms/cmd_list.rst index 3c001be2..b1b9bb2d 100644 --- a/docs/userguide/platforms/cmd_list.rst +++ b/docs/userguide/platforms/cmd_list.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/platforms/cmd_search.rst b/docs/userguide/platforms/cmd_search.rst index bad21b69..1f372518 100644 --- a/docs/userguide/platforms/cmd_search.rst +++ b/docs/userguide/platforms/cmd_search.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/platforms/cmd_show.rst b/docs/userguide/platforms/cmd_show.rst index a8769cb8..20f005b0 100644 --- a/docs/userguide/platforms/cmd_show.rst +++ b/docs/userguide/platforms/cmd_show.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/platforms/cmd_uninstall.rst b/docs/userguide/platforms/cmd_uninstall.rst index e7f502b0..a9e5411a 100644 --- a/docs/userguide/platforms/cmd_uninstall.rst +++ b/docs/userguide/platforms/cmd_uninstall.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/platforms/cmd_update.rst b/docs/userguide/platforms/cmd_update.rst index 8dbe09f1..f8ba36c9 100644 --- a/docs/userguide/platforms/cmd_update.rst +++ b/docs/userguide/platforms/cmd_update.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/docs/userguide/platforms/index.rst b/docs/userguide/platforms/index.rst index eb544d97..1cd741c1 100644 --- a/docs/userguide/platforms/index.rst +++ b/docs/userguide/platforms/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/adafruit-blink/.travis.yml b/examples/atmelavr-and-arduino/adafruit-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/atmelavr-and-arduino/adafruit-blink/.travis.yml +++ b/examples/atmelavr-and-arduino/adafruit-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/atmelavr-and-arduino/adafruit-blink/README.rst b/examples/atmelavr-and-arduino/adafruit-blink/README.rst index 44c333f1..4467e460 100644 --- a/examples/atmelavr-and-arduino/adafruit-blink/README.rst +++ b/examples/atmelavr-and-arduino/adafruit-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml b/examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml +++ b/examples/atmelavr-and-arduino/arduino-external-libs/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst b/examples/atmelavr-and-arduino/arduino-external-libs/README.rst index dfbaac94..75b55161 100644 --- a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-external-libs/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml b/examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml +++ b/examples/atmelavr-and-arduino/arduino-internal-libs/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst b/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst index e727a3d4..079d728b 100644 --- a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml b/examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml +++ b/examples/atmelavr-and-arduino/arduino-own-src_dir/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # 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 ac1cf1c8..e940bc78 100644 --- a/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst +++ b/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst index 520b9575..ee837b21 100644 --- a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst +++ b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml b/examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml +++ b/examples/atmelavr-and-arduino/digitstump-mouse/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst b/examples/atmelavr-and-arduino/digitstump-mouse/README.rst index afcefad9..f5e407dd 100644 --- a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst +++ b/examples/atmelavr-and-arduino/digitstump-mouse/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml b/examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml +++ b/examples/atmelavr-and-arduino/engduino-magnetometer/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst b/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst index 9c56a802..ab083841 100644 --- a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst +++ b/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/atmelavr-and-arduino/panstamp-blink/.travis.yml b/examples/atmelavr-and-arduino/panstamp-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/atmelavr-and-arduino/panstamp-blink/.travis.yml +++ b/examples/atmelavr-and-arduino/panstamp-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/atmelavr-and-arduino/panstamp-blink/README.rst b/examples/atmelavr-and-arduino/panstamp-blink/README.rst index 8b4ad97a..7f7b0b89 100644 --- a/examples/atmelavr-and-arduino/panstamp-blink/README.rst +++ b/examples/atmelavr-and-arduino/panstamp-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/desktop/hello-world/.travis.yml b/examples/desktop/hello-world/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/desktop/hello-world/.travis.yml +++ b/examples/desktop/hello-world/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/desktop/hello-world/README.rst b/examples/desktop/hello-world/README.rst index add2fb02..c871b779 100644 --- a/examples/desktop/hello-world/README.rst +++ b/examples/desktop/hello-world/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/espressif/esp8266-native/.travis.yml b/examples/espressif/esp8266-native/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/espressif/esp8266-native/.travis.yml +++ b/examples/espressif/esp8266-native/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/espressif/esp8266-native/README.rst b/examples/espressif/esp8266-native/README.rst index a7ebb110..78ce28da 100644 --- a/examples/espressif/esp8266-native/README.rst +++ b/examples/espressif/esp8266-native/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/espressif/esp8266-webserver/.travis.yml b/examples/espressif/esp8266-webserver/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/espressif/esp8266-webserver/.travis.yml +++ b/examples/espressif/esp8266-webserver/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/espressif/esp8266-webserver/README.rst b/examples/espressif/esp8266-webserver/README.rst index 4716db4d..62956133 100644 --- a/examples/espressif/esp8266-webserver/README.rst +++ b/examples/espressif/esp8266-webserver/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/espressif/esp8266-wifiscan/.travis.yml b/examples/espressif/esp8266-wifiscan/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/espressif/esp8266-wifiscan/.travis.yml +++ b/examples/espressif/esp8266-wifiscan/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/espressif/esp8266-wifiscan/README.rst b/examples/espressif/esp8266-wifiscan/README.rst index 34743571..5d463483 100644 --- a/examples/espressif/esp8266-wifiscan/README.rst +++ b/examples/espressif/esp8266-wifiscan/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/ide/clion/.idea/workspace.xml b/examples/ide/clion/.idea/workspace.xml index 95694b4f..a4c03d98 100644 --- a/examples/ide/clion/.idea/workspace.xml +++ b/examples/ide/clion/.idea/workspace.xml @@ -2,13 +2,15 @@ - - - + + + + + @@ -185,11 +187,26 @@ - + + + + + + + + + + + + + - + + + + diff --git a/examples/ide/clion/.travis.yml b/examples/ide/clion/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/ide/clion/.travis.yml +++ b/examples/ide/clion/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/ide/clion/CMakeLists.txt b/examples/ide/clion/CMakeLists.txt index c6cfed5a..3c67b267 100644 --- a/examples/ide/clion/CMakeLists.txt +++ b/examples/ide/clion/CMakeLists.txt @@ -13,8 +13,8 @@ include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/ add_definitions(-DF_CPU=16000000L) add_definitions(-DARDUINO_ARCH_AVR) add_definitions(-DARDUINO_AVR_UNO) -add_definitions(-DARDUINO=10605) -add_definitions(-DPLATFORMIO=020304) +add_definitions(-DARDUINO=10607) +add_definitions(-DPLATFORMIO=020701) add_definitions(-D__AVR_ATmega328P__) add_custom_target( @@ -35,4 +35,24 @@ add_custom_target( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -add_executable(clion src/blink.cpp) +add_custom_target( + PLATFORMIO_PROGRAM ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion run --target program + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + PLATFORMIO_UPLOADFS ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion run --target uploadfs + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + PLATFORMIO_UPDATE_ALL ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion update + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_executable(clion + src/blink.cpp +) diff --git a/examples/ide/eclipse/.cproject b/examples/ide/eclipse/.cproject index a8e197bf..496ac80b 100644 --- a/examples/ide/eclipse/.cproject +++ b/examples/ide/eclipse/.cproject @@ -19,23 +19,19 @@ - + @@ -44,17 +40,13 @@ @@ -63,17 +55,13 @@ @@ -101,4 +89,56 @@ + + + + platformio + -f -c eclipse + run -t program + true + true + false + + + platformio + -f -c eclipse + run -t uploadfs + true + true + false + + + platformio + -f -c eclipse + run + true + true + false + + + platformio + -f -c eclipse + run -t upload + true + true + false + + + platformio + -f -c eclipse + run -t clean + true + true + false + + + platformio + -f -c eclipse + update + true + true + false + + + diff --git a/examples/ide/eclipse/.travis.yml b/examples/ide/eclipse/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/ide/eclipse/.travis.yml +++ b/examples/ide/eclipse/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/ide/qtcreator/.travis.yml b/examples/ide/qtcreator/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/ide/qtcreator/.travis.yml +++ b/examples/ide/qtcreator/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/ide/sublimetext/.travis.yml b/examples/ide/sublimetext/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/ide/sublimetext/.travis.yml +++ b/examples/ide/sublimetext/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/ide/sublimetext/platformio.sublime-project b/examples/ide/sublimetext/platformio.sublime-project index 88a0f925..d6dca18f 100644 --- a/examples/ide/sublimetext/platformio.sublime-project +++ b/examples/ide/sublimetext/platformio.sublime-project @@ -32,6 +32,37 @@ "upload" ], "name": "Upload" + }, + { + "cmd": + [ + "platformio", + "-f", "-c", "sublimetext", + "run", + "--target", + "program" + ], + "name": "Upload using Programmer" + }, + { + "cmd": + [ + "platformio", + "-f", "-c", "sublimetext", + "run", + "--target", + "uploadfs" + ], + "name": "Upload SPIFFS image" + }, + { + "cmd": + [ + "platformio", + "-f", "-c", "sublimetext", + "update" + ], + "name": "Update platforms and libraries" } ], "working_dir": "${project_path:${folder}}", diff --git a/examples/ide/visualstudio/.travis.yml b/examples/ide/visualstudio/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/ide/visualstudio/.travis.yml +++ b/examples/ide/visualstudio/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/mbed/mbed-blink/.travis.yml b/examples/mbed/mbed-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/mbed/mbed-blink/.travis.yml +++ b/examples/mbed/mbed-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/mbed/mbed-blink/README.rst b/examples/mbed/mbed-blink/README.rst index 10be3a99..908f069b 100644 --- a/examples/mbed/mbed-blink/README.rst +++ b/examples/mbed/mbed-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/mbed/mbed-dsp/.travis.yml b/examples/mbed/mbed-dsp/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/mbed/mbed-dsp/.travis.yml +++ b/examples/mbed/mbed-dsp/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/mbed/mbed-dsp/README.rst b/examples/mbed/mbed-dsp/README.rst index 3ade03f0..a829464a 100644 --- a/examples/mbed/mbed-dsp/README.rst +++ b/examples/mbed/mbed-dsp/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/mbed/mbed-http-client/.travis.yml b/examples/mbed/mbed-http-client/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/mbed/mbed-http-client/.travis.yml +++ b/examples/mbed/mbed-http-client/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/mbed/mbed-http-client/README.rst b/examples/mbed/mbed-http-client/README.rst index 3658d85d..c32602ab 100644 --- a/examples/mbed/mbed-http-client/README.rst +++ b/examples/mbed/mbed-http-client/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/mbed/mbed-rtos/.travis.yml b/examples/mbed/mbed-rtos/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/mbed/mbed-rtos/.travis.yml +++ b/examples/mbed/mbed-rtos/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/mbed/mbed-rtos/README.rst b/examples/mbed/mbed-rtos/README.rst index 81fb6556..ef62bf20 100644 --- a/examples/mbed/mbed-rtos/README.rst +++ b/examples/mbed/mbed-rtos/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/mbed/mbed-serial/.travis.yml b/examples/mbed/mbed-serial/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/mbed/mbed-serial/.travis.yml +++ b/examples/mbed/mbed-serial/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/mbed/mbed-serial/README.rst b/examples/mbed/mbed-serial/README.rst index 8d36c8f7..840b9553 100644 --- a/examples/mbed/mbed-serial/README.rst +++ b/examples/mbed/mbed-serial/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/nordicnrf51/rfduino-ibeacon/.travis.yml b/examples/nordicnrf51/rfduino-ibeacon/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/nordicnrf51/rfduino-ibeacon/.travis.yml +++ b/examples/nordicnrf51/rfduino-ibeacon/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/nordicnrf51/rfduino-ibeacon/README.rst b/examples/nordicnrf51/rfduino-ibeacon/README.rst index 8a399ded..06db814e 100644 --- a/examples/nordicnrf51/rfduino-ibeacon/README.rst +++ b/examples/nordicnrf51/rfduino-ibeacon/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/raspberrypi/wiringpi-blink/.travis.yml b/examples/raspberrypi/wiringpi-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/raspberrypi/wiringpi-blink/.travis.yml +++ b/examples/raspberrypi/wiringpi-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/raspberrypi/wiringpi-blink/README.rst b/examples/raspberrypi/wiringpi-blink/README.rst index c6a571ca..b72c7a25 100644 --- a/examples/raspberrypi/wiringpi-blink/README.rst +++ b/examples/raspberrypi/wiringpi-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/raspberrypi/wiringpi-serial/.travis.yml b/examples/raspberrypi/wiringpi-serial/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/raspberrypi/wiringpi-serial/.travis.yml +++ b/examples/raspberrypi/wiringpi-serial/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/raspberrypi/wiringpi-serial/README.rst b/examples/raspberrypi/wiringpi-serial/README.rst index fbcc9f28..4cd75fc9 100644 --- a/examples/raspberrypi/wiringpi-serial/README.rst +++ b/examples/raspberrypi/wiringpi-serial/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/stm32/stm32-cmsis-blink/.travis.yml b/examples/stm32/stm32-cmsis-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/stm32/stm32-cmsis-blink/.travis.yml +++ b/examples/stm32/stm32-cmsis-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/stm32/stm32-cmsis-blink/README.rst b/examples/stm32/stm32-cmsis-blink/README.rst index b8250201..c0a371bb 100644 --- a/examples/stm32/stm32-cmsis-blink/README.rst +++ b/examples/stm32/stm32-cmsis-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/stm32/stm32-opencm3-blink/.travis.yml b/examples/stm32/stm32-opencm3-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/stm32/stm32-opencm3-blink/.travis.yml +++ b/examples/stm32/stm32-opencm3-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/stm32/stm32-opencm3-blink/README.rst b/examples/stm32/stm32-opencm3-blink/README.rst index 4c8c21ad..391be1e8 100644 --- a/examples/stm32/stm32-opencm3-blink/README.rst +++ b/examples/stm32/stm32-opencm3-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/stm32/stm32-spl-blink/.travis.yml b/examples/stm32/stm32-spl-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/stm32/stm32-spl-blink/.travis.yml +++ b/examples/stm32/stm32-spl-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/stm32/stm32-spl-blink/README.rst b/examples/stm32/stm32-spl-blink/README.rst index 1d9dc1dd..55b8744d 100644 --- a/examples/stm32/stm32-spl-blink/README.rst +++ b/examples/stm32/stm32-spl-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/teensy/teensy-hid-usb-mouse/.travis.yml b/examples/teensy/teensy-hid-usb-mouse/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/teensy/teensy-hid-usb-mouse/.travis.yml +++ b/examples/teensy/teensy-hid-usb-mouse/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/teensy/teensy-hid-usb-mouse/README.rst b/examples/teensy/teensy-hid-usb-mouse/README.rst index 4b5d40b0..cc22fdb3 100644 --- a/examples/teensy/teensy-hid-usb-mouse/README.rst +++ b/examples/teensy/teensy-hid-usb-mouse/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/teensy/teensy-internal-libs/.travis.yml b/examples/teensy/teensy-internal-libs/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/teensy/teensy-internal-libs/.travis.yml +++ b/examples/teensy/teensy-internal-libs/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/teensy/teensy-internal-libs/README.rst b/examples/teensy/teensy-internal-libs/README.rst index 07452ca1..1a739fe3 100644 --- a/examples/teensy/teensy-internal-libs/README.rst +++ b/examples/teensy/teensy-internal-libs/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/timsp430/panstamp-blink/.travis.yml b/examples/timsp430/panstamp-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/timsp430/panstamp-blink/.travis.yml +++ b/examples/timsp430/panstamp-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/timsp430/panstamp-blink/README.rst b/examples/timsp430/panstamp-blink/README.rst index a4bbe100..4c2ee991 100644 --- a/examples/timsp430/panstamp-blink/README.rst +++ b/examples/timsp430/panstamp-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/timsp430/timsp430-energia-blink/.travis.yml b/examples/timsp430/timsp430-energia-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/timsp430/timsp430-energia-blink/.travis.yml +++ b/examples/timsp430/timsp430-energia-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/timsp430/timsp430-energia-blink/README.rst b/examples/timsp430/timsp430-energia-blink/README.rst index 3c66c847..4ad053bd 100644 --- a/examples/timsp430/timsp430-energia-blink/README.rst +++ b/examples/timsp430/timsp430-energia-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/timsp430/timsp430-native-blink/.travis.yml b/examples/timsp430/timsp430-native-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/timsp430/timsp430-native-blink/.travis.yml +++ b/examples/timsp430/timsp430-native-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/timsp430/timsp430-native-blink/README.rst b/examples/timsp430/timsp430-native-blink/README.rst index dabf9e09..bc625fd6 100644 --- a/examples/timsp430/timsp430-native-blink/README.rst +++ b/examples/timsp430/timsp430-native-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/titiva/titiva-energia-blink/.travis.yml b/examples/titiva/titiva-energia-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/titiva/titiva-energia-blink/.travis.yml +++ b/examples/titiva/titiva-energia-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/titiva/titiva-energia-blink/README.rst b/examples/titiva/titiva-energia-blink/README.rst index 3a92313f..68cf2bc8 100644 --- a/examples/titiva/titiva-energia-blink/README.rst +++ b/examples/titiva/titiva-energia-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/titiva/titiva-native-blink/.travis.yml b/examples/titiva/titiva-native-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/titiva/titiva-native-blink/.travis.yml +++ b/examples/titiva/titiva-native-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/titiva/titiva-native-blink/README.rst b/examples/titiva/titiva-native-blink/README.rst index ab756424..16bc5296 100644 --- a/examples/titiva/titiva-native-blink/README.rst +++ b/examples/titiva/titiva-native-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/titiva/titiva-opencm3-blink/.travis.yml b/examples/titiva/titiva-opencm3-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/titiva/titiva-opencm3-blink/.travis.yml +++ b/examples/titiva/titiva-opencm3-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/titiva/titiva-opencm3-blink/README.rst b/examples/titiva/titiva-opencm3-blink/README.rst index 49484550..4fa42655 100644 --- a/examples/titiva/titiva-opencm3-blink/README.rst +++ b/examples/titiva/titiva-opencm3-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 diff --git a/examples/wiring-blink/.travis.yml b/examples/wiring-blink/.travis.yml index b57f6fa8..93562520 100644 --- a/examples/wiring-blink/.travis.yml +++ b/examples/wiring-blink/.travis.yml @@ -14,7 +14,7 @@ # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # # -# Please choice one of the following templates (proposed below) and uncomment +# Please choose one of the following templates (proposed below) and uncomment # it (remove "# " before each line) or use own configuration according to the # Travis CI documentation (see above). # diff --git a/examples/wiring-blink/README.rst b/examples/wiring-blink/README.rst index 8b61744d..2a3f5ba2 100644 --- a/examples/wiring-blink/README.rst +++ b/examples/wiring-blink/README.rst @@ -1,4 +1,4 @@ -.. Copyright 2014-2015 Ivan Kravets +.. Copyright 2014-2016 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 @@ -25,6 +25,11 @@ How to build PlatformIO based project # Process example project > platformio run - # Upload firmware + # Upload firmware from all environments > platformio run --target upload + # Process specific environment + > platformio run -e uno + + # Upload firmware from specific environment + > platformio run --target upload diff --git a/examples/wiring-blink/src/main.cpp b/examples/wiring-blink/src/main.cpp index ba4a75de..ae88fcfa 100644 --- a/examples/wiring-blink/src/main.cpp +++ b/examples/wiring-blink/src/main.cpp @@ -8,7 +8,7 @@ void setup() { - // initialize digital pin 13 as an output. + // initialize LED digital pin as an output. pinMode(LED_BUILTIN, OUTPUT); } diff --git a/platformio/__init__.py b/platformio/__init__.py index 975ca541..35d08ccc 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ import sys -VERSION = (2, 7, 0) +VERSION = (2, 7, 1) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" @@ -30,7 +30,7 @@ __author__ = "Ivan Kravets" __email__ = "me@ikravets.com" __license__ = "Apache Software License" -__copyright__ = "Copyright 2014-2015 Ivan Kravets" +__copyright__ = "Copyright 2014-2016 Ivan Kravets" __apiurl__ = "http://api.platformio.org" diff --git a/platformio/__main__.py b/platformio/__main__.py index cafaec6c..a5670711 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/app.py b/platformio/app.py index 2e522aa6..8707f6cd 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/boards/arduino.json b/platformio/boards/arduino.json index a0203302..54939b59 100644 --- a/platformio/boards/arduino.json +++ b/platformio/boards/arduino.json @@ -658,7 +658,7 @@ "core": "arduino", "extra_flags": "-D__SAM3X8E__ -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM", "f_cpu": "84000000L", - "mcu": "at91sam3x8e", + "mcu": "sam3x8e", "cpu": "cortex-m3", "pid": "0x003e", "usb_product": "Arduino Due", @@ -686,7 +686,7 @@ "core": "arduino", "extra_flags": "-D__SAM3X8E__ -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM", "f_cpu": "84000000L", - "mcu": "at91sam3x8e", + "mcu": "sam3x8e", "cpu": "cortex-m3", "pid": "0x003e", "usb_product": "Arduino Due", @@ -708,5 +708,61 @@ }, "url": "http://arduino.cc/en/Main/arduinoBoardDue", "vendor": "Arduino" + }, + "zero": { + "build": { + "core": "arduino_zero", + "extra_flags": "-DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__", + "f_cpu": "48000000L", + "mcu": "samd21g18a", + "cpu": "cortex-m0plus", + "pid": "0x804d", + "usb_product": "Arduino Zero", + "variant": "arduino_zero", + "vid": "0x2341", + "ldscript": "flash_with_bootloader.ld" + }, + "frameworks": ["arduino"], + "name": "Arduino Zero (Programming Port)", + "platform": "atmelsam", + "upload": { + "disable_flushing": true, + "maximum_ram_size": 32768, + "maximum_size": 262144, + "protocol": "sam-ba", + "require_upload_port" : false, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.arduino.cc/en/Main/ArduinoBoardZero", + "vendor": "Arduino" + }, + "zeroUSB": { + "build": { + "core": "arduino_zero", + "extra_flags": "-DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__", + "f_cpu": "48000000L", + "mcu": "samd21g18a", + "cpu": "cortex-m0plus", + "pid": "0x804d", + "usb_product": "Arduino Zero", + "variant": "arduino_zero", + "vid": "0x2341", + "ldscript": "flash_with_bootloader.ld" + }, + "frameworks": ["arduino"], + "name": "Arduino Zero (USB Native Port)", + "platform": "atmelsam", + "upload": { + "disable_flushing": true, + "maximum_ram_size": 32768, + "maximum_size": 262144, + "protocol": "sam-ba", + "require_upload_port" : true, + "use_1200bps_touch": true, + "wait_for_upload_port": true + }, + "url": "https://www.arduino.cc/en/Main/ArduinoBoardZero", + "vendor": "Arduino" } } diff --git a/platformio/boards/espressif.json b/platformio/boards/espressif.json index 80825526..5bef69e7 100644 --- a/platformio/boards/espressif.json +++ b/platformio/boards/espressif.json @@ -78,7 +78,7 @@ "variant": "nodemcu" }, "frameworks": ["arduino"], - "name": "NodeMCU 0.9 & 1.0", + "name": "NodeMCU 0.9 / 1.0", "platform": "espressif", "upload": { "maximum_ram_size": 81920, diff --git a/platformio/boards/teensy.json b/platformio/boards/teensy.json index a7eca4ac..dd4816ae 100644 --- a/platformio/boards/teensy.json +++ b/platformio/boards/teensy.json @@ -63,7 +63,7 @@ "cpu": "cortex-m4" }, "frameworks": ["arduino", "mbed"], - "name": "Teensy 3.1", + "name": "Teensy 3.1 / 3.2", "platform": "teensy", "upload": { "maximum_ram_size": 65536, diff --git a/platformio/builder/__init__.py b/platformio/builder/__init__.py index cbfe6a0f..0c05c3b0 100644 --- a/platformio/builder/__init__.py +++ b/platformio/builder/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/main.py b/platformio/builder/main.py index d6b157d4..fd092324 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/__init__.py b/platformio/builder/scripts/__init__.py index cbfe6a0f..0c05c3b0 100644 --- a/platformio/builder/scripts/__init__.py +++ b/platformio/builder/scripts/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/atmelavr.py b/platformio/builder/scripts/atmelavr.py index 74a33e9e..4822499a 100644 --- a/platformio/builder/scripts/atmelavr.py +++ b/platformio/builder/scripts/atmelavr.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -78,6 +78,16 @@ env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "baseavr.py"))) +env.Append( + CFLAGS=[ + "-std=gnu11" + ], + + CXXFLAGS=[ + "-std=gnu++11" + ] +) + if "digispark" in env.get( "BOARD_OPTIONS", {}).get("build", {}).get("core", ""): env.Replace( @@ -110,13 +120,6 @@ else: target_elf = env.BuildProgram() -# -# Target: Extract EEPROM data (from EEMEM directive) to .eep file -# - -target_eep = env.Alias("eep", env.ElfToEep(join("$BUILD_DIR", "firmware"), - target_elf)) - # # Target: Build the .hex file # @@ -142,10 +145,13 @@ upload = env.Alias(["upload", "uploadlazy"], target_firm, AlwaysBuild(upload) # -# Target: Upload .eep file +# Target: Upload EEPROM data (from EEMEM directive) # -uploadeep = env.Alias("uploadeep", target_eep, [BeforeUpload, "$UPLOADEEPCMD"]) +uploadeep = env.Alias( + "uploadeep", + env.ElfToEep(join("$BUILD_DIR", "firmware"), target_elf), + [BeforeUpload, "$UPLOADEEPCMD"]) AlwaysBuild(uploadeep) # diff --git a/platformio/builder/scripts/atmelsam.py b/platformio/builder/scripts/atmelsam.py index 49abe370..482bd5c3 100644 --- a/platformio/builder/scripts/atmelsam.py +++ b/platformio/builder/scripts/atmelsam.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,12 +28,13 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 env.AutodetectUploadPort() board_type = env.subst("$BOARD") - env.Append( - UPLOADERFLAGS=[ - "-U", - "true" if ("usb" in board_type.lower( - ) or board_type == "digix") else "false" - ]) + if "zero" not in board_type: + env.Append( + UPLOADERFLAGS=[ + "-U", + "true" if ("usb" in board_type.lower( + ) or board_type == "digix") else "false" + ]) upload_options = env.get("BOARD_OPTIONS", {}).get("upload", {}) @@ -57,33 +58,82 @@ env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) -env.Replace( - UPLOADER=join("$PIOPACKAGES_DIR", "$PIOPACKAGE_UPLOADER", "bossac"), - UPLOADERFLAGS=[ - "--info", - "--port", "$UPLOAD_PORT", - "--erase", - "--write", - "--verify", - "--boot", - "--reset" - ], - UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES' -) +if env.subst("$BOARD") == "zero": + env.Replace( + UPLOADER=join("$PIOPACKAGES_DIR", "tool-openocd", "bin", "openocd"), + UPLOADERFLAGS=[ + "-d2", + "-s", + join( + "$PIOPACKAGES_DIR", + "tool-openocd", "share", "openocd", "scripts"), + "-f", + join( + "$PLATFORMFW_DIR", "variants", + "${BOARD_OPTIONS['build']['variant']}", "openocd_scripts", + "${BOARD_OPTIONS['build']['variant']}.cfg" + ), + "-c", "\"telnet_port", "disabled;", + "program", "{{$SOURCES}}", + "verify", "reset", "0x00002000;", "shutdown\"" + ], + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS' + ) +else: + env.Replace( + UPLOADER=join("$PIOPACKAGES_DIR", "$PIOPACKAGE_UPLOADER", "bossac"), + UPLOADERFLAGS=[ + "--info", + "--port", "$UPLOAD_PORT", + "--erase", + "--write", + "--verify", + "--reset", + "--debug" + ], + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES' + ) env.Append( CPPDEFINES=[ - "printf=iprintf", "USBCON", 'USB_MANUFACTURER="PlatformIO"' - ], - - LINKFLAGS=[ - "-Wl,--entry=Reset_Handler", - "-Wl,--start-group" ] ) + +if "due" in env.subst("$BOARD"): + env.Append( + CPPDEFINES=[ + "printf=iprintf" + ], + + LINKFLAGS=[ + "-Wl,--entry=Reset_Handler", + "-Wl,--start-group" + ], + + UPLOADERFLAGS=[ + "--boot", + ] + + ) +elif "zero" in env.subst("$BOARD"): + env.Append( + CPPFLAGS=[ + "--param", "max-inline-insns-single=500" + ], + + CXXFLAGS=[ + "-fno-threadsafe-statics" + ], + + LINKFLAGS=[ + "--specs=nosys.specs", + "--specs=nano.specs" + ] + ) + # # Target: Build executable and linkable firmware # @@ -110,8 +160,12 @@ AlwaysBuild(target_size) # Target: Upload by default .bin file # -upload = env.Alias(["upload", "uploadlazy"], target_firm, - [BeforeUpload, "$UPLOADCMD"]) +if env.subst("$BOARD") == "zero": + upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") +else: + upload = env.Alias(["upload", "uploadlazy"], target_firm, + [BeforeUpload, "$UPLOADCMD"]) + AlwaysBuild(upload) # diff --git a/platformio/builder/scripts/basearm.py b/platformio/builder/scripts/basearm.py index 3c689804..ff11882d 100644 --- a/platformio/builder/scripts/basearm.py +++ b/platformio/builder/scripts/basearm.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,8 +41,7 @@ env.Replace( "-Wall", "-mthumb", "-mcpu=${BOARD_OPTIONS['build']['cpu']}", - "-nostdlib", - "-MMD" # output dependancy info + "-nostdlib" ], CXXFLAGS=[ diff --git a/platformio/builder/scripts/baseavr.py b/platformio/builder/scripts/baseavr.py index b84220dd..133e17c9 100644 --- a/platformio/builder/scripts/baseavr.py +++ b/platformio/builder/scripts/baseavr.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,10 +42,7 @@ env.Replace( "-mmcu=$BOARD_MCU" ], - CFLAGS=["-std=gnu11"], - CXXFLAGS=[ - "-std=gnu++11", "-fno-exceptions", "-fno-threadsafe-statics" ], diff --git a/platformio/builder/scripts/espressif.py b/platformio/builder/scripts/espressif.py index 1f013e68..05d498c0 100644 --- a/platformio/builder/scripts/espressif.py +++ b/platformio/builder/scripts/espressif.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ env.Replace( AS="xtensa-lx106-elf-as", CC="xtensa-lx106-elf-gcc", CXX="xtensa-lx106-elf-g++", - OBJCOPY="xtensa-lx106-elf-objcopy", + OBJCOPY=join("$PIOPACKAGES_DIR", "tool-esptool", "esptool"), RANLIB="xtensa-lx106-elf-ranlib", SIZETOOL="xtensa-lx106-elf-size", @@ -137,7 +137,7 @@ env.Append( BUILDERS=dict( ElfToBin=Builder( action=" ".join([ - '"$UPLOADER"', + '"$OBJCOPY"', "-eo", '"%s"' % join("$PLATFORMFW_DIR", "bootloaders", "eboot", "eboot.elf"), @@ -248,7 +248,7 @@ else: BUILDERS=dict( ElfToBin=Builder( action=" ".join([ - '"$UPLOADER"', + '"$OBJCOPY"', "-eo", "$SOURCES", "-bo", "${TARGETS[0]}", "-bm", "qio", diff --git a/platformio/builder/scripts/frameworks/__init__.py b/platformio/builder/scripts/frameworks/__init__.py index cbfe6a0f..0c05c3b0 100644 --- a/platformio/builder/scripts/frameworks/__init__.py +++ b/platformio/builder/scripts/frameworks/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index a320d170..66721d23 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -168,7 +168,22 @@ if env.subst("${PLATFORMFW_DIR}")[-3:] == "sam": join("$BUILD_DIR", "FrameworkLibSam"), join("$BUILD_DIR", "FrameworkLibSam", "include"), join("$BUILD_DIR", "FrameworkDeviceInc"), - join("$BUILD_DIR", "FrameworkDeviceInc", "sam3xa", "include") + join( + "$BUILD_DIR", + "FrameworkDeviceInc", + "${BOARD_OPTIONS['build']['mcu'][3:]}", + "include" + ) + ], + + LIBPATH=[ + join( + "$PLATFORMFW_DIR", + "variants", + "${BOARD_OPTIONS['build']['variant']}", + "linker_scripts", + "gcc" + ) ] ) @@ -235,12 +250,24 @@ if "variant" in BOARD_BUILDOPTS: )) envsafe = env.Clone() + +if "zero" in env.subst("$BOARD"): + envsafe.Append( + CFLAGS=[ + "-std=gnu11" + ], + + CXXFLAGS=[ + "-std=gnu++11", + ] + ) + libs.append(envsafe.BuildLibrary( join("$BUILD_DIR", "FrameworkArduino"), join("$PLATFORMFW_DIR", "cores", "${BOARD_OPTIONS['build']['core']}") )) -if env.subst("${PLATFORMFW_DIR}")[-3:] == "sam": +if "due" in env.subst("$BOARD"): env.Append( LIBPATH=[ join("$PLATFORMFW_DIR", "variants", diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index f3d7a7ff..e0ea99d5 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/frameworks/energia.py b/platformio/builder/scripts/frameworks/energia.py index 099e4051..79521cc5 100644 --- a/platformio/builder/scripts/frameworks/energia.py +++ b/platformio/builder/scripts/frameworks/energia.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/frameworks/libopencm3.py b/platformio/builder/scripts/frameworks/libopencm3.py index c2bf08b3..2ae27f72 100644 --- a/platformio/builder/scripts/frameworks/libopencm3.py +++ b/platformio/builder/scripts/frameworks/libopencm3.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index e300d5f2..e9a60d86 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -122,7 +122,7 @@ def add_mbedlib(libname, libar): lib_dir = join(env.subst("$PLATFORMFW_DIR"), "libs", libname) if not isfile(join(lib_dir, "TARGET_%s" % variant, "TOOLCHAIN_GCC_ARM", "lib%s.a" % libar)): - print ( + print( "Warning: %s board doesn't have native support for '%s' library!" % (env.get("BOARD"), libname), file=sys.stderr) return diff --git a/platformio/builder/scripts/frameworks/spl.py b/platformio/builder/scripts/frameworks/spl.py index 13e8cac0..1e74eae3 100644 --- a/platformio/builder/scripts/frameworks/spl.py +++ b/platformio/builder/scripts/frameworks/spl.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/frameworks/wiringpi.py b/platformio/builder/scripts/frameworks/wiringpi.py index 7ef80892..c17b4801 100644 --- a/platformio/builder/scripts/frameworks/wiringpi.py +++ b/platformio/builder/scripts/frameworks/wiringpi.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/freescalekinetis.py b/platformio/builder/scripts/freescalekinetis.py index 89e8326c..af832d00 100644 --- a/platformio/builder/scripts/freescalekinetis.py +++ b/platformio/builder/scripts/freescalekinetis.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/linux_arm.py b/platformio/builder/scripts/linux_arm.py index 3d571cc5..15e73370 100644 --- a/platformio/builder/scripts/linux_arm.py +++ b/platformio/builder/scripts/linux_arm.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/linux_i686.py b/platformio/builder/scripts/linux_i686.py index 8e07b247..b9aaecde 100644 --- a/platformio/builder/scripts/linux_i686.py +++ b/platformio/builder/scripts/linux_i686.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/linux_x86_64.py b/platformio/builder/scripts/linux_x86_64.py index 5f9647fa..e837d2a5 100644 --- a/platformio/builder/scripts/linux_x86_64.py +++ b/platformio/builder/scripts/linux_x86_64.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/native.py b/platformio/builder/scripts/native.py index 90eb3cfa..41259514 100644 --- a/platformio/builder/scripts/native.py +++ b/platformio/builder/scripts/native.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/nordicnrf51.py b/platformio/builder/scripts/nordicnrf51.py index b631020b..5d2ccc42 100644 --- a/platformio/builder/scripts/nordicnrf51.py +++ b/platformio/builder/scripts/nordicnrf51.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/nxplpc.py b/platformio/builder/scripts/nxplpc.py index 20ee5e54..a3f5eed3 100644 --- a/platformio/builder/scripts/nxplpc.py +++ b/platformio/builder/scripts/nxplpc.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,8 +27,8 @@ 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")) - print ("Firmware has been successfully uploaded.\n" - "Please restart your board.") + print("Firmware has been successfully uploaded.\n" + "Please restart your board.") env = DefaultEnvironment() diff --git a/platformio/builder/scripts/siliconlabsefm32.py b/platformio/builder/scripts/siliconlabsefm32.py index 2b28fb64..ca2d617d 100644 --- a/platformio/builder/scripts/siliconlabsefm32.py +++ b/platformio/builder/scripts/siliconlabsefm32.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/ststm32.py b/platformio/builder/scripts/ststm32.py index 00b9fcb9..ac1bc604 100644 --- a/platformio/builder/scripts/ststm32.py +++ b/platformio/builder/scripts/ststm32.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/teensy.py b/platformio/builder/scripts/teensy.py index f73d157b..37bfeb1b 100644 --- a/platformio/builder/scripts/teensy.py +++ b/platformio/builder/scripts/teensy.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,7 +28,12 @@ if env.get("BOARD_OPTIONS", {}).get("build", {}).get("core") == "teensy": elif env.get("BOARD_OPTIONS", {}).get("build", {}).get("core") == "teensy3": SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) env.Append( - LINKFLAGS=["-Wl,--defsym=__rtc_localtime=$UNIX_TIME"] + LINKFLAGS=[ + "-Wl,--defsym=__rtc_localtime=$UNIX_TIME" + ], + CPPFLAGS=[ + "-fsingle-precision-constant" + ] ) env.Append( diff --git a/platformio/builder/scripts/timsp430.py b/platformio/builder/scripts/timsp430.py index b4e2498e..525aa5e9 100644 --- a/platformio/builder/scripts/timsp430.py +++ b/platformio/builder/scripts/timsp430.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,7 +44,6 @@ env.Replace( # "-Wall", # show warnings "-ffunction-sections", # place each function in its own section "-fdata-sections", - "-MMD", # output dependancy info "-mmcu=$BOARD_MCU" ], diff --git a/platformio/builder/scripts/titiva.py b/platformio/builder/scripts/titiva.py index 8dbaaf3f..e705cd62 100644 --- a/platformio/builder/scripts/titiva.py +++ b/platformio/builder/scripts/titiva.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/scripts/windows_x86.py b/platformio/builder/scripts/windows_x86.py index e29a62d9..db78f6c1 100644 --- a/platformio/builder/scripts/windows_x86.py +++ b/platformio/builder/scripts/windows_x86.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/tools/__init__.py b/platformio/builder/tools/__init__.py index cbfe6a0f..0c05c3b0 100644 --- a/platformio/builder/tools/__init__.py +++ b/platformio/builder/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/tools/pioar.py b/platformio/builder/tools/pioar.py index 624ff6fc..6d8a2be0 100644 --- a/platformio/builder/tools/pioar.py +++ b/platformio/builder/tools/pioar.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index b6495808..01f70265 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index d4cc03f8..5fe2e416 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 2f08b9b9..f6cc28b4 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/__init__.py b/platformio/commands/__init__.py index cbfe6a0f..0c05c3b0 100644 --- a/platformio/commands/__init__.py +++ b/platformio/commands/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/boards.py b/platformio/commands/boards.py index 934d308a..ac4911bf 100644 --- a/platformio/commands/boards.py +++ b/platformio/commands/boards.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/ci.py b/platformio/commands/ci.py index 8e409508..50978fda 100644 --- a/platformio/commands/ci.py +++ b/platformio/commands/ci.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 08ba9ae4..f07d2992 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index b8d8c90a..0444b088 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -95,7 +95,8 @@ def lib_search(query, **filters): for item in result['items']: echo_liblist_item(item) - if int(result['page'])*int(result['perpage']) >= int(result['total']): + if (int(result['page']) * int(result['perpage']) >= + int(result['total'])): break if (app.get_setting("enable_prompts") and diff --git a/platformio/commands/platforms.py b/platformio/commands/platforms.py index 1a3a6e3a..70af83b3 100644 --- a/platformio/commands/platforms.py +++ b/platformio/commands/platforms.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/run.py b/platformio/commands/run.py index b9d1dd73..a097ebd0 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -201,8 +201,7 @@ def _autoinstall_libs(ctx, libids_list): click.confirm( "The libraries with IDs '%s' have not been installed yet. " "Would you like to install them now?" % - ", ".join([str(i) for i in not_intalled_libs]) - )): + ", ".join([str(i) for i in not_intalled_libs]))): ctx.invoke(cmd_lib_install, libid=not_intalled_libs) diff --git a/platformio/commands/serialports.py b/platformio/commands/serialports.py index 5c091c26..593fb2f3 100644 --- a/platformio/commands/serialports.py +++ b/platformio/commands/serialports.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/settings.py b/platformio/commands/settings.py index 05c2e37c..43be3c8d 100644 --- a/platformio/commands/settings.py +++ b/platformio/commands/settings.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/commands/update.py b/platformio/commands/update.py index 0b23a5e5..52627a7a 100644 --- a/platformio/commands/update.py +++ b/platformio/commands/update.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,4 +24,5 @@ from platformio.commands.platforms import \ @click.pass_context def cli(ctx): ctx.invoke(cmd_platforms_update) + click.echo() ctx.invoke(cmd_lib_update) diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index bec1b066..83520fc2 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/downloader.py b/platformio/downloader.py index 4391a39f..a64c1a5f 100644 --- a/platformio/downloader.py +++ b/platformio/downloader.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -88,12 +88,12 @@ class FileDownloader(object): try: result = util.exec_command(["sha1sum", self._destination]) dlsha1 = result['out'] - except OSError: + except (OSError, ValueError): try: result = util.exec_command( ["shasum", "-a", "1", self._destination]) dlsha1 = result['out'] - except OSError: + except (OSError, ValueError): pass if dlsha1: diff --git a/platformio/exception.py b/platformio/exception.py index fd66ad7d..ad18aefb 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/ide/__init__.py b/platformio/ide/__init__.py index cbfe6a0f..0c05c3b0 100644 --- a/platformio/ide/__init__.py +++ b/platformio/ide/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index 28132e58..05ccafa2 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -74,9 +74,9 @@ class ProjectGenerator(object): "\n".join([result['out'], result['err']])) output = result['out'] - start_index = output.index('\n{"') + start_index = output.index('{"') stop_index = output.rindex('}') - data = json.loads(output[start_index + 1:stop_index + 1]) + data = json.loads(output[start_index:stop_index + 1]) return data @@ -91,14 +91,6 @@ class ProjectGenerator(object): result.append(relpath(join(root, f))) return result - @staticmethod - def get_main_src_file(src_files): - for f in src_files: - for ext in ("c", "cpp"): - if f.endswith(".%s" % ext): - return f - return None - def get_tpls(self): tpls = [] tpls_dir = join(util.get_source_dir(), "ide", "tpls", self.ide) @@ -132,9 +124,9 @@ class ProjectGenerator(object): def _gather_tplvars(self): src_files = self.get_src_files() - main_src_file = self.get_main_src_file(src_files) - if not main_src_file and self.ide == "clion": + if (not any([f.endswith((".c", ".cpp")) for f in src_files]) and + self.ide == "clion"): click.secho( "Warning! Can not find main source file (*.c, *.cpp). So, " "code auto-completion is disabled. Please add source files " @@ -147,7 +139,6 @@ class ProjectGenerator(object): self._tplvars.update({ "project_name": self.get_project_name(), "src_files": src_files, - "main_src_file": main_src_file, "user_home_dir": abspath(expanduser("~")), "project_dir": self.project_dir, "systype": util.get_systype(), diff --git a/platformio/ide/tpls/atom/.clang_complete.tpl b/platformio/ide/tpls/atom/.clang_complete.tpl new file mode 100644 index 00000000..8b8555ef --- /dev/null +++ b/platformio/ide/tpls/atom/.clang_complete.tpl @@ -0,0 +1,6 @@ +% for include in includes: +-I{{include}} +% end +% for define in defines: +-D{{define}} +% end \ No newline at end of file diff --git a/platformio/ide/tpls/atom/.gitignore.tpl b/platformio/ide/tpls/atom/.gitignore.tpl new file mode 100644 index 00000000..9984610a --- /dev/null +++ b/platformio/ide/tpls/atom/.gitignore.tpl @@ -0,0 +1,2 @@ +.pioenvs +.clang_complete diff --git a/platformio/ide/tpls/clion/.idea/workspace.xml.tpl b/platformio/ide/tpls/clion/.idea/workspace.xml.tpl index d76300c8..582177fb 100644 --- a/platformio/ide/tpls/clion/.idea/workspace.xml.tpl +++ b/platformio/ide/tpls/clion/.idea/workspace.xml.tpl @@ -2,13 +2,15 @@ - - - + + + + + @@ -187,11 +189,26 @@ - + + + + + + + + + + + + + - + + + + diff --git a/platformio/ide/tpls/clion/CMakeLists.txt.tpl b/platformio/ide/tpls/clion/CMakeLists.txt.tpl index ddcb7eb8..4ad26cb6 100644 --- a/platformio/ide/tpls/clion/CMakeLists.txt.tpl +++ b/platformio/ide/tpls/clion/CMakeLists.txt.tpl @@ -38,8 +38,32 @@ add_custom_target( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -% if main_src_file: -add_executable({{project_name}} {{main_src_file.replace("\\", "/")}}) +add_custom_target( + PLATFORMIO_PROGRAM ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion run --target program + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + PLATFORMIO_UPLOADFS ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion run --target uploadfs + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + PLATFORMIO_UPDATE_ALL ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion update + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +% if src_files and any([f.endswith((".c", ".cpp")) for f in src_files]): +add_executable({{project_name}} +% for f in src_files: +% if f.endswith((".c", ".cpp")): + {{f.replace("\\", "/")}} +% end +% end +) % else: # # To enable code auto-completion, please specify path diff --git a/platformio/ide/tpls/eclipse/.cproject.tpl b/platformio/ide/tpls/eclipse/.cproject.tpl index 28d12111..b21e2aa5 100644 --- a/platformio/ide/tpls/eclipse/.cproject.tpl +++ b/platformio/ide/tpls/eclipse/.cproject.tpl @@ -19,7 +19,7 @@ - + + + + + platformio + -f -c eclipse + run -t program + true + true + false + + + platformio + -f -c eclipse + run -t uploadfs + true + true + false + + + platformio + -f -c eclipse + run + true + true + false + + + platformio + -f -c eclipse + run -t upload + true + true + false + + + platformio + -f -c eclipse + run -t clean + true + true + false + + + platformio + -f -c eclipse + update + true + true + false + + + diff --git a/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl b/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl index 3da3c37d..53c9c72f 100644 --- a/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl +++ b/platformio/ide/tpls/eclipse/.settings/language.settings.xml.tpl @@ -6,9 +6,9 @@ % if "windows" in systype: - + % else: - + % end diff --git a/platformio/ide/tpls/emacs/.clang_complete.tpl b/platformio/ide/tpls/emacs/.clang_complete.tpl new file mode 100644 index 00000000..8b8555ef --- /dev/null +++ b/platformio/ide/tpls/emacs/.clang_complete.tpl @@ -0,0 +1,6 @@ +% for include in includes: +-I{{include}} +% end +% for define in defines: +-D{{define}} +% end \ No newline at end of file diff --git a/platformio/ide/tpls/emacs/.gitignore.tpl b/platformio/ide/tpls/emacs/.gitignore.tpl index e0b8fd9d..9984610a 100644 --- a/platformio/ide/tpls/emacs/.gitignore.tpl +++ b/platformio/ide/tpls/emacs/.gitignore.tpl @@ -1,6 +1,2 @@ .pioenvs -CMakeCache.txt -CMakeFiles/ -MakeFile -cmake_install.cmake -compile_commands.json \ No newline at end of file +.clang_complete diff --git a/platformio/ide/tpls/emacs/CMakeLists.txt.tpl b/platformio/ide/tpls/emacs/CMakeLists.txt.tpl deleted file mode 100644 index 7083f466..00000000 --- a/platformio/ide/tpls/emacs/CMakeLists.txt.tpl +++ /dev/null @@ -1,56 +0,0 @@ -cmake_minimum_required(VERSION 3.2) -project({{project_name}}) - -set(ENV{PATH} "{{env_path}}") -set(PLATFORMIO_CMD "{{platformio_path}}") -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - -% 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 -% end - -% for define in defines: -add_definitions(-D{{!define}}) -% end - -add_custom_target( - platformio_build ALL - COMMAND ${PLATFORMIO_CMD} -f -c emacs run - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_custom_target( - platformio_upload ALL - COMMAND ${PLATFORMIO_CMD} -f -c emacs run --target upload - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_custom_target( - platformio_clean ALL - COMMAND ${PLATFORMIO_CMD} -f -c emacs run --target clean - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_custom_target( - platformio_update ALL - COMMAND ${PLATFORMIO_CMD} -f -c emacs update - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -% if main_src_file: -add_executable({{project_name}} {{main_src_file.replace("\\", "/")}}) -% else: -# -# 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) -% end diff --git a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl index 88712354..5db5397f 100644 --- a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl +++ b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl @@ -11,6 +11,15 @@ "name": "PlatformIO", "variants": [ + { + "cmd": + [ + "platformio", + "-f", "-c", "sublimetext", + "run" + ], + "name": "Build" + }, { "cmd": [ @@ -32,6 +41,37 @@ "upload" ], "name": "Upload" + }, + { + "cmd": + [ + "platformio", + "-f", "-c", "sublimetext", + "run", + "--target", + "program" + ], + "name": "Upload using Programmer" + }, + { + "cmd": + [ + "platformio", + "-f", "-c", "sublimetext", + "run", + "--target", + "uploadfs" + ], + "name": "Upload SPIFFS image" + }, + { + "cmd": + [ + "platformio", + "-f", "-c", "sublimetext", + "update" + ], + "name": "Update platforms and libraries" } ], "working_dir": "${project_path:${folder}}", diff --git a/platformio/libmanager.py b/platformio/libmanager.py index cd0b57fa..74e68c8f 100644 --- a/platformio/libmanager.py +++ b/platformio/libmanager.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 6209e19c..f7e5a51f 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/pkgmanager.py b/platformio/pkgmanager.py index 1678e9a2..c421a443 100644 --- a/platformio/pkgmanager.py +++ b/platformio/pkgmanager.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/__init__.py b/platformio/platforms/__init__.py index cbfe6a0f..0c05c3b0 100644 --- a/platformio/platforms/__init__.py +++ b/platformio/platforms/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/atmelavr.py b/platformio/platforms/atmelavr.py index de18ad20..cb6e5a61 100644 --- a/platformio/platforms/atmelavr.py +++ b/platformio/platforms/atmelavr.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/atmelsam.py b/platformio/platforms/atmelsam.py index e1a84170..a5b64beb 100644 --- a/platformio/platforms/atmelsam.py +++ b/platformio/platforms/atmelsam.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,6 +42,10 @@ class AtmelsamPlatform(BasePlatform): "tool-bossac": { "alias": "uploader" + }, + + "tool-openocd": { + "alias": "uploader" } } diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index bd7b4c10..5a4718b7 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/espressif.py b/platformio/platforms/espressif.py index abd93dcb..2381c724 100644 --- a/platformio/platforms/espressif.py +++ b/platformio/platforms/espressif.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/freescalekinetis.py b/platformio/platforms/freescalekinetis.py index 2420309f..47e387d0 100644 --- a/platformio/platforms/freescalekinetis.py +++ b/platformio/platforms/freescalekinetis.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/linux_arm.py b/platformio/platforms/linux_arm.py index 95775976..3517441a 100644 --- a/platformio/platforms/linux_arm.py +++ b/platformio/platforms/linux_arm.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/linux_i686.py b/platformio/platforms/linux_i686.py index 4598fc66..0d889e67 100644 --- a/platformio/platforms/linux_i686.py +++ b/platformio/platforms/linux_i686.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/linux_x86_64.py b/platformio/platforms/linux_x86_64.py index 9cbe74e8..876ac562 100644 --- a/platformio/platforms/linux_x86_64.py +++ b/platformio/platforms/linux_x86_64.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/native.py b/platformio/platforms/native.py index b6c2f375..0e61965c 100644 --- a/platformio/platforms/native.py +++ b/platformio/platforms/native.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/nordicnrf51.py b/platformio/platforms/nordicnrf51.py index 3f9fbcf3..b68e240b 100644 --- a/platformio/platforms/nordicnrf51.py +++ b/platformio/platforms/nordicnrf51.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/nxplpc.py b/platformio/platforms/nxplpc.py index d924ba76..d359b117 100644 --- a/platformio/platforms/nxplpc.py +++ b/platformio/platforms/nxplpc.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/siliconlabsefm32.py b/platformio/platforms/siliconlabsefm32.py index 889c650f..8aa642ea 100644 --- a/platformio/platforms/siliconlabsefm32.py +++ b/platformio/platforms/siliconlabsefm32.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/ststm32.py b/platformio/platforms/ststm32.py index 92f4c49a..10203ec4 100644 --- a/platformio/platforms/ststm32.py +++ b/platformio/platforms/ststm32.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/teensy.py b/platformio/platforms/teensy.py index 0dcd6351..3678ff15 100644 --- a/platformio/platforms/teensy.py +++ b/platformio/platforms/teensy.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/timsp430.py b/platformio/platforms/timsp430.py index ca78e2ca..e3ce6ee4 100644 --- a/platformio/platforms/timsp430.py +++ b/platformio/platforms/timsp430.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/titiva.py b/platformio/platforms/titiva.py index 2db28880..fbe4981e 100644 --- a/platformio/platforms/titiva.py +++ b/platformio/platforms/titiva.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/platforms/windows_x86.py b/platformio/platforms/windows_x86.py index 0c82db03..260e5ac6 100644 --- a/platformio/platforms/windows_x86.py +++ b/platformio/platforms/windows_x86.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/telemetry.py b/platformio/telemetry.py index e2a3891e..4ab25564 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/unpacker.py b/platformio/unpacker.py index 3cd15903..f4ef32db 100644 --- a/platformio/unpacker.py +++ b/platformio/unpacker.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/platformio/util.py b/platformio/util.py index 8a8bce42..30ba686b 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/99-platformio-udev.rules b/scripts/99-platformio-udev.rules index 0bd48336..fe59cb18 100644 --- a/scripts/99-platformio-udev.rules +++ b/scripts/99-platformio-udev.rules @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/docspregen.py b/scripts/docspregen.py index eeac5aab..176e3308 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -121,7 +121,7 @@ def generate_platform(name): print "Processing platform: %s" % name lines = [] - lines.append(""".. Copyright 2014-2015 Ivan Kravets + lines.append(""".. Copyright 2014-2016 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 @@ -228,7 +228,7 @@ def generate_framework(type_, data): print "Processing framework: %s" % type_ lines = [] - lines.append(""".. Copyright 2014-2015 Ivan Kravets + lines.append(""".. Copyright 2014-2016 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 diff --git a/scripts/fixsymlink.py b/scripts/fixsymlink.py index 4b1a2d2d..d7d97f37 100644 --- a/scripts/fixsymlink.py +++ b/scripts/fixsymlink.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/get-platformio.py b/scripts/get-platformio.py index 9e81692b..75453e56 100644 --- a/scripts/get-platformio.py +++ b/scripts/get-platformio.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -87,7 +87,7 @@ def exec_command(*args, **kwargs): def print_exec_result(result): if result['returncode'] == 0: - print (result['out']) + print(result['out']) else: raise Exception("\n".join([result['out'], result['err']])) @@ -142,14 +142,14 @@ def main(): for s in steps: if is_error: break - print ("\n==> %s ..." % s[0]) + print("\n==> %s ..." % s[0]) try: s[1]() - print ("[SUCCESS]") + print("[SUCCESS]") except Exception, e: is_error = True - print (str(e)) - print ("[FAILURE]") + print(str(e)) + print("[FAILURE]") permission_errors = ( "permission denied", @@ -169,13 +169,13 @@ https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platf """) if is_error: - print ("The installation process has been FAILED!\n" - "Please report about this problem here\n" - "< https://github.com/platformio/platformio/issues >") + print("The installation process has been FAILED!\n" + "Please report about this problem here\n" + "< https://github.com/platformio/platformio/issues >") return else: - print ("\n ==> Installation process has been " - "successfully FINISHED! <==\n") + print("\n ==> Installation process has been " + "successfully FINISHED! <==\n") try: print_exec_result(exec_command("platformio")) diff --git a/scripts/mbed_to_package.py b/scripts/mbed_to_package.py index 891fe153..fcf5581c 100644 --- a/scripts/mbed_to_package.py +++ b/scripts/mbed_to_package.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index 1849810b..6b4951ba 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,13 +24,12 @@ install_requires = [ "click>=3.2,<6", "lockfile>=0.9.1,<0.13", "requests>=2.4.0,<3", - "colorama" + "colorama", + "pyserial<4" ] if sys.version_info < (2, 7, 0): - install_requires.append("pyserial<3") -else: - install_requires.append("pyserial<4") + install_requires[-1] = "pyserial<3" setup( name=__title__, diff --git a/tests/commands/test_boards.py b/tests/commands/test_boards.py index a49768b3..f137096c 100644 --- a/tests/commands/test_boards.py +++ b/tests/commands/test_boards.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,12 +13,9 @@ # limitations under the License. import json -from os.path import isfile, join from platformio import util from platformio.commands.boards import cli as cmd_boards -from platformio.commands.platforms import \ - platforms_install as cmd_platforms_install from platformio.commands.platforms import \ platforms_search as cmd_platforms_search @@ -52,21 +49,3 @@ def test_board_options(platformio_setup, clirunner, validate_cliresult): for _, opts in util.get_boards().iteritems(): assert required_opts.issubset(set(opts)) assert opts['platform'] in platforms - - -def test_board_ldscripts(platformio_setup, clirunner, validate_cliresult): - result = clirunner.invoke( - cmd_platforms_install, [ - "ststm32", - "--skip-default-package", - "--with-package=ldscripts" - ]) - validate_cliresult(result) - ldscripts_path = join(util.get_home_dir(), "packages", "ldscripts") - for type_, opts in util.get_boards().iteritems(): - if opts['build'].get("ldscript"): - frameworks = opts['frameworks'] - if (any(fw in frameworks for fw in ["libopencm3", "mbed"]) or - type_ in ("rfduino", )): - 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 8812876f..93b47053 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/commands/test_lib.py b/tests/commands/test_lib.py index 17395049..e749a68c 100644 --- a/tests/commands/test_lib.py +++ b/tests/commands/test_lib.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/commands/test_platforms.py b/tests/commands/test_platforms.py index 5e308e48..0d0251d1 100644 --- a/tests/commands/test_platforms.py +++ b/tests/commands/test_platforms.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/commands/test_settings.py b/tests/commands/test_settings.py index 312b0e80..d74c3ad8 100644 --- a/tests/commands/test_settings.py +++ b/tests/commands/test_settings.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/conftest.py b/tests/conftest.py index 08ad1520..f4cdc110 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/test_examples.py b/tests/test_examples.py index 0089c27f..f953feab 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/test_pkgmanifest.py b/tests/test_pkgmanifest.py index 3e5965ae..d9ed89aa 100644 --- a/tests/test_pkgmanifest.py +++ b/tests/test_pkgmanifest.py @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tox.ini b/tox.ini index 1fb6216e..7b32c481 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,4 @@ -# Copyright 2014-2015 Ivan Kravets +# Copyright 2014-2016 Ivan Kravets # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.