Merge branch 'release/v3.0.0'

This commit is contained in:
Ivan Kravets
2016-09-07 20:50:46 +03:00
263 changed files with 9398 additions and 15147 deletions

View File

@ -1,4 +1,4 @@
# Copyright 2014-2016 Ivan Kravets <me@ikravets.com> # Copyright 2014-present PlatformIO <contact@platformio.org>
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -11,3 +11,16 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
[run]
omit =
platformio/builder/*
source = platformio
[report]
# Regexes for lines to exclude from consideration
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError

View File

@ -4,14 +4,17 @@ What kind of issue is this?
something, or to understand why something isn't working the way you expect it to, use something, or to understand why something isn't working the way you expect it to, use
our Community Forums https://community.platformio.org our Community Forums https://community.platformio.org
- [ ] PlatformIO IDE. All issues related to PlatformIO IDE should be reported to appropriate repository
https://github.com/platformio/platformio-atom-ide/issues
- [ ] Development Platform. All issues related to Development Platform should be reported to appropriate repository. Search it using link below
https://github.com/platformio?query=platform-
- [ ] Feature Request. Start by telling us what problem youre trying to solve. Often a solution - [ ] Feature Request. Start by telling us what problem youre trying to solve. Often a solution
already exists! Dont send pull requests to implement new features without first getting our already exists! Dont send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small. support. Sometimes we leave features out on purpose to keep the project small.
- [ ] PlatformIO IDE. All issues related to PlatformIO IDE should be reported to appropriate repository - [ ] PlatformIO Core. If youve found a bug, please provide an information below.
https://github.com/platformio/platformio-atom-ide/issues
- [ ] Bug report. If youve found a bug, please provide information below.
*You can erase any parts of this template not applicable to your Issue.* *You can erase any parts of this template not applicable to your Issue.*

3
.gitignore vendored
View File

@ -6,3 +6,6 @@ docs/_build
dist dist
build build
.cache .cache
coverage.xml
.coverage
htmlcov

View File

@ -1,3 +1,3 @@
[settings] [settings]
line_length=79 line_length=79
known_third_party=bottle,click,lockfile,pytest,requests,serial,SCons known_third_party=bottle,click,lockfile,pytest,requests,semantic_version,serial,SCons

View File

@ -20,4 +20,4 @@ confidence=
# --disable=W" # --disable=W"
# disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating # disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating
disable=locally-disabled,missing-docstring,invalid-name,too-few-public-methods,redefined-variable-type,import-error,similarities,unsupported-membership-test,unsubscriptable-object,ungrouped-imports disable=locally-disabled,missing-docstring,invalid-name,too-few-public-methods,redefined-variable-type,import-error,similarities,unsupported-membership-test,unsubscriptable-object,ungrouped-imports,cyclic-import

3
.style.yapf Normal file
View File

@ -0,0 +1,3 @@
[style]
blank_line_before_nested_class_or_def = true
allow_multiline_lambdas = true

View File

@ -1,23 +1,42 @@
language: python language: python
python:
- "2.7"
env: matrix:
- TOX_ENV=docs include:
- TOX_ENV=lint - os: linux
- TOX_ENV=py26 sudo: false
- TOX_ENV=py27 python: 2.7
env: TOX_ENV=docs
- os: linux
sudo: false
python: 2.7
env: TOX_ENV=lint
- os: linux
sudo: required
python: 2.7
env: TOX_ENV=py27
- os: osx
language: generic
env: TOX_ENV=py27
install: install:
- git submodule update --init --recursive - git submodule update --init --recursive
- pip install -U pip setuptools tox - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip install -U tox; else pip install -U tox; fi
- sudo apt-get install -qq lib32z1 lib32ncurses5 lib32bz2-1.0 # temporarily
# temporary hook to fix issue with gcc-pic32
- if [[ "$TOX_ENV" == "py27" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq lib32z1 lib32ncurses5 lib32bz2-1.0; fi
script: script:
- tox -e $TOX_ENV - tox -e $TOX_ENV
after_success:
- if [[ "$TOX_ENV" == "py27" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tox -e coverage; fi
- if [[ "$TOX_ENV" == "py27" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash <(curl -s https://codecov.io/bash); fi
notifications: notifications:
email: false
slack: slack:
secure: ksQmXOP5NVsf8IgoDuxD68Q/YNwDpZuwq0V29h2dxYCr38oYdAkq/Os4LSCs0X6P0cQFf6nC1hM/d+cAvU+SmzcHGxEceHNEGCg3/TAj+68KIwooPU93Lfq1zwdfteZWxANjKlCQy4+wZliHLhL8fvCYgfJww/6qKmqSYleBNM= rooms:
secure: JD6VGfN4+SLU2CwDdiIOr1VgwD+zbYUCE/srwyGuHavnjIkPItkl6T6Bn8Y4VrU6ysbuKotfdV2TAJJ82ivFbY8BvZBc7FBcYp/AGQ4FaCCV5ySv8RDAcQgdE12oaGzMdODiLqsB85f65zOlAFa+htaXyEiRTcotn6Y2hupatrI=
on_failure: always on_failure: always
on_success: change on_success: change

View File

@ -1,6 +1,115 @@
Release Notes Release Notes
============= =============
PlatformIO 3.0
--------------
3.0.0 (2016-09-07)
~~~~~~~~~~~~~~~~~~
* `PlatformIO Plus <https://pioplus.com>`__
+ Local and Embedded `Unit Testing <http://docs.platformio.org/en/latest/unit_testing.html>`__
(`issue #408 <https://github.com/platformio/platformio/issues/408>`_,
`issue #519 <https://github.com/platformio/platformio/issues/519>`_)
* Decentralized Development Platforms
+ Development platform manifest "platform.json" and
`open source development platforms <https://github.com/platformio?utf8=✓&query=platform->`__
+ `Semantic Versioning <http://semver.org/>`__ for platform commands,
development platforms and dependent packages
+ Custom package repositories
+ External embedded board configuration files, isolated build scripts
(`issue #479 <https://github.com/platformio/platformio/issues/479>`_)
+ Embedded Board compatibility with more than one development platform
(`issue #456 <https://github.com/platformio/platformio/issues/456>`_)
* Library Manager 3.0
+ Project dependencies per build environment using `lib_deps <http://docs.platformio.org/en/latest/projectconf.html#lib-deps>`__ option
(`issue #413 <https://github.com/platformio/platformio/issues/413>`_)
+ `Semantic Versioning <http://semver.org/>`__ for library commands and
dependencies
(`issue #410 <https://github.com/platformio/platformio/issues/410>`_)
+ Multiple library storages: Project's Local, PlatformIO's Global or Custom
(`issue #475 <https://github.com/platformio/platformio/issues/475>`_)
+ Install library by name
(`issue #414 <https://github.com/platformio/platformio/issues/414>`_)
+ Depend on a library using VCS URL (GitHub, Git, ARM mbed code registry, Hg, SVN)
(`issue #498 <https://github.com/platformio/platformio/issues/498>`_)
+ Strict search for library dependencies
(`issue #588 <https://github.com/platformio/platformio/issues/588>`_)
+ Allowed ``library.json`` to specify sources other than PlatformIO's Repository
(`issue #461 <https://github.com/platformio/platformio/issues/461>`_)
+ Search libraries by headers/includes with ``platformio lib search --header`` option
* New Intelligent Library Build System
+ `Library Dependency Finder <http://docs.platformio.org/en/latest/faq.html#how-works-library-dependency-finder-ldf>`__
that interprets C/C++ Preprocessor conditional macros with deep search behavior
+ Check library compatibility with project environment before building
(`issue #415 <https://github.com/platformio/platformio/issues/415>`_)
+ Control Library Dependency Finder for compatibility using
`lib_compat_mode <http://docs.platformio.org/en/latest/projectconf.html#lib-compat-mode>`__
option
+ Custom library storages/directories with
`lib_extra_dirs <http://docs.platformio.org/en/latest/projectconf.html#lib-extra-dirs>`__ option
(`issue #537 <https://github.com/platformio/platformio/issues/537>`_)
+ Handle extra build flags, source filters and build script from
`library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`__
(`issue #289 <https://github.com/platformio/platformio/issues/289>`_)
+ Allowed to disable library archiving (``*.ar``)
(`issue #719 <https://github.com/platformio/platformio/issues/719>`_)
+ Show detailed build information about dependent libraries
(`issue #617 <https://github.com/platformio/platformio/issues/617>`_)
+ Support for the 3rd party manifests (Arduino IDE "library.properties"
and ARM mbed "module.json")
* Removed ``enable_prompts`` setting. Now, all PlatformIO CLI is non-blocking!
* Switched to SSL PlatformIO API
* Renamed ``platformio serialports`` command to ``platformio device``
* Build System: Attach custom Before/Pre and After/Post actions for targets
(`issue #542 <https://github.com/platformio/platformio/issues/542>`_)
* Allowed passing custom project configuration options to ``platformio ci``
and ``platformio init`` commands using ``-O, --project-option``.
* Print human-readable information when processing environments without
``-v, --verbose`` option
(`issue #721 <https://github.com/platformio/platformio/issues/721>`_)
* Improved INO to CPP converter
(`issue #659 <https://github.com/platformio/platformio/issues/659>`_,
`issue #765 <https://github.com/platformio/platformio/issues/765>`_)
* Added ``license`` field to `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`__
(`issue #522 <https://github.com/platformio/platformio/issues/522>`_)
* Warn about unknown options in project configuration file ``platformio.ini``
(`issue #740 <https://github.com/platformio/platformio/issues/740>`_)
* Fixed wrong line number for INO file when ``#warning`` directive is used
(`issue #742 <https://github.com/platformio/platformio/issues/742>`_)
* Stopped supporting Python 2.6
------
* Development platform `Atmel SAM <https://github.com/platformio/platform-atmelsam>`__
+ Fixed missing analog ports for Adafruit Feather M0 Bluefruit
(`issue #2 <https://github.com/platformio/platform-atmelsam/issues/2>`__)
* Development platform `Nordic nRF51 <https://github.com/platformio/platform-nordicnrf51>`__
+ Added support for BBC micro:bit board
(`issue #709 <https://github.com/platformio/platformio/issues/709>`_)
* Development platform `ST STM32 <https://github.com/platformio/platform-ststm32>`__
+ Added support for BluePill F103C8 board
(`pull #2 <https://github.com/platformio/platform-ststm32/pull/2>`__)
* Development platform `Teensy <https://github.com/platformio/platform-teensy>`__
+ Updated Arduino Framework to v1.29
(`issue #2 <https://github.com/platformio/platform-teensy/issues/2>`__)
PlatformIO 2.0 PlatformIO 2.0
-------------- --------------
@ -1029,8 +1138,7 @@ PlatformIO 0.0
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
* Replaced "dark blue" by "cyan" colour for the texts (`issue #33 <https://github.com/platformio/platformio/issues/33>`_) * Replaced "dark blue" by "cyan" colour for the texts (`issue #33 <https://github.com/platformio/platformio/issues/33>`_)
* Added new setting `enable_prompts <http://docs.platformio.org/en/latest/userguide/cmd_settings.html>`_ * Added new setting ``enable_prompts`` and allowed to disable all *PlatformIO* prompts (useful for cloud compilers)
and allowed to disable all *PlatformIO* prompts (useful for cloud compilers)
(`issue #34 <https://github.com/platformio/platformio/issues/34>`_) (`issue #34 <https://github.com/platformio/platformio/issues/34>`_)
* Fixed compilation bug on *Windows* with installed *MSVC* (`issue #18 <https://github.com/platformio/platformio/issues/18>`_) * Fixed compilation bug on *Windows* with installed *MSVC* (`issue #18 <https://github.com/platformio/platformio/issues/18>`_)

23
Makefile Normal file
View File

@ -0,0 +1,23 @@
lint:
pylint --rcfile=./.pylintrc ./platformio
isort:
isort -rc ./platformio
isort -rc ./tests
yapf:
yapf --recursive --in-place platformio/
before-commit: isort yapf lint
clean-docs:
rm -rf docs/_build
clean: clean-docs
find . -name \*.pyc -delete
find . -name __pycache__ -delete
rm -rf .cache
rm -rf build
rm -rf htmlcov
rm -f .coverage

View File

@ -7,6 +7,8 @@ PlatformIO
.. image:: https://ci.appveyor.com/api/projects/status/dku0h2rutfj0ctls/branch/develop?svg=true .. image:: https://ci.appveyor.com/api/projects/status/dku0h2rutfj0ctls/branch/develop?svg=true
:target: https://ci.appveyor.com/project/ivankravets/platformio :target: https://ci.appveyor.com/project/ivankravets/platformio
:alt: AppVeyor.CI Build Status :alt: AppVeyor.CI Build Status
.. image:: https://codecov.io/gh/platformio/platformio/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/platformio/platformio
.. image:: https://requires.io/github/platformio/platformio/requirements.svg?branch=develop .. image:: https://requires.io/github/platformio/platformio/requirements.svg?branch=develop
:target: https://requires.io/github/platformio/platformio/requirements/?branch=develop :target: https://requires.io/github/platformio/platformio/requirements/?branch=develop
:alt: Requirements Status :alt: Requirements Status
@ -19,29 +21,30 @@ PlatformIO
.. image:: https://img.shields.io/community/PlatformIO.png .. image:: https://img.shields.io/community/PlatformIO.png
:alt: Community Forums :alt: Community Forums
:target: https://community.platformio.org :target: https://community.platformio.org
.. image:: https://img.shields.io/donate/PlatformIO.png?color=yellow .. image:: https://img.shields.io/PlatformIO/Plus.png?color=orange
:alt: Donate for PlatformIO.Org :alt: PlatformIO Plus: Professional solutions for an awesome open source PlatformIO ecosystem
:target: http://platformio.org/donate :target: https://pioplus.com
**Quick Links:** `Home Page <http://platformio.org>`_ |
`Home <http://platformio.org>`_ | `PlatformIO Plus <https://pioplus.com>`_ |
`IDE <http://platformio.org/platformio-ide>`_ | `PlatformIO IDE <http://platformio.org/platformio-ide>`_ |
`Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_ | `Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_ |
`Docs <http://docs.platformio.org>`_ | `Docs <http://docs.platformio.org>`_ |
`Twitter <https://twitter.com/PlatformIO_Org>`_ | `Donate <http://platformio.org/donate>`_ |
`Contact Us <http://platformio.org/contact>`_
**Social:** `Twitter <https://twitter.com/PlatformIO_Org>`_ |
`Facebook <https://www.facebook.com/platformio>`_ | `Facebook <https://www.facebook.com/platformio>`_ |
`Hackaday <https://hackaday.io/project/7980-platformio>`_ | `Hackaday <https://hackaday.io/project/7980-platformio>`_ |
`Bintray <https://bintray.com/platformio>`_ | `Bintray <https://bintray.com/platformio>`_ |
`Community <https://community.platformio.org>`_ | `Community <https://community.platformio.org>`_ |
`Donate <http://platformio.org/donate>`_ |
`Contact Us <http://platformio.org/contact>`_
.. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-logo.png .. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-logo.png
:target: http://platformio.org :target: http://platformio.org
`PlatformIO <http://platformio.org>`_ is an open source ecosystem for IoT `PlatformIO <http://platformio.org>`_ is an open source ecosystem for IoT
development. Cross-platform build system and library manager. Continuous and development. Cross-platform build system and library manager. Continuous and
IDE integration. Arduino and MBED compatible. Ready for Cloud compiling. IDE integration. Arduino, ESP8266 and ARM mbed compatible
* **PlatformIO IDE** - The next-generation integrated development environment for IoT. * **PlatformIO IDE** - The next-generation integrated development environment for IoT.
C/C++ Intelligent Code Completion and Smart Code Linter for the super-fast coding. C/C++ Intelligent Code Completion and Smart Code Linter for the super-fast coding.
@ -66,19 +69,20 @@ TI MSP430 & Tiva, Teensy, Arduino, mbed, libOpenCM3, etc.*
.. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-demo-wiring.gif .. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-demo-wiring.gif
:target: http://platformio.org :target: http://platformio.org
* `PlatformIO Plus and professional solutions <https://pioplus.com>`_
* `PlatformIO IDE <http://platformio.org/platformio-ide>`_ * `PlatformIO IDE <http://platformio.org/platformio-ide>`_
* `Get Started <http://platformio.org/get-started>`_ * `Get Started <http://platformio.org/get-started>`_
* `Web 2.0 Library Search <http://platformio.org/lib>`_ * `Library Search and Registry <http://platformio.org/lib>`_
* `Development Platforms <http://platformio.org/platforms>`_ * `Development Platforms <http://platformio.org/platforms>`_
* `Frameworks <http://platformio.org/frameworks>`_ * `Frameworks <http://platformio.org/frameworks>`_
* `Embedded Boards Explorer <http://platformio.org/boards>`_ * `Embedded Boards Explorer <http://platformio.org/boards>`_
* `Library Manager <http://docs.platformio.org/en/latest/librarymanager/index.html>`_ * `Library Manager <http://docs.platformio.org/en/stable/librarymanager/index.html>`_
* `User Guide <http://docs.platformio.org/en/latest/userguide/index.html>`_ * `User Guide <http://docs.platformio.org/en/stable/userguide/index.html>`_
* `Continuous Integration <http://docs.platformio.org/en/latest/ci/index.html>`_ * `Continuous Integration <http://docs.platformio.org/en/stable/ci/index.html>`_
* `IDE Integration <http://docs.platformio.org/en/latest/ide.html>`_ * `IDE Integration <http://docs.platformio.org/en/stable/ide.html>`_
* `Articles about us <http://docs.platformio.org/en/latest/articles.html>`_ * `Articles about us <http://docs.platformio.org/en/stable/articles.html>`_
* `FAQ <http://docs.platformio.org/en/latest/faq.html>`_ * `FAQ <http://docs.platformio.org/en/stable/faq.html>`_
* `Release Notes <http://docs.platformio.org/en/latest/history.html>`_ * `Release Notes <http://docs.platformio.org/en/stable/history.html>`_
Use whenever. *Run everywhere.* Use whenever. *Run everywhere.*
------------------------------- -------------------------------
@ -95,12 +99,12 @@ Embedded Development. *Easier Than Ever.*
settings for most popular `Embedded Boards <http://platformio.org/boards>`_. settings for most popular `Embedded Boards <http://platformio.org/boards>`_.
* Colourful `command-line output <https://raw.githubusercontent.com/platformio/platformio/develop/examples/platformio-examples.png>`_ * Colourful `command-line output <https://raw.githubusercontent.com/platformio/platformio/develop/examples/platformio-examples.png>`_
* `IDE Integration <http://docs.platformio.org/en/latest/ide.html>`_ with * `IDE Integration <http://docs.platformio.org/en/stable/ide.html>`_ with
*Arduino, Atom, Eclipse, Emacs, Energia, Qt Creator, Sublime Text, Vim, Visual Studio* *Arduino, Atom, Eclipse, Emacs, Energia, Qt Creator, Sublime Text, Vim, Visual Studio*
* Cloud compiling and `Continuous Integration <http://docs.platformio.org/en/latest/ci/index.html>`_ * Cloud compiling and `Continuous Integration <http://docs.platformio.org/en/stable/ci/index.html>`_
with *AppVeyor, Circle CI, Drone, Shippable, Travis CI* with *AppVeyor, Circle CI, Drone, Shippable, Travis CI*
* Built-in `Serial Port Monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ and configurable * Built-in `Serial Port Monitor <http://docs.platformio.org/en/stable/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ and configurable
`build -flags/-options <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`_ `build -flags/-options <http://docs.platformio.org/en/stable/projectconf.html#build-flags>`_
* Automatic **firmware uploading** * Automatic **firmware uploading**
* Pre-built tool chains, frameworks for the popular `Hardware Platforms <http://platformio.org/platforms>`_ * Pre-built tool chains, frameworks for the popular `Hardware Platforms <http://platformio.org/platforms>`_
@ -113,10 +117,10 @@ The Missing Library Manager. *It's here!*
*PlatformIO Library Manager* is the missing library manager for development *PlatformIO Library Manager* is the missing library manager for development
platforms which allows you to organize and have up-to-date external libraries. platforms which allows you to organize and have up-to-date external libraries.
* Friendly `Command-Line Interface <http://docs.platformio.org/en/latest/librarymanager/index.html>`_ * Friendly `Command-Line Interface <http://docs.platformio.org/en/stable/librarymanager/index.html>`_
* Modern `Web 2.0 Library Search <http://platformio.org/lib>`_ * Modern `Web 2.0 Library Search <http://platformio.org/lib>`_
* Open Source `Library Registry API <https://github.com/platformio/platformio-api>`_ * Open Source `Library Registry API <https://github.com/platformio/platformio-api>`_
* Library Crawler based on `library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`_ * Library Crawler based on `library.json <http://docs.platformio.org/en/stable/librarymanager/config.html>`_
specification specification
* Library **dependency management** * Library **dependency management**
* Automatic library updating * Automatic library updating
@ -135,7 +139,7 @@ cross-platform substitute for the classic *Make* utility.
* Reliable detection of *build changes* * Reliable detection of *build changes*
* Improved support for *parallel builds* * Improved support for *parallel builds*
* Ability to share *built files in a cache* * Ability to share *built files in a cache*
* Lookup for external libraries which are installed via `Library Manager <http://docs.platformio.org/en/latest/librarymanager/index.html>`_ * Lookup for external libraries which are installed via `Library Manager <http://docs.platformio.org/en/stable/librarymanager/index.html>`_
.. image:: https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-scons-builder.png .. image:: https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-scons-builder.png
:target: http://platformio.org :target: http://platformio.org
@ -145,9 +149,9 @@ Single source code. *Multiple platforms.*
----------------------------------------- -----------------------------------------
*PlatformIO* allows the developer to compile the same code with different *PlatformIO* allows the developer to compile the same code with different
development platforms using only *One Command* development platforms using only *One Command*
`platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`_. `platformio run <http://docs.platformio.org/en/stable/userguide/cmd_run.html>`_.
This happens due to This happens due to
`Project Configuration File (platformio.ini) <http://docs.platformio.org/en/latest/projectconf.html>`_ `Project Configuration File (platformio.ini) <http://docs.platformio.org/en/stable/projectconf.html>`_
where you can setup different environments with specific options (platform where you can setup different environments with specific options (platform
type, firmware uploading settings, pre-built framework, build flags and many type, firmware uploading settings, pre-built framework, build flags and many
more). more).
@ -180,7 +184,7 @@ Frameworks:
* `SPL <http://platformio.org/frameworks/spl>`_ * `SPL <http://platformio.org/frameworks/spl>`_
* `WiringPi <http://platformio.org/frameworks/wiringpi>`_ * `WiringPi <http://platformio.org/frameworks/wiringpi>`_
For further details, please refer to `What is PlatformIO? <http://docs.platformio.org/en/latest/faq.html#what-is-platformio>`_ For further details, please refer to `What is PlatformIO? <http://docs.platformio.org/en/stable/faq.html#what-is-platformio>`_
Contributing Contributing
------------ ------------
@ -190,7 +194,7 @@ See `contributing guidelines <https://github.com/platformio/platformio/blob/deve
License License
------- -------
Copyright 2014-2016 Ivan Kravets <me@ikravets.com> Copyright 2014-present PlatformIO <contact@platformio.org>
The PlatformIO is licensed under the permissive Apache 2.0 license, The PlatformIO is licensed under the permissive Apache 2.0 license,
so you can use it in both commercial and personal projects with confidence. so you can use it in both commercial and personal projects with confidence.

View File

@ -11,3 +11,11 @@ install:
test_script: test_script:
- cmd: tox - cmd: tox
notifications:
- provider: Slack
incoming_webhook:
secure: E9H0SU0Ju7WLDvgxsV8cs3J62T3nTTX7QkEjsczN0Sto/c9hWkVfhc5gGWUkxhlD975cokHByKGJIdwYwCewqOI+7BrcT8U+nlga4Uau7J8=
on_build_success: false
on_build_failure: true
on_build_status_changed: true

View File

@ -1,5 +1,5 @@
/** /**
* Copyright 2014-2016 Ivan Kravets <me@ikravets.com> * Copyright 2014-present PlatformIO <contact@platformio.org>
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -262,6 +262,12 @@ nav {
visibility: none; visibility: none;
} }
@media (min-width: 768px) {
.wy-side-scroll {
padding-bottom: 50px;
}
}
.navbar-header .navbar-brand { .navbar-header .navbar-brand {
color: #e0e0e0; color: #e0e0e0;
background: url("../_static/platformio-logo-xs.png") no-repeat; background: url("../_static/platformio-logo-xs.png") no-repeat;
@ -292,6 +298,16 @@ nav {
} }
} }
.navbar-inverse .navbar-nav > li.nav-pioplus > a,
.navbar-inverse .navbar-nav > li.nav-pioplus > a:visited
{
color: #ff6600;
}
.navbar-inverse .navbar-nav > li.nav-pioplus > a:hover {
color: #ff9900;
}
.top-banner { .top-banner {
display: block; display: block;
padding: 10px 20px; padding: 10px 20px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

View File

@ -27,7 +27,7 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li class="active"><a href="http://docs.platformio.org"><i class="fa fa-book fa-lg"></i>Docs</a></li> <li class="active"><a href="http://docs.platformio.org"><i class="fa fa-book fa-lg"></i>Docs</a></li>
<li><a href="https://community.platformio.org"><i class="fa fa-comments-o fa-lg"></i>Community</a></li> <li><a href="https://community.platformio.org"><i class="fa fa-comments-o fa-lg"></i>Community</a></li>
<li><a href="http://platformio.org/contact"><i class="fa fa-envelope fa-lg"></i>Contact</a></li> <li class="nav-pioplus"><a href="https://pioplus.com"><i class="fa fa-cubes fa-lg"></i>Plus</a></li>
</ul> </ul>
</div> </div>

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -18,11 +18,17 @@ Articles about us
If you've written article about PlatformIO and would like it listed on If you've written article about PlatformIO and would like it listed on
this page, `please edit this page <https://github.com/platformio/platformio/blob/develop/docs/articles.rst>`_. this page, `please edit this page <https://github.com/platformio/platformio/blob/develop/docs/articles.rst>`_.
Here are recent articles about PlatformIO: Here are recent articles/reviews about PlatformIO:
2016 2016
^^^^ ^^^^
* Sep 2, 2016 - **Tinkerman** `ESP8266: Optimizing files for SPIFFS with Gulp <http://tinkerman.cat/optimizing-files-for-spiffs-with-gulp/>`_
* Aug 28, 2016 - **Tom Parker** `Using the BBC micro:bit with PlatformIO <http://www.lshift.net/blog/2016/08/28/using-the-bbc-microbit-with-platformio/>`_
* Aug 24, 2016 - **Primal Cortex** `Cloud based continuous integration and delivery for IOT using PlatformIO <https://primalcortex.wordpress.com/2016/08/24/cloud-based-continuous-integration-and-delivery-for-iot-using-platformio/>`_
* Aug 18, 2016 - **Primal Cortex** - `Installing PlatformIO on Arch Linux <https://primalcortex.wordpress.com/2016/08/18/platformio/>`_
* Jul 26, 2016 - **Embedded Systems Laboratory** - `แนะนำการใช้งาน PlatformIO IDE สำหรับบอร์ด Arduino และ ESP8266 (Get started with PlatformIO IDE for Arduino board and ESP8266, Thai) <http://cpre.kmutnb.ac.th/esl/learning/index.php?article=intro_platformio-ide>`_
* Jul 15, 2016 - **Jaime** - `ESP8266 Mobile Rick Roll Captive Portal <https://hackaday.io/project/12709-esp8266-mobile-rick-roll-captive-portal>`_
* Jul 5, 2016 - **Ivan Kravets, Ph.D.** - `Explore the new development instruments for Arduino with PlatformIO ecosystem <http://www.slideshare.net/ivankravets/explore-the-new-development-instruments-for-arduino-with-platformio-ecosystem>`_ * Jul 5, 2016 - **Ivan Kravets, Ph.D.** - `Explore the new development instruments for Arduino with PlatformIO ecosystem <http://www.slideshare.net/ivankravets/explore-the-new-development-instruments-for-arduino-with-platformio-ecosystem>`_
* Jul 5, 2016 - **Belinda** - `Monte Bianco Arduino Developer Summit <http://www.arduino.org/blog/arduino-developer-summit>`_ * Jul 5, 2016 - **Belinda** - `Monte Bianco Arduino Developer Summit <http://www.arduino.org/blog/arduino-developer-summit>`_
* Jul 1, 2016 - **Tam Hanna** - `Mikrocontroller-Gipfel in den Alpen: Arduino Developer Summit, Tag eins (Microcontroller peaks in the Alps: Arduino Developer Summit, Day One, German) <http://www.heise.de/make/meldung/Mikrocontroller-Gipfel-in-den-Alpen-Arduino-Developer-Summit-Tag-eins-3252421.html>`_ * Jul 1, 2016 - **Tam Hanna** - `Mikrocontroller-Gipfel in den Alpen: Arduino Developer Summit, Tag eins (Microcontroller peaks in the Alps: Arduino Developer Summit, Day One, German) <http://www.heise.de/make/meldung/Mikrocontroller-Gipfel-in-den-Alpen-Arduino-Developer-Summit-Tag-eins-3252421.html>`_
@ -38,18 +44,18 @@ Here are recent articles about PlatformIO:
* May 16, 2016 - **Pedro Minatel** - `Controle remoto WiFi com ESP8266 (WiFi remote control using ESP8266, Portuguese) <http://pedrominatel.com.br/esp8266/controle-remoto-wifi-com-esp8266/>`_ * May 16, 2016 - **Pedro Minatel** - `Controle remoto WiFi com ESP8266 (WiFi remote control using ESP8266, Portuguese) <http://pedrominatel.com.br/esp8266/controle-remoto-wifi-com-esp8266/>`_
* May 11, 2016 - **Jo Vandeginste** - `Using PlatformIO to compile for Jeelabs' Jeenode Micro <http://jovandeginste.github.io/2016/05/11/using-platformio-to-compile-for-jeelabs-jeenode-micro.html>`_ * May 11, 2016 - **Jo Vandeginste** - `Using PlatformIO to compile for Jeelabs' Jeenode Micro <http://jovandeginste.github.io/2016/05/11/using-platformio-to-compile-for-jeelabs-jeenode-micro.html>`_
* May 08, 2016 - **Radoslaw Bob** - `Touch controlled buzzer (Nodemcu ESP8266) <https://gettoknowthebob.wordpress.com/2016/05/08/touch-controlled-buzzer-nodemcu-esp8266/>`_ * May 08, 2016 - **Radoslaw Bob** - `Touch controlled buzzer (Nodemcu ESP8266) <https://gettoknowthebob.wordpress.com/2016/05/08/touch-controlled-buzzer-nodemcu-esp8266/>`_
* May 06, 2016 - **Jean Roux** - `The IoT building blocks I use for my home-automation projects <http://iotplay.blogspot.fr/2016/05/the-components-i-use-for-my-projects.html/>`_ * May 06, 2016 - **Jean Roux** - `The IoT building blocks I use for my home-automation projects <http://iotplay.blogspot.com/2016/05/the-components-i-use-for-my-projects.html>`_
* May 05, 2016 - **Ivan Kravets, Ph.D. / Eclipse Virtual IoT Meetup** - `PlatformIO: a cross-platform IoT solution to build them all! <http://www.meetup.com/Virtual-IoT/events/229964142/>`_ * May 05, 2016 - **Ivan Kravets, Ph.D. / Eclipse Virtual IoT Meetup** - `PlatformIO: a cross-platform IoT solution to build them all! <http://www.meetup.com/Virtual-IoT/events/229964142/>`_
* May 01, 2016 - **Pedro Minatel** - `PlatformIO Uma alternativa ao Arduino IDE (PlatformIO - An alternative to the Arduino IDE, Portuguese) <http://pedrominatel.com.br/ferramentas/platformio-uma-alternativa-ao-arduino-ide/>`_ * May 01, 2016 - **Pedro Minatel** - `PlatformIO Uma alternativa ao Arduino IDE (PlatformIO - An alternative to the Arduino IDE, Portuguese) <http://pedrominatel.com.br/ferramentas/platformio-uma-alternativa-ao-arduino-ide/>`_
* Apr 23, 2016 - **Al Williams** - `Hackaday: Atomic Arduino (and Other) Development <http://hackaday.com/2016/04/23/atomic-arduino-and-other-development/>`_ * Apr 23, 2016 - **Al Williams** - `Hackaday: Atomic Arduino (and Other) Development <http://hackaday.com/2016/04/23/atomic-arduino-and-other-development/>`_
* Apr 16, 2016 - **Sathittham Sangthong** - `[PlatformIO] มาลองเล่น PlatformIO แทน Arduino IDE กัน (Let's play together with PlatformIO IDE [alternative to Arduino IDE], Thai) <http://www.sathittham.com/platformio/platformio-ide/>`_ * Apr 16, 2016 - **Sathittham Sangthong** - `[PlatformIO] มาลองเล่น PlatformIO แทน Arduino IDE กัน (Let's play together with PlatformIO IDE [alternative to Arduino IDE], Thai) <http://www.sathittham.com/platformio/platformio-ide/>`_
* Apr 15, 2016 - **Daniel Eichhorn** - `ESP8266: Offline Debugging with the Platformio Environment <http://blog.squix.ch/2016/04/esp8266-offline-debugging-with.html>`_ * Apr 15, 2016 - **Daniel Eichhorn** - `ESP8266: Offline Debugging with the Platformio Environment <http://blog.squix.org/2016/04/esp8266-offline-debugging-with.html>`_
* Apr 11, 2016 - **Matjaz Trcek** - `Top 5 Arduino integrated development environments <https://codeandunicorns.com/top-5-arduino-integrated-development-environments-ide/>`_ * Apr 11, 2016 - **Matjaz Trcek** - `Top 5 Arduino integrated development environments <https://codeandunicorns.com/top-5-arduino-integrated-development-environments-ide/>`_
* Apr 06, 2016 - **Aleks** - `PlatformIO ausprobiert (Tried PlatformIO, German) <http://5volt-junkie.net/platformio/>`_ * Apr 06, 2016 - **Aleks** - `PlatformIO ausprobiert (Tried PlatformIO, German) <http://5volt-junkie.net/platformio/>`_
* Apr 02, 2016 - **Diego Pinto** - `Você tem coragem de abandonar a IDE do Arduino? PlatformIO + Atom (Do you dare to leave the Arduino IDE? PlatformIO + Atom, Portuguese) <http://www.clubemaker.com.br/?rota=artigo/81>`_ * Apr 02, 2016 - **Diego Pinto** - `Você tem coragem de abandonar a IDE do Arduino? PlatformIO + Atom (Do you dare to leave the Arduino IDE? PlatformIO + Atom, Portuguese) <http://www.clubemaker.com.br/?rota=artigo/81>`_
* Mar 30, 2016 - **Brandon Cannaday** - `Getting Started with PlatformIO and ESP8266 NodeMcu <https://www.losant.com/blog/getting-started-with-platformio-esp8266-nodemcu>`_ * Mar 30, 2016 - **Brandon Cannaday** - `Getting Started with PlatformIO and ESP8266 NodeMcu <https://www.losant.com/blog/getting-started-with-platformio-esp8266-nodemcu>`_
* Mar 29, 2016 - **Pablo Peñalve** - `PlatformIO + Geany + Raspberry PI, Spanish <http://ret-catriel.blogspot.com/2016/03/framework-platformio-geany-raspberry-pi.html>`_ * Mar 29, 2016 - **Pablo Peñalve** - `PlatformIO + Geany + Raspberry PI, Spanish <http://ret-catriel.blogspot.com/2016/03/framework-platformio-geany-raspberry-pi.html>`_
* Mar 24, 2016 - **NAzT** - `PlatformIO และการปรับแต่ง เพื่อใช้สำหรับพัฒนา Arduino Library (PlatformIO and advanced development for Arduino Library, Thai) <https://cmmakerclub.com/tools-2/config-platformio-for-arduino-framework-developer/>`_ * Mar 24, 2016 - **NAzT** - `PlatformIO และการปรับแต่ง เพื่อใช้สำหรับพัฒนา Arduino Library (PlatformIO and advanced development for Arduino Library, Thai) <http://cmmakerclub.com/2016/03/tools-2/config-platformio-for-arduino-framework-developer/>`_
* Mar 16, 2016 - **Jakub Skořepa** - `Instalace PlatformIO (PlatformIO IDE Installation, Czech) <http://ok1kvk.cz/clanek/2016/instalace-platformio/>`_ * Mar 16, 2016 - **Jakub Skořepa** - `Instalace PlatformIO (PlatformIO IDE Installation, Czech) <http://ok1kvk.cz/clanek/2016/instalace-platformio/>`_
* Mar 12, 2016 - **Peter Marks** - `PlatformIO, the Arduino IDE for programmers <http://blog.marxy.org/2016/03/platformio-arduino-ide-for-programmers.html>`_ * Mar 12, 2016 - **Peter Marks** - `PlatformIO, the Arduino IDE for programmers <http://blog.marxy.org/2016/03/platformio-arduino-ide-for-programmers.html>`_
* Mar 12, 2016 - **Richard Arthurs** - `Getting Started With PlatformIO <http://richarthurs.com/2016/03/12/platformio-review-and-first-thoughts/>`_ * Mar 12, 2016 - **Richard Arthurs** - `Getting Started With PlatformIO <http://richarthurs.com/2016/03/12/platformio-review-and-first-thoughts/>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -56,7 +56,7 @@ Put ``appveyor.yml`` to the root directory of the GitHub repository.
- cmd: pip install -U platformio - cmd: pip install -U platformio
test_script: test_script:
- cmd: platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - cmd: platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>
For more details as for PlatformIO build process please look into :ref:`cmd_ci` For more details as for PlatformIO build process please look into :ref:`cmd_ci`

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -49,9 +49,9 @@ guide first.
test: test:
override: override:
- platformio ci path/to/test/file.c --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/file.c --board=<ID_1> --board=<ID_2> --board=<ID_N>
- platformio ci examples/file.ino --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci examples/file.ino --board=<ID_1> --board=<ID_2> --board=<ID_N>
- platformio ci path/to/test/directory --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/directory --board=<ID_1> --board=<ID_2> --board=<ID_N>
For more details as for PlatformIO build process please look into :ref:`cmd_ci`. For more details as for PlatformIO build process please look into :ref:`cmd_ci`.
@ -65,7 +65,7 @@ it), please use ``--lib="."`` option for :ref:`cmd_ci` command
.. code-block:: yaml .. code-block:: yaml
script: script:
- platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --lib="." --board=<ID_1> --board=<ID_2> --board=<ID_N>
Library dependecies Library dependecies
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
@ -83,11 +83,11 @@ Install dependent library using :ref:`librarymanager`
- sudo pip install -U platformio - sudo pip install -U platformio
# OneWire Library with ID=1 http://platformio.org/lib/show/1/OneWire # OneWire Library with ID=1 http://platformio.org/lib/show/1/OneWire
- platformio lib install 1 - platformio lib -g install 1
test: test:
override: override:
- platformio ci path/to/test/file.c --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/file.c --board=<ID_1> --board=<ID_2> --board=<ID_N>
Manually download dependent library and include in build process via ``--lib`` option Manually download dependent library and include in build process via ``--lib`` option
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -105,7 +105,7 @@ Manually download dependent library and include in build process via ``--lib`` o
test: test:
override: override:
- platformio ci path/to/test/file.c --lib="/tmp/OneWire-master" --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/file.c --lib="/tmp/OneWire-master" --board=<ID_1> --board=<ID_2> --board=<ID_N>
Custom Build Flags Custom Build Flags
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
@ -152,14 +152,14 @@ Examples
- sudo pip install -U platformio - sudo pip install -U platformio
# pre-install PlatformIO development platforms, they will be cached # pre-install PlatformIO development platforms, they will be cached
- platformio platforms install atmelavr atmelsam teensy - platformio platform install atmelavr atmelsam teensy
# #
# Libraries from PlatformIO Library Registry: # Libraries from PlatformIO Library Registry:
# #
# http://platformio.org/lib/show/416/TinyGPS # http://platformio.org/lib/show/416/TinyGPS
# http://platformio.org/lib/show/417/SPI4Teensy3 # http://platformio.org/lib/show/417/SPI4Teensy3
- platformio lib install 416 417 - platformio lib -g install 416 417
test: test:
override: override:

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -51,7 +51,7 @@ Please fill all fields for your project in the Drone control panel:
.. code-block:: bash .. code-block:: bash
pip install -U platformio pip install -U platformio
platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>
.. image:: ../_static/droneci-platformio-integration-1.png .. image:: ../_static/droneci-platformio-integration-1.png

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -58,7 +58,7 @@ GitHub repository.
- pip install -U platformio - pip install -U platformio
script: script:
- platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>
For more details as for PlatformIO build process please look into :ref:`cmd_ci` For more details as for PlatformIO build process please look into :ref:`cmd_ci`

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -72,7 +72,7 @@ PlatformIO is written in Python and is recommended to be run within
- pip install -U platformio - pip install -U platformio
script: script:
- platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --board=<ID_1> --board=<ID_2> --board=<ID_N>
Then perform steps 1, 2 and 4 from http://docs.travis-ci.com/user/getting-started/ Then perform steps 1, 2 and 4 from http://docs.travis-ci.com/user/getting-started/
@ -87,10 +87,10 @@ it), please use ``--lib="."`` option for :ref:`cmd_ci` command
.. code-block:: yaml .. code-block:: yaml
script: script:
- platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --lib="." --board=<ID_1> --board=<ID_2> --board=<ID_N>
Library dependecies Library dependencies
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
There 2 options to test source code with dependent libraries: There 2 options to test source code with dependent libraries:
@ -106,7 +106,7 @@ Install dependent library using :ref:`librarymanager`
# Libraries from PlatformIO Library Registry: # Libraries from PlatformIO Library Registry:
# #
# http://platformio.org/lib/show/1/OneWire # http://platformio.org/lib/show/1/OneWire
- platformio lib install 1 - platformio lib -g install 1
Manually download dependent library and include in build process via ``--lib`` option Manually download dependent library and include in build process via ``--lib`` option
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -121,7 +121,7 @@ Manually download dependent library and include in build process via ``--lib`` o
- unzip /tmp/onewire_source.zip -d /tmp/ - unzip /tmp/onewire_source.zip -d /tmp/
script: script:
- platformio ci --lib="/tmp/OneWire-master" --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --lib="/tmp/OneWire-master" --board=<ID_1> --board=<ID_2> --board=<ID_N>
Custom Build Flags Custom Build Flags
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
@ -189,7 +189,7 @@ Examples
# #
# http://platformio.org/lib/show/416/TinyGPS # http://platformio.org/lib/show/416/TinyGPS
# http://platformio.org/lib/show/417/SPI4Teensy3 # http://platformio.org/lib/show/417/SPI4Teensy3
- platformio lib install 416 417 - platformio lib -g install 416 417
script: script:
- platformio ci --board=uno --board=teensy31 --board=due --lib="." - platformio ci --board=uno --board=teensy31 --board=due --lib="."
@ -260,7 +260,7 @@ Examples
# Libraries from PlatformIO Library Registry: # Libraries from PlatformIO Library Registry:
# #
# http://platformio.org/lib/show/416/TinyGPS # http://platformio.org/lib/show/416/TinyGPS
- platformio lib install 416 421 422 - platformio lib -g install 416 421 422
script: script:
- platformio ci --lib="." --board=uno --board=teensy20pp $PLATFORMIO_CI_EXTRA_ARGS - platformio ci --lib="." --board=uno --board=teensy20pp $PLATFORMIO_CI_EXTRA_ARGS

View File

@ -45,7 +45,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'PlatformIO' project = u'PlatformIO'
copyright = u'2014-2016, Ivan Kravets' copyright = u'2014-present, PlatformIO'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -199,7 +199,7 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
('index', 'PlatformIO.tex', u'PlatformIO Documentation', ('index', 'PlatformIO.tex', u'PlatformIO Documentation',
u'Ivan Kravets', 'manual'), u'PlatformIO', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
@ -229,7 +229,7 @@ latex_documents = [
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'platformio', u'PlatformIO Documentation', ('index', 'platformio', u'PlatformIO Documentation',
[u'Ivan Kravets'], 1) [u'PlatformIO'], 1)
] ]
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
@ -243,7 +243,7 @@ man_pages = [
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'PlatformIO', u'PlatformIO Documentation', ('index', 'PlatformIO', u'PlatformIO Documentation',
u'Ivan Kravets', 'PlatformIO', 'One line description of project.', u'PlatformIO', 'PlatformIO', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -41,11 +41,11 @@ Platform Manager
Used in demo Used in demo
~~~~~~~~~~~~ ~~~~~~~~~~~~
1. :ref:`userguide_platforms` 1. :ref:`userguide_platform`
2. :ref:`cmd_platforms_list` command 2. :ref:`cmd_platform_list` command
3. :ref:`platformio platforms search avr <cmd_platforms_search>` command 3. :ref:`platformio platform search avr <cmd_platform_search>` command
4. :ref:`platformio platforms show teensy <cmd_platforms_show>` command 4. :ref:`platformio platform show teensy <cmd_platform_show>` command
5. :ref:`cmd_platforms_update` command. 5. :ref:`cmd_platform_update` command.
Library Manager Library Manager
--------------- ---------------

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -35,8 +35,8 @@ PlatformIO handles ``CI`` variable which is setup by
`Continuous Integration <http://en.wikipedia.org/wiki/Continuous_integration>`_ `Continuous Integration <http://en.wikipedia.org/wiki/Continuous_integration>`_
(Travis, Circle and etc.) systems. (Travis, Circle and etc.) systems.
PlatformIO uses it to disable prompts and progress bars. In other words, PlatformIO uses it to disable prompts and progress bars. In other words,
``CI=true`` automatically setup :envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS` to ``CI=true`` automatically setup :envvar:`PLATFORMIO_DISABLE_PROGRESSBAR` to
``false`` and :envvar:`PLATFORMIO_DISABLE_PROGRESSBAR` to ``true``. ``true``.
.. envvar:: PLATFORMIO_FORCE_COLOR .. envvar:: PLATFORMIO_FORCE_COLOR
@ -57,6 +57,10 @@ Allows to override :ref:`projectconf` option :ref:`projectconf_pio_home_dir`.
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_lib_dir`. Allows to override :ref:`projectconf` option :ref:`projectconf_pio_lib_dir`.
.. envvar:: PLATFORMIO_LIBDEPS_DIR
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_libdeps_dir`.
.. envvar:: PLATFORMIO_SRC_DIR .. envvar:: PLATFORMIO_SRC_DIR
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_src_dir`. Allows to override :ref:`projectconf` option :ref:`projectconf_pio_src_dir`.
@ -69,6 +73,10 @@ Allows to override :ref:`projectconf` option :ref:`projectconf_pio_envs_dir`.
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_data_dir`. Allows to override :ref:`projectconf` option :ref:`projectconf_pio_data_dir`.
.. envvar:: PLATFORMIO_TEST_DIR
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_test_dir`.
Building Building
-------- --------
@ -103,6 +111,10 @@ Allows to set :ref:`projectconf` option :ref:`projectconf_src_filter`.
Allows to set :ref:`projectconf` option :ref:`projectconf_extra_script`. Allows to set :ref:`projectconf` option :ref:`projectconf_extra_script`.
.. envvar:: PLATFORMIO_LIB_EXTRA_DIRS
Allows to set :ref:`projectconf` option :ref:`projectconf_lib_extra_dirs`.
Uploading Uploading
--------- ---------
@ -142,10 +154,15 @@ Allows to override setting :ref:`setting_check_platformio_interval`.
Allows to override setting :ref:`setting_check_platforms_interval`. Allows to override setting :ref:`setting_check_platforms_interval`.
.. envvar:: PLATFORMIO_SETTING_ENABLE_PROMPTS
Allows to override setting :ref:`setting_enable_prompts`.
.. envvar:: PLATFORMIO_SETTING_ENABLE_TELEMETRY .. envvar:: PLATFORMIO_SETTING_ENABLE_TELEMETRY
Allows to override setting :ref:`setting_enable_telemetry`. Allows to override setting :ref:`setting_enable_telemetry`.
.. envvar:: PLATFORMIO_SETTING_FORCE_VERBOSE
Allows to override setting :ref:`setting_force_verbose`.
.. envvar:: PLATFORMIO_SETTING_DISABLE_SSL
Allows to override setting :ref:`setting_disable_ssl`.

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -68,6 +68,13 @@ PlatformIO IDE
Please refer to :ref:`PlatformIO IDE Frequently Asked Questions <ide_atom_faq>`. Please refer to :ref:`PlatformIO IDE Frequently Asked Questions <ide_atom_faq>`.
Before/Pre and After/Post build actions
---------------------------------------
PlatformIO Build System has rich API that allows to attach different pre-/post
actions (hooks). See features of :ref:`projectconf_extra_script` option for
:ref:`projectconf`.
.. _faq_troubleshooting: .. _faq_troubleshooting:
Troubleshooting Troubleshooting
@ -132,21 +139,6 @@ Please upgrade *SetupTools* package:
Miscellaneous Miscellaneous
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
.. _faq_troubleshooting_pioblocksprompt:
PlatformIO blocks command execution using user prompt
'''''''''''''''''''''''''''''''''''''''''''''''''''''
If you are going to run *PlatformIO* from **subprocess**, you **MUST
DISABLE** all prompts. It will allow you to avoid blocking.
There are a few options:
- using :option:`platformio --force` option before each command
- using environment variable :envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS=No <PLATFORMIO_SETTING_ENABLE_PROMPTS>`
- disable global setting ``enable_prompts`` via :ref:`cmd_settings` command
- masking under Continuous Integration system via environment variable
:envvar:`CI=true <CI>`.
Serial does not work with panStampAVR board Serial does not work with panStampAVR board
''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''
@ -155,12 +147,6 @@ Answered in `issue #144 <https://github.com/platformio/platformio/issues/144#iss
Building Building
~~~~~~~~ ~~~~~~~~
Can not compile a library that compiles without issue with Arduino IDE
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
* `#298: Unable to use Souliss library <https://github.com/platformio/platformio/issues/298>`_
* `#331: Unable to use MySensors library <https://github.com/platformio/platformio/issues/331>`_
ARM toolchain: cc1plus: error while loading shared libraries ARM toolchain: cc1plus: error while loading shared libraries
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -33,7 +33,7 @@ Platforms
* - :ref:`platform_atmelsam` * - :ref:`platform_atmelsam`
- Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix. - Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix.
* - :ref:`platform_espressif` * - :ref:`platform_espressif8266`
- Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. - Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.
* - :ref:`platform_intel_arc32` * - :ref:`platform_intel_arc32`
@ -151,7 +151,7 @@ Adafruit
* - ``protrinket3ftdi`` * - ``protrinket3ftdi``
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_ - `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P - ATMEGA328P
- 16 MHz - 12 MHz
- 32 Kb - 32 Kb
- 2 Kb - 2 Kb

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -266,6 +266,26 @@ Freescale
- 256 Kb - 256 Kb
- 32 Kb - 32 Kb
Generic
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``bluepill_f103c8``
- `BluePill F103C8 <http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html>`_
- STM32F103C8T6
- 72 MHz
- 64 Kb
- 20 Kb
JKSoft JKSoft
~~~~~~ ~~~~~~

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -33,7 +33,7 @@ Platforms
* - :ref:`platform_atmelsam` * - :ref:`platform_atmelsam`
- Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix. - Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix.
* - :ref:`platform_espressif` * - :ref:`platform_espressif8266`
- Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. - Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.
Boards Boards

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -49,7 +49,7 @@ It's built on top of `GitHub's Atom "hackable" text editor <https://atom.io>`_.
If you have already Atom installed, please install `PlatformIO IDE for Atom package <https://atom.io/packages/platformio-ide>`_. If you have already Atom installed, please install `PlatformIO IDE for Atom package <https://atom.io/packages/platformio-ide>`_.
.. note:: .. note::
You don't need to install PlatformIO CLI seprately to system. You don't need to install PlatformIO CLI separately to system.
PlatformIO CLI is built into PlatformIO IDE and you will be able to use it PlatformIO CLI is built into PlatformIO IDE and you will be able to use it
within PlatformIO IDE Terminal. within PlatformIO IDE Terminal.
@ -95,9 +95,9 @@ then install it and restart Atom:
- **Other Systems**: Download the latest `Clang for the other systems <http://llvm.org/releases/download.html>`_. - **Other Systems**: Download the latest `Clang for the other systems <http://llvm.org/releases/download.html>`_.
.. warning:: .. warning::
The libraries which are added/installed after initializing process will If some libraries are not visible in :ref:`ide_atom` and Code Completion or
not be reflected in code linter. You need ``Menu: PlatformIO > Code Linting does not work properly, please perform ``Menu: PlatformIO >
Rebuild C/C++ Project Index (Autocomplete, Linter)``. Rebuild C/C++ Project Index (Autocomplete, Linter)``
3. IDE Installation 3. IDE Installation
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
@ -337,9 +337,9 @@ automatically created and preconfigured when you initialize project using
``Menu: PlatformIO > Initialize new PlatformIO Project or update existing...``. ``Menu: PlatformIO > Initialize new PlatformIO Project or update existing...``.
.. warning:: .. warning::
The libraries which are added/installed after initializing process will If some libraries are not visible in :ref:`ide_atom` and Code Completion or
not be reflected in code linter. You need ``Menu: PlatformIO > Code Linting does not work properly, please perform ``Menu: PlatformIO >
Rebuild C/C++ Project Index (Autocomplete, Linter)``. Rebuild C/C++ Project Index (Autocomplete, Linter)``
.. error:: .. error::
@ -381,11 +381,11 @@ For example, we have the next ``Demo.ino`` file:
.. code-block:: cpp .. code-block:: cpp
void function setup () { void setup () {
someFunction(13); someFunction(13);
} }
void function loop() { void loop() {
delay(1000); delay(1000);
} }
@ -406,11 +406,11 @@ The final ``Demo.cpp``:
void someFunction(int num); void someFunction(int num);
void function setup () { void setup () {
someFunction(13); someFunction(13);
} }
void function loop() { void loop() {
delay(1000); delay(1000);
} }
@ -439,6 +439,11 @@ To force Smart Code Linter to use Arduino files as C++ please
2. Perform all steps from :ref:`ide_atom_knownissues_sclarduino_manually` 2. Perform all steps from :ref:`ide_atom_knownissues_sclarduino_manually`
(without renaming to ``.cpp``). (without renaming to ``.cpp``).
Arch Linux: PlatformIO IDE Terminal issue
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please read this article `Installing PlatformIO on Arch Linux <https://primalcortex.wordpress.com/2016/08/18/platformio/>`_.
.. _ide_atom_faq: .. _ide_atom_faq:
Frequently Asked Questions Frequently Asked Questions
@ -478,6 +483,8 @@ package and `C/C++ Uncrustify Code Beautifier <http://sourceforge.net/projects/u
Articles / Manuals Articles / Manuals
------------------ ------------------
* Aug 18, 2016 - **Primal Cortex** - `Installing PlatformIO on Arch Linux <https://primalcortex.wordpress.com/2016/08/18/platformio/>`_
* Jul 26, 2016 - **Embedded Systems Laboratory** - `แนะนำการใช้งาน PlatformIO IDE สำหรับบอร์ด Arduino และ ESP8266 (Get started with PlatformIO IDE for Arduino board and ESP8266, Thai) <http://cpre.kmutnb.ac.th/esl/learning/index.php?article=intro_platformio-ide>`_
* May 30, 2016 - **Ron Moerman** - `IoT Development with PlatformIO <https://electronicsworkbench.io/blog/platformio>`_ * May 30, 2016 - **Ron Moerman** - `IoT Development with PlatformIO <https://electronicsworkbench.io/blog/platformio>`_
* May 01, 2016 - **Pedro Minatel** - `PlatformIO Uma alternativa ao Arduino IDE (PlatformIO - An alternative to the Arduino IDE, Portuguese) <http://pedrominatel.com.br/ferramentas/platformio-uma-alternativa-ao-arduino-ide/>`_ * May 01, 2016 - **Pedro Minatel** - `PlatformIO Uma alternativa ao Arduino IDE (PlatformIO - An alternative to the Arduino IDE, Portuguese) <http://pedrominatel.com.br/ferramentas/platformio-uma-alternativa-ao-arduino-ide/>`_
* Apr 23, 2016 - **Al Williams** - `Hackaday: Atomic Arduino (and Other) Development <http://hackaday.com/2016/04/23/atomic-arduino-and-other-development/>`_ * Apr 23, 2016 - **Al Williams** - `Hackaday: Atomic Arduino (and Other) Development <http://hackaday.com/2016/04/23/atomic-arduino-and-other-development/>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -31,12 +31,12 @@ page for more detailed information.
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide clion --board %TYPE% platformio init --ide clion --board <ID>
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide clion --board uno platformio init --ide clion --board uno

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -30,12 +30,12 @@ CodeBlocks IDE can be downloaded from `here <http://www.codeblocks.org/downloads
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide codeblocks --board %TYPE% platformio init --ide codeblocks --board <ID>
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide codeblocks --board uno platformio init --ide codeblocks --board uno

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -35,12 +35,12 @@ page for more detailed information.
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide eclipse --board %TYPE% platformio init --ide eclipse --board <ID>
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide eclipse --board uno platformio init --ide eclipse --board uno

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -45,12 +45,12 @@ Code completion can optionally be provided by installing `irony-mode <https://gi
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide emacs --board %TYPE% platformio init --ide emacs --board <ID>
There are 6 predefined targets for building. There are 6 predefined targets for building.

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -33,12 +33,12 @@ install the C/C++ development plugins).
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide netbeans --board %TYPE% platformio init --ide netbeans --board <ID>
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide netbeans --board uno platformio init --ide netbeans --board uno

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -35,12 +35,12 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide qtcreator --board %TYPE% platformio init --ide qtcreator --board <ID>
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide qtcreator --board uno platformio init --ide qtcreator --board uno
@ -165,14 +165,16 @@ Copy the source code which is described below to file ``main.c``.
Edit the content to match the code described below. Edit the content to match the code described below.
.. code-block:: none .. code-block:: ini
# ; PlatformIO Project Configuration File
# PlatformIO Project Configuration File ;
# ; Build options: build flags, source filter, extra scripting
# Please make sure to read documentation with examples first ; Upload options: custom port, speed and extra flags
# http://docs.platformio.org/en/stable/projectconf.html ; Library options: dependencies, extra library storages
# ;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
[env:arduino_uno] [env:arduino_uno]
platform = atmelavr platform = atmelavr

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -42,12 +42,12 @@ steps and documentation.
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide sublimetext --board %TYPE% platformio init --ide sublimetext --board <ID>
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide sublimetext --board uno platformio init --ide sublimetext --board uno
@ -164,14 +164,16 @@ Let's create new file named ``main.c`` using ``Menu: File > New File`` or shortc
2. Project Configuration File named ``platformio.ini`` must be located in the project root directory. 2. Project Configuration File named ``platformio.ini`` must be located in the project root directory.
Copy the source code which is described below to it. Copy the source code which is described below to it.
.. code-block:: none .. code-block:: ini
# ; PlatformIO Project Configuration File
# PlatformIO Project Configuration File ;
# ; Build options: build flags, source filter, extra scripting
# Please make sure to read documentation with examples first ; Upload options: custom port, speed and extra flags
# http://docs.platformio.org/en/stable/projectconf.html ; Library options: dependencies, extra library storages
# ;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
[env:arduino_uno] [env:arduino_uno]
platform = atmelavr platform = atmelavr

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -35,12 +35,12 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide sublimetext --board %TYPE% platformio init --ide sublimetext --board <ID>
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide visualstudio --board uno platformio init --ide visualstudio --board uno
@ -124,14 +124,16 @@ Copy the source code which is described below to file ``main.cpp``.
Copy the source code which is described below to it. Copy the source code which is described below to it.
.. code-block:: none .. code-block:: ini
# ; PlatformIO Project Configuration File
# PlatformIO Project Configuration File ;
# ; Build options: build flags, source filter, extra scripting
# Please make sure to read documentation with examples first ; Upload options: custom port, speed and extra flags
# http://docs.platformio.org/en/stable/projectconf.html ; Library options: dependencies, extra library storages
# ;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
[env:arduino_uno] [env:arduino_uno]
platform = atmelavr platform = atmelavr

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -13,7 +13,7 @@ PlatformIO is an open source ecosystem for IoT development
========================================================== ==========================================================
**Cross-platform build system and library manager. Continuous and IDE **Cross-platform build system and library manager. Continuous and IDE
integration. Arduino and MBED compatible. Ready for Cloud compiling.** integration. Arduino, ESP8266 and ARM mbed compatible.**
* **PlatformIO IDE** - The next-generation integrated development environment for IoT. * **PlatformIO IDE** - The next-generation integrated development environment for IoT.
C/C++ Intelligent Code Completion and Smart Code Linter for the super-fast coding. C/C++ Intelligent Code Completion and Smart Code Linter for the super-fast coding.
@ -35,9 +35,10 @@ integration. Arduino and MBED compatible. Ready for Cloud compiling.**
Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed, Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed,
libOpenCM3, etc.* libOpenCM3, etc.*
* `Website <http://platformio.org>`_ * `Home Page <http://platformio.org>`_
* `PlatformIO Plus and professional solutions <https://pioplus.com>`_
* :ref:`ide_atom` * :ref:`ide_atom`
* `Web 2.0 Library Search <http://platformio.org/lib>`_ | * `Library Search and Registry <http://platformio.org/lib>`_ |
`Embedded Boards Explorer <http://platformio.org/boards>`_ `Embedded Boards Explorer <http://platformio.org/boards>`_
* `Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_ * `Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_
* `Source Code <https://github.com/platformio/platformio>`_ | * `Source Code <https://github.com/platformio/platformio>`_ |
@ -55,7 +56,7 @@ Embedded Development. *Easier Than Ever.*
* :ref:`IDE Integration <ide>` with *Arduino, Atom, CLion, Eclipse, Emacs, * :ref:`IDE Integration <ide>` with *Arduino, Atom, CLion, Eclipse, Emacs,
Energia, Qt Creator, Sublime Text, Vim, Visual Studio* Energia, Qt Creator, Sublime Text, Vim, Visual Studio*
* Cloud compiling and :ref:`ci` with *AppVeyor, Circle CI, Drone, Shippable, Travis CI* * Cloud compiling and :ref:`ci` with *AppVeyor, Circle CI, Drone, Shippable, Travis CI*
* Built-in :ref:`Serial Port Monitor <cmd_serialports_monitor>` and * Built-in :ref:`Serial Port Monitor <cmd_device_monitor>` and
configurable build :ref:`-flags/-options <projectconf_build_flags>` configurable build :ref:`-flags/-options <projectconf_build_flags>`
* Pre-built toolchains, :ref:`frameworks` for the :ref:`platforms` * Pre-built toolchains, :ref:`frameworks` for the :ref:`platforms`
@ -112,12 +113,19 @@ Contents
frameworks/index frameworks/index
platforms/custom_platform_and_board platforms/custom_platform_and_board
.. toctree::
:caption: PlatformIO Plus
:maxdepth: 3
plus/unit-testing
.. toctree:: .. toctree::
:caption: Library Manager :caption: Library Manager
:maxdepth: 2 :maxdepth: 2
Quickstart <librarymanager/index> Quickstart <librarymanager/index>
User Guide <userguide/lib/index.rst> User Guide <userguide/lib/index.rst>
librarymanager/ldf
librarymanager/config librarymanager/config
librarymanager/creating librarymanager/creating
@ -135,3 +143,5 @@ Contents
articles articles
FAQ <faq> FAQ <faq>
history history
migration

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -200,11 +200,6 @@ To revert to the latest stable version
Troubleshooting Troubleshooting
--------------- ---------------
.. warning::
If you are going to run *PlatformIO* from **subprocess**, you
:ref:`MUST DISABLE <faq_troubleshooting_pioblocksprompt>` all prompts.
It will allow you to avoid blocking.
.. note:: .. note::
**Linux OS**: Don't forget to install "udev" rules file **Linux OS**: Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file). `99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -22,10 +22,11 @@ to keep project in own structure and define:
* examples list * examples list
* compatible frameworks and platforms * compatible frameworks and platforms
* library dependencies * library dependencies
* advanced build settings
PlatformIO Library Crawler uses ``library.json`` manifest to extract PlatformIO Library Crawler uses ``library.json`` manifest to extract
source code from developer's location and keeps cleaned library in own source code from developer's location and keeps a cleaned library in own
Library Storage. Library Registry.
A data in ``library.json`` should be represented A data in ``library.json`` should be represented
in `JSON-style <http://en.wikipedia.org/wiki/JSON>`_ via in `JSON-style <http://en.wikipedia.org/wiki/JSON>`_ via
@ -138,7 +139,7 @@ Examples:
*Required* if :ref:`libjson_downloadurl` field is not defined | Type: ``Object`` *Required* if :ref:`libjson_downloadurl` field is not defined | Type: ``Object``
The repository in which the source code can be found. The field consists for the The repository in which the source code can be found. The field consists of the
next items: next items:
* ``type`` the only "git", "hg" or "svn" are supported * ``type`` the only "git", "hg" or "svn" are supported
@ -221,6 +222,21 @@ Example:
}, },
"version": "1.0.0" "version": "1.0.0"
``license``
-----------
*Optional* | Type: ``String``
A license of the library. You can check
`the full list of SPDX license IDs <https://spdx.org/licenses/>`_. Ideally you
should pick one that is `OSI <https://opensource.org/licenses/alphabetical>`_
approved.
.. code-block:: javascript
"license": "Apache-2.0"
.. _libjson_downloadurl: .. _libjson_downloadurl:
``downloadUrl`` ``downloadUrl``
@ -246,27 +262,40 @@ Example with fixed release/tag on GitHub:
See more ``library.json`` :ref:`library_creating_examples`. See more ``library.json`` :ref:`library_creating_examples`.
.. _libjson_url: ``homepage``
------------
``url``
-------
*Optional* | Type: ``String`` | Max. Length: 255 *Optional* | Type: ``String`` | Max. Length: 255
Home page of library (if is different from :ref:`libjson_repository` url). Home page of library (if is different from :ref:`libjson_repository` url).
.. _libjson_include: .. _libjson_export:
``export``
----------
*Optional* | Type: ``Object``
Explain PlatformIO Library Crawler which content from the repository/archive
should be exported as "source code" of the library. This option is useful if
need to exclude extra data (test code, docs, images, PDFs, etc). It allows to
reduce size of the final archive.
Possible options:
.. contents::
:local:
``include`` ``include``
----------- ~~~~~~~~~~~
*Optional* | Type: ``String`` or ``Array`` | *Optional* | Type: ``String`` or ``Array`` |
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_ `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
If :ref:`libjson_include` field is a type of ``String``, then If ``include`` field is a type of ``String``, then |PIOAPICR| will recognize
|PIOAPICR| will recognize it like a "relative path inside it like a "relative path inside repository/archive to library source code".
repository/archive to library source code". See example below where the only See example below where the only
source code from the relative directory ``LibrarySourceCodeHere`` will be source code from the relative directory ``LibrarySourceCodeHere`` will be
included. included.
@ -274,21 +303,23 @@ included.
"include": "some/child/dir/LibrarySourceCodeHere" "include": "some/child/dir/LibrarySourceCodeHere"
If :ref:`libjson_include` field is a type of ``Array``, then If ``include`` field is a type of ``Array``, then |PIOAPICR| firstly will
|PIOAPICR| firstly will apply :ref:`libjson_exclude` filter and apply ``exclude`` filter and then include only directories/files
then include only directories/files which match with :ref:`libjson_include` which match with ``include`` patterns.
patterns.
Example: Example:
.. code-block:: javascript .. code-block:: javascript
"include": "export": {
[ "include":
"dir/*.[ch]pp", [
"dir/examples/*", "dir/*.[ch]pp",
"*/*/*.h" "dir/examples/*",
] "*/*/*.h"
]
}
Pattern Meaning Pattern Meaning
@ -308,16 +339,14 @@ Pattern Meaning
See more ``library.json`` :ref:`library_creating_examples`. See more ``library.json`` :ref:`library_creating_examples`.
.. _libjson_exclude:
``exclude`` ``exclude``
----------- ~~~~~~~~~~~
*Optional* | Type: ``String`` or ``Array`` | *Optional* | Type: ``String`` or ``Array`` |
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_ `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
Exclude the directories and files which match with :ref:`libjson_exclude` Exclude the directories and files which match with ``exclude`` patterns.
patterns.
.. _libjson_frameworks: .. _libjson_frameworks:
@ -367,10 +396,26 @@ A list of dependent libraries. They will be installed automatically with
Allowed requirements for dependent library: Allowed requirements for dependent library:
* ``name`` | Type: ``String`` * ``name`` | Type: ``String``
* ``version`` | Type: ``String``
* ``authors`` | Type: ``String`` or ``Array`` * ``authors`` | Type: ``String`` or ``Array``
* ``frameworks`` | Type: ``String`` or ``Array`` * ``frameworks`` | Type: ``String`` or ``Array``
* ``platforms`` | Type: ``String`` or ``Array`` * ``platforms`` | Type: ``String`` or ``Array``
The ``version`` supports `Semantic Versioning <http://semver.org>`_ (
``<major>.<minor>.<patch>``) and can take any of the following forms:
* ``0.1.2`` - an exact version number. Use only this exact version
* ``^0.1.2`` - any compatible version (exact version for ``0.x.x`` versions
* ``~0.1.2`` - any version with the same major and minor versions, and an
equal or greater patch version
* ``>0.1.2`` - any version greater than ``0.1.2``. ``>=``, ``<``, and ``<=``
are also possible
* ``>0.1.0,!=0.2.0,<0.3.0`` - any version greater than ``0.1.0``, not equal to
``0.2.0`` and less than ``0.3.0``
The rest possible values including VCS repository URLs are documented in
:ref:`cmd_lib_install` command.
Example: Example:
.. code-block:: javascript .. code-block:: javascript
@ -387,17 +432,30 @@ Example:
}, },
{ {
"name": "Library-Bar", "name": "Library-Bar",
"frameworks": "FrameworkFoo, FrameworkBar" "version": "~1.2.3"
},
{
"name": "lib-from-repo",
"version": "https://github.com/user/package.git#1.2.3"
} }
] ]
A short definition of dependencies is allowed:
.. code-block:: javascript
"dependencies": {
"mylib": "1.2.3",
"lib-from-repo": "githubuser/package"
}
See more ``library.json`` :ref:`library_creating_examples`. See more ``library.json`` :ref:`library_creating_examples`.
.. _libjson_examples: .. _libjson_examples:
``examples`` ``examples``
---------------- ------------
*Optional* | Type: ``String`` or ``Array`` | *Optional* | Type: ``String`` or ``Array`` |
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_ `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
@ -407,9 +465,141 @@ A list of example patterns. This field is predefined with default value:
.. code-block:: javascript .. code-block:: javascript
"examples": [ "examples": [
"[Ee]xamples/*.c",
"[Ee]xamples/*.cpp",
"[Ee]xamples/*.ino",
"[Ee]xamples/*.pde",
"[Ee]xamples/*/*.c", "[Ee]xamples/*/*.c",
"[Ee]xamples/*/*.cpp", "[Ee]xamples/*/*.cpp",
"[Ee]xamples/*/*.h",
"[Ee]xamples/*/*.ino", "[Ee]xamples/*/*.ino",
"[Ee]xamples/*/*.pde" "[Ee]xamples/*/*.pde",
"[Ee]xamples/*/*/*.c",
"[Ee]xamples/*/*/*.cpp",
"[Ee]xamples/*/*/*.ino",
"[Ee]xamples/*/*/*.pde"
] ]
.. _libjson_build:
``build``
---------
*Optional* | Type: ``Object``
Specify advanced settings, options and flags for the build system. Possible
options:
.. contents::
:local:
``flags``
~~~~~~~~~
*Optional* | Type: ``String`` or ``Array``
Extra flags to control preprocessing, compilation, assembly and linking
processes. More details :ref:`projectconf_build_flags`.
``unflags``
~~~~~~~~~~~
*Optional* | Type: ``String`` or ``Array``
Remove base/initial flags which were set by development platform. More
details :ref:`projectconf_build_unflags`.
``srcFilter``
~~~~~~~~~~~~~
*Optional* | Type: ``String`` or ``Array``
Specify which source files should be included/excluded from build process.
More details :ref:`projectconf_src_filter`.
``extraScript``
~~~~~~~~~~~~~~~
*Optional* | Type: ``String``
Launch extra script before build process.
More details :ref:`projectconf_extra_script`.
``libArchive``
~~~~~~~~~~~~~~
*Optional* | Type: ``Boolean``
Archive object files to Static Library. This is default behavior of PlatformIO
Build System (``"libArchive": true``).
``libLDFMode``
~~~~~~~~~~~~~~
*Optional* | Type: ``Integer``
Specify Library Dependency Finder Mode. See :ref:`ldf_mode` for details.
**Examples**
1. Custom macros/defines
.. code-block:: javascript
"build": {
"flags": "-D MYLIB_REV=0.1.2 -DRELEASE"
}
2. Extra includes for C preprocessor
.. code-block:: javascript
"build": {
"flags": [
"-I inc",
"-I inc/target_x13"
]
}
3. Force to use ``C99`` standard instead of ``C11``
.. code-block:: javascript
"build": {
"unflags": "-std=gnu++11",
"flags": "-std=c99"
}
4. Build source files (``c, cpp, h``) at the top level of the library
.. code-block:: javascript
"build": {
"srcFilter": [
"+<*.c>",
"+<*.cpp>",
"+<*.h>"
]
}
5. Extend PlatformIO Build System with own extra script
.. code-block:: javascript
"build": {
"extraScript": "generate_headers.py"
}
``generate_headers.py``
.. code-block:: python
Import('env')
# print env.Dump()
env.Append(
CPPDEFINES=["HELLO=WORLD", "TAG=1.2.3", "DEBUG"],
CPPPATH=["inc", "inc/devices"]
)
# some python code that generates header files "on-the-fly"

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -32,9 +32,8 @@ There are a several ways how to share your library with the whole world
(see `examples <https://github.com/platformio/platformio-libmirror/tree/master/configs>`_). (see `examples <https://github.com/platformio/platformio-libmirror/tree/master/configs>`_).
You can hold a lot of libraries (split into separated folders) inside one of You can hold a lot of libraries (split into separated folders) inside one of
the repository/archive. In this case please use :ref:`libjson_include` the repository/archive. In this case, you need to specify ``include`` option of
field to specify the relative path to your library's source code. :ref:`libjson_export` field to relative path to your library's source code.
At GitHub At GitHub
^^^^^^^^^ ^^^^^^^^^
@ -132,7 +131,9 @@ of **required** fields in the :ref:`library_config` will look like:
}, },
"version": "2.2", "version": "2.2",
"downloadUrl": "http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip", "downloadUrl": "http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip",
"include": "OneWire", "export": {
"include": "OneWire"
},
"frameworks": "arduino", "frameworks": "arduino",
"platforms": "atmelavr" "platforms": "atmelavr"
} }

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -14,13 +14,50 @@
Library Manager Library Manager
=============== ===============
*PlatformIO Library Manager* allows you to organize external embedded libraries. *PlatformIO Library Manager* is a tool for managing libraries of
You can search for new libraries via `PlatformIO Registry <http://platformio.org/lib>`__ and VCS repositories (Git,
Hg, SVN). It makes it exceedingly simple to find, install and keep libraries
up-to-date. PlatformIO Library Manager supports
`Semantic Versioning <http://semver.org>`_ and its rules.
* :ref:`Command Line interface <cmd_lib_search>` There 2 options how to find library:
* `Web 2.0 Library Search <http://platformio.org/lib>`_
You don't need to bother for finding the latest version of library. Due to * :ref:`Command Line Interface <cmd_lib_search>`
:ref:`cmd_lib_update` command you will have up-to-date external libraries. * `Web-based Library Search <http://platformio.org/lib>`__
*PlatformIO Library Manager* allows to manage different library storages using
:option:`platformio lib --global` or :option:`platformio lib --storage-dir`
options.
Project dependencies
--------------------
*PlatformIO Library Manager* allows to specify project dependencies
(:ref:`projectconf_lib_deps`) that will be installed automatically per project
before environment processing. You do not need to install libraries manually.
The only one simple step is to define dependencies in :ref:`projectconf`.
You can use library ID, Name or even repository URL. For example,
.. code-block:: ini
[env:myenv]
platform = ...
framework = ...
board = ...
lib_deps =
13
PubSubClient
Json@~5.6,!=5.4
https://github.com/gioblu/PJON.git@v2.0
https://github.com/me-no-dev/ESPAsyncTCP.git
https://github.com/adafruit/DHT-sensor-library/archive/master.zip
Please follow to :ref:`cmd_lib_install` for detailed documentation about
possible values.
.. warning::
If some libraries are not visible in :ref:`ide_atom` and Code Completion or
Code Linting does not work properly, please perform ``Menu: PlatformIO >
Rebuild C/C++ Project Index (Autocomplete, Linter)``
.. image:: ../_static/platformio-demo-lib.gif .. image:: ../_static/platformio-demo-lib.gif

167
docs/librarymanager/ldf.rst Normal file
View File

@ -0,0 +1,167 @@
.. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.. _ldf:
Library Dependency Finder (LDF)
===============================
.. versionadded:: 3.0
Library Dependency Finder is a core part of PlatformIO Build System that
operates with the C/C++ source files and looks for ``#include ...``
directives.
In spite of the fact that Library Dependency Finder is written in pure Python,
it interprets (emulates) :ref:`ldf_c_cond_syntax` (``#ifdef``, ``if``, ``defined``,
``else``, and ``elif``) without calling ``gcc -E``. This approach allows
significantly reduce total compilation time.
Library Dependency Finder has controls that can be set up in :ref:`projectconf`:
.. hlist::
:columns: 3
* :ref:`projectconf_lib_deps`
* :ref:`projectconf_lib_extra_dirs`
* :ref:`projectconf_lib_force`
* :ref:`projectconf_lib_ignore`
* :ref:`projectconf_lib_compat_mode`
* :ref:`projectconf_lib_ldf_mode`
-----------
.. contents::
.. _ldf_storage:
Storage
-------
There are different storages where Library Dependency Finder looks for
libraries. These storages (folders) have priority and LDF operates in the next
order:
1. :ref:`projectconf_lib_extra_dirs` - extra storages per build environment
2. :ref:`projectconf_pio_lib_dir` - own/private library storage per project
3. :ref:`projectconf_pio_libdeps_dir` - project dependencies storage used by
:ref:`librarymanager`
4. ":ref:`projectconf_pio_home_dir`/lib" - global storage per all projects.
.. _ldf_mode:
Dependency Finder Mode
----------------------
Library Dependency Finder starts work from analyzing source files of the
project (:ref:`projectconf_pio_src_dir`) and can work in the next modes:
* ``0`` - "manual mode", does not process source files of a project and
dependencies. Builds only the libraries that are specified in
manifests (:ref:`library_config`, ``module.json``) or in the :ref:`projectconf`.
* ``1`` - **default** - parses ALL C/C++ source code of the project and follows
only by nested includes (``#include ...``, chain...) from the libraries.
* ``2`` - parses ALL C/C++ source code of the project and parses
ALL C/C++ source code of the each found dependency (recursively).
This mode can be changed using :ref:`projectconf_lib_ldf_mode` option in
:ref:`projectconf`.
A difference between ``1`` and ``2`` modes. For example, there are 2 libraries:
* Library "Foo" with files:
- ``Foo/foo.h``
- ``Foo/foo.cpp``
* Library "Bar" with files:
- ``Bar/bar.h``
- ``Bar/bar.cpp``
:Case 1:
* ``lib_ldf_mode = 1``
* ``Foo/foo.h`` depends on "Bar" library (contains ``#include <bar.h>``)
* ``#include <foo.h>`` is located in one of the project source files
Here are nested includes (``project file > foo.h > bar.h``) and ``LDF``
will find both libraries "Foo" and "Bar".
:Case 2:
* ``lib_ldf_mode = 1``
* ``Foo/foo.cpp`` depends on "Bar" library (contains ``#include <bar.h>``)
* ``#include <foo.h>`` is located in one of the project source files
In this case, ``LDF`` will not find "Bar" library because it doesn't know
about CPP file (``Foo/foo.cpp``).
:Case 3:
* ``lib_ldf_mode = 2``
* ``Foo/foo.cpp`` depends on "Bar" library (contains ``#include <bar.h>``)
* ``#include <foo.h>`` is located in one of the project source files
Firstly, ``LDF`` finds "Foo" library, then it parses all sources from "Foo"
library and finds ``Foo/foo.cpp`` that depends on ``#include <bar.h>``.
Secondly, it will parse all sources from "Bar" library and this operation
continues until all dependencies will not be parsed.
.. _ldf_compat_mode:
Compatibility Mode
------------------
Compatibility mode allows to control strictness of Library Dependency Finder.
If library contains one of manifest file (:ref:`library_config`,
``library.properties``, ``module.json``), then LDF check compatibility of this
library with real build environment. Available compatibility modes:
* ``0`` - does not check for compatibility (is not recommended)
* ``1`` - **default** - checks for the compatibility with
:ref:`projectconf_env_framework` from build environment
* ``2`` - checks for the compatibility with :ref:`projectconf_env_framework`
and :ref:`projectconf_env_platform` from build environment.
This mode can be changed using :ref:`projectconf_lib_compat_mode` option in
:ref:`projectconf`.
.. _ldf_c_cond_syntax:
C/C++ Preprocessor conditional syntax
-------------------------------------
In spite of the fact that Library Dependency Finder is written in pure Python,
it interprets (emulates) `C/C++ Preprocessor conditional syntax <https://gcc.gnu.org/onlinedocs/cpp/Conditional-Syntax.html#Conditional-Syntax>`_
(``#ifdef``, ``if``, ``defined``, ``else``, and ``elif``) without calling
``gcc -E``. For example,
``platformio.ini``
.. code-block:: ini
[env:myenv]
build_flags = -D MY_PROJECT_VERSION=13
``mylib.h``
.. code-block:: c
#ifdef PROJECT_VERSION
// include common file for the project
#include "my_common.h"
#endif
#if PROJECT_VERSION < 10
// this include will be ignored because does not satisfy condition above
#include "my_old.h"
#endif

213
docs/migration.rst Normal file
View File

@ -0,0 +1,213 @@
.. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.. _migration:
Migrating from 2.x to 3.0
=========================
Guidance on how to upgrade from PlatformIO v2.x to v3.x with emphasis on major
changes, what is new, and what is been removed.
PlatformIO 3 is not backwards compatible with v2.x. Use this section as a
general guide to upgrading from v2.x to v3.0. For a broader overview, see
`what is new <https://community.platformio.org/c/announcements>`_ in the v3.0
release announcement.
.. contents::
Major PlatformIO CLI changes
----------------------------
.. note::
PlatformIO 3.x is 100% non-blocking! You do not need to use ``--force``
option or setup special ``PLATOFMRIO_SETTING_ENABLE_PROMPTS`` environment.
Use PlatformIO 3.0 with sub-processing without any risk!
This table shows the CLI changes between v2.x and v3.0.
.. list-table::
:header-rows: 1
* - PlatformIO 2.x
- PlatformIO 3.x
* - platformio platforms
- :ref:`platformio platform <userguide_platform>`
* - platformio serialports
- :ref:`cmd_device`
* - platformio settings set enable_prompts false
- Removed! Now, all PlatformIO 3.0 CLI is 100% non-blocking!
PlatformIO 2.x commands will be converted to PlatformIO 3.x automatically.
Nevertheless, we recommend to use PlatformIO 3.x commands for the new projects.
What is new
-----------
Development Platforms
~~~~~~~~~~~~~~~~~~~~~
We have introduced :ref:`platform_creating_manifest_file` and ported
PlatformIO 2.x development platforms according PlatformIO 3.0 decentralized
architecture. Now, platform related things (build scrips, LD scripts, board
configs, package requirements) are located in own repository. Here is the full
list with `PlatformIO 3.0 open source development platforms <https://github.com/platformio?utf8=✓&query=platform->`__. You can fork it, modify or create custom.
See :ref:`platform_creating` guide for details.
* :ref:`platform_creating_manifest_file`
* ``espressif`` development platform has been renamed to :ref:`platform_espressif8266`
* PlatformIO 3.0 :ref:`userguide_platform`
* Custom package repositories
* External embedded board configuration files, isolated build scripts
* Embedded Board compatibility with more than one development platform
Library Manager and Intelligent Build System
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Powerful and super-fast :ref:`ldf` that interprets C/C++ Preprocessor
conditional macros with deep search behavior
* Project dependencies per build environment using `projectconf_lib_deps` option
* Depend on a library using VCS URL (GitHub, Git, ARM mbed code registry, Hg, SVN)
* Install library by name
* Strict search for library dependencies
* Multiple library storages: Project's Local, PlatformIO's Global or Custom
* Allowed :ref:`library_config` to specify sources other than PlatformIO's Repository
* Check library compatibility with project environment before building
* Control Library Dependency Finder for compatibility using :ref:`projectconf_lib_compat_mode` option
* Custom library storages/directories with :ref:`projectconf_lib_extra_dirs` option
* Handle extra build flags, source filters and build script from :ref:`library_config`
* Allowed to disable library archiving (``*.ar``)
* Show detailed build information about dependent libraries (Library Dependency Graph)
* Support for the 3rd party manifests (Arduino IDE "library.properties" and
ARM mbed "module.json")
* Build System: Attach custom Before/Pre and After/Post actions for targets using :ref:`projectconf_extra_script`
Command Line Interface
~~~~~~~~~~~~~~~~~~~~~~
We have added new commands and changed some existing ones. Here are the new or
updated commands and options.
.. list-table::
:header-rows: 1
* - Command
- Description
* - :ref:`cmd_boards`
- Returns all supported boards by PlatformIO
* - :option:`platformio boards --installed`
- Returns currently installed boards
* - :option:`platformio ci --project-option`
- Pass custom option from :ref:`projectconf`
* - :option:`platformio ci --verbose`
- Print detailed information about build process
* - :option:`platformio init --project-option`
- Pass custom option from :ref:`projectconf`
* - :option:`platformio lib --global`
- Manage PlatformIO :ref:`Global Library Storage <ldf_storage>`
* - :option:`platformio lib --storage-dir`
- Manage :ref:`Custom Library Storage <ldf_storage>`
* - :ref:`cmd_lib_install`
- New PlatformIO 3.0 Library Manager! Semantic Versioning, VCS support and external URL support
* - :option:`platformio lib install --silent`
- Suppress progress reporting when install library
* - :option:`platformio lib install --interactive`
- Allow to make a choice for all prompts when install library
* - :option:`platformio lib search --header`
- Search library by specific header file name (include)
* - :option:`platformio lib update --only-check`
- Do not update, only check for new version
* - :ref:`platformio platform <userguide_platform>`
- New PlatformIO 3.0 Platform Manager! Semantic Versioning, VCS support and external URL support.
* - :option:`platformio platform update --only-packages`
- Update only platform packages
* - :option:`platformio platform update --only-check`
- Do not update, only check for new version
* - :ref:`cmd_run`
- By default, prints only human-readable information when processing environments
* - :option:`platformio run --verbose`
- Print detailed processing information
* - :ref:`platformio settings set force_verbose true <setting_force_verbose>`
- Force verbose output when processing environments (globally)
* - :ref:`cmd_test`
- PlatformIO Plus Unit Testing
* - :option:`platformio update --only-check`
- Do not update, only check for new version
:ref:`projectconf`
~~~~~~~~~~~~~~~~~~
We have added new options and changed some existing ones. Here are the new or
updated options.
.. list-table::
:header-rows: 1
* - Section
- Option
- Description
* - platformio
- :ref:`projectconf_pio_libdeps_dir`
- Internal storage where :ref:`librarymanager` will install project dependencies
* - platformio
- :ref:`projectconf_pio_test_dir`
- Directory where :ref:`unit_testing` engine will look for the tests
* - env
- :ref:`projectconf_lib_deps`
- Specify project dependencies that should be installed automatically to :ref:`projectconf_pio_libdeps_dir` before environment processing.
* - env
- :ref:`projectconf_env_platform`
- PlatformIO 3.0 allows to use specific version of platform using `Semantic Versioning <http://semver.org>`_ (X.Y.Z=MAJOR.MINOR.PATCH).
* - env
- :ref:`projectconf_lib_extra_dirs`
- A list with extra directories/storages where :ref:`ldf` will look for dependencies
* - env
- :ref:`projectconf_lib_ldf_mode`
- This option specifies how does :ref:`ldf` should analyze dependencies (``#include`` directives)
* - env
- :ref:`projectconf_lib_compat_mode`
- Library compatibility mode allows to control strictness of :ref:`ldf`
* - env
- :ref:`projectconf_test_ignore`
- Ignore tests where the name matches specified patterns
What is removed
---------------
Command Line Interface
~~~~~~~~~~~~~~~~~~~~~~
The following commands have been dropped or changed in v3.0.
.. list-table::
:header-rows: 1
* - Command
- Description
* - platformio init --enable-auto-uploading
- Use :option:`platformio init --project-option` instead of it with ``targets = upload`` value
:ref:`projectconf`
~~~~~~~~~~~~~~~~~~
The following options have been dropped or changed in v3.0.
.. list-table::
:header-rows: 1
* - Section
- Option
- Description
* - platformio
- :ref:`projectconf_pio_lib_dir`
- Changed: Project's own/private libraries, where in PlatformIO 2.x it was global library storage

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,21 +28,34 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``toolchain-atmelavr`` * - ``framework-arduinoavr``
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_ - `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``tool-avrdude``
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``framework-simba`` * - ``framework-simba``
- `Simba Framework <https://github.com/eerimoq/simba>`_ - `Simba Framework <https://github.com/eerimoq/simba>`_
* - ``framework-arduinoavr`` * - ``tool-avrdude``
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_ - `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``tool-micronucleus`` * - ``tool-micronucleus``
- `Micronucleus <https://github.com/micronucleus/micronucleus>`_ - `Micronucleus <https://github.com/micronucleus/micronucleus>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-atmelavr``
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
**Windows Users:** Please check that you have correctly installed USB
driver from board manufacturer
Frameworks Frameworks
---------- ----------
.. list-table:: .. list-table::
@ -124,7 +137,7 @@ Adafruit
* - ``protrinket3ftdi`` * - ``protrinket3ftdi``
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_ - `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P - ATMEGA328P
- 16 MHz - 12 MHz
- 32 Kb - 32 Kb
- 2 Kb - 2 Kb

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -30,7 +30,7 @@ Configuration for the programmers:
upload_protocol = stk500v1 upload_protocol = stk500v1
upload_flags = -P$UPLOAD_PORT upload_flags = -P$UPLOAD_PORT
# edit this line with valid upload port ; edit this line with valid upload port
upload_port = SERIAL_PORT_HERE upload_port = SERIAL_PORT_HERE
* AVRISP mkII * AVRISP mkII
@ -91,7 +91,7 @@ Configuration for the programmers:
upload_protocol = stk500v1 upload_protocol = stk500v1
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED
# edit these lines ; edit these lines
upload_port = SERIAL_PORT_HERE upload_port = SERIAL_PORT_HERE
upload_speed = 19200 upload_speed = 19200

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,30 +28,30 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``framework-arduinosam`` * - ``framework-arduinosam``
- `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_ - `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``ldscripts`` * - ``framework-mbed``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `mbed Framework <http://mbed.org>`_
* - ``framework-simba`` * - ``framework-simba``
- `Simba Framework <https://github.com/eerimoq/simba>`_ - `Simba Framework <https://github.com/eerimoq/simba>`_
* - ``tool-openocd``
- `OpenOCD <http://openocd.org>`_
* - ``tool-avrdude`` * - ``tool-avrdude``
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_ - `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``tool-bossac`` * - ``tool-bossac``
- `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_ - `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_
* - ``tool-openocd``
- `OpenOCD <http://openocd.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file). `99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
@ -73,12 +73,12 @@ Frameworks
* - :ref:`framework_arduino` * - :ref:`framework_arduino`
- Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. - Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
* - :ref:`framework_simba` * - :ref:`framework_simba`
- Simba is an RTOS and build framework. It aims to make embedded programming easy and portable. - Simba is an RTOS and build framework. It aims to make embedded programming easy and portable.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
Boards Boards
------ ------

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -35,29 +35,44 @@ The key fields:
* ``build`` data will be used by :ref:`platforms` and :ref:`frameworks` builders * ``build`` data will be used by :ref:`platforms` and :ref:`frameworks` builders
* ``frameworks`` is the list with supported :ref:`frameworks` * ``frameworks`` is the list with supported :ref:`frameworks`
* ``platform`` main type of :ref:`platforms` * ``platform`` name of :ref:`platforms`
* ``upload`` upload settings which depend on the ``platform`` * ``upload`` upload settings which depend on the ``platform``
.. code-block:: json .. code-block:: json
{ {
"myboard": { "build": {
"build": {}, "extra_flags": "-DHELLO_PLATFORMIO",
"frameworks": ["%LIST_WITH_SUPPORTED_FRAMEWORKS%"], "f_cpu": "16000000L",
"name": "My test board", "hwids": [
"platform": "%PLATFORM_TYPE_HERE%", [
"upload": {}, "0x1234",
"url": "http://example.com", "0x0013"
"vendor": "My Company Ltd." ],
} [
"0x4567",
"0x0013"
]
],
"mcu": "%MCU_TYPE_HERE%"
},
"frameworks": ["%LIST_WITH_SUPPORTED_FRAMEWORKS%"],
"name": "My Test Board",
"upload": {
"maximum_ram_size": 2048,
"maximum_size": 32256
},
"url": "http://example.com",
"vendor": "MyCompany"
} }
Installation Installation
------------ ------------
1. Create ``boards`` directory in :ref:`projectconf_pio_home_dir` if it 1. Create ``boards`` directory in :ref:`projectconf_pio_home_dir` if it
doesn't exist. doesn't exist.
2. Create ``my_own_boards.json`` file and put to ``boards`` directory. 2. Create ``myboard.json`` file and put to ``boards`` directory.
3. Search available boards via :ref:`cmd_boards` command. You should see 3. Search available boards via :ref:`cmd_boards` command. You should see
``myboard`` board. ``myboard`` board.
@ -68,5 +83,6 @@ Now, you can use ``myboard`` for the :ref:`projectconf_env_board` option in
Examples Examples
-------- --------
For the examples, please look into built-in ``*.json`` files with boards Please take a look at the source code of
settings: https://github.com/platformio/platformio/tree/develop/platformio/boards. `PlatformIO Development Platforms <https://github.com/platformio?query=platform->`_
and navigate to ``boards`` folder of the repository.

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -14,7 +14,7 @@
Custom Development Platform Custom Development Platform
=========================== ===========================
*PlatformIO* was developed like a tool which would build the same source code *PlatformIO* was developed like a tool that may build the same source code
for the different development platforms via single command :ref:`cmd_run` for the different development platforms via single command :ref:`cmd_run`
without any dependent software or requirements. without any dependent software or requirements.
@ -32,7 +32,7 @@ different/own build scripts, uploader and etc.
**Step-by-Step Manual** **Step-by-Step Manual**
1. Chose :ref:`platform_creating_packages` for platform 1. Choose :ref:`platform_creating_packages` for platform
2. Create :ref:`platform_creating_manifest_file` 2. Create :ref:`platform_creating_manifest_file`
3. Create :ref:`platform_creating_build_script` 3. Create :ref:`platform_creating_build_script`
4. Finish with the :ref:`platform_creating_installation`. 4. Finish with the :ref:`platform_creating_installation`.
@ -56,7 +56,7 @@ Packages
* - ``framework-arduinoavr`` * - ``framework-arduinoavr``
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_ - `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``framework-arduinoespressif`` * - ``framework-arduinoespressif8266``
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_ - `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
* - ``framework-arduinointel`` * - ``framework-arduinointel``
@ -187,89 +187,79 @@ Packages
.. _platform_creating_manifest_file: .. _platform_creating_manifest_file:
Manifest File Manifest File ``platform.json``
------------- -------------------------------
A platform manifest file is a `Python <https://www.python.org>`_ script with the .. code-block:: json
next requirements:
1. The file should have ``.py`` extension {
2. The **name of the file** is the **platform name** (lowercase) "name": "myplatform",
3. The source code of this file should contain a ``class`` which describes your "title": "My Platform",
own platform. The name of the ``class`` should start with your "description": "My custom development platform",
**platform name** (the first letter should be capitalized) + ``Platform`` "url": "http://example.com",
ending. This ``class`` should be derived from *PlatformIO* ``BasePlatform`` "homepage": "http://platformio.org/platforms/myplatform",
class. "license": "Apache-2.0",
"engines": {
.. warning:: "platformio": "~3.0.0",
If you are new to *Python* language, please read: "scons": ">=2.3.0,<2.6.0"
},
* `Style Guide for Python Code <https://www.python.org/dev/peps/pep-0008>`_. "repository": {
* A hash sign (#) that is not inside a string literal begins a comment. "type": "git",
All characters after the # and up to the physical line end are part "url": "https://github.com/platformio/platform-myplatform.git"
of the comment and the *Python* interpreter ignores them. },
"version": "0.0.0",
Example of the **test** platform (``test.py``): "packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
.. code-block:: python "https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download",
"http://dl.platformio.org/packages/manifest.json",
import os {
"framework-%FRAMEWORK_NAME_1%": [
from platformio.platforms.base import BasePlatform {
"url": "http://dl.example.com/packages/framework-%FRAMEWORK_NAME_1%-1.10607.0.tar.gz",
class TestPlatform(BasePlatform): "sha1": "adce2cd30a830d71cb6572575bf08461b7b73c07",
# This is a description of your platform. "version": "1.10607.0",
# Platformio uses it for the `platformio search / list` commands "system": "*"
"""
My Test platform - test.py
"""
PACKAGES = {
"toolchain-foo": {
# alias is used for quick access to package.
# For example,
# `> platformio install test --without-package=toolchain`
"alias": "toolchain",
# Flag which allows PlatformIO to install this package by
# default via `> platformio install test` command
"default": True
},
"tool-bar": {
"alias": "uploader",
"default": True
},
"framework-baz": {
"default": True
} }
]
} }
],
def get_build_script(self): "frameworks": {
""" Returns a path to build script """ "%FRAMEWORK_NAME_1%": {
"package": "framework-%FRAMEWORK_NAME_1%",
# You can return static path "script": "builder/frameworks/%FRAMEWORK_NAME_1%.py"
#return "/path/to/test-builder.py" },
"%FRAMEWORK_NAME_N%": {
# or detect dynamically if `test-builder.py` is located in the same "package": "framework-%FRAMEWORK_NAME_N%",
# folder with `test.py` "script": "builder/frameworks/%FRAMEWORK_NAME_N%.py"
return os.path.join( }
os.path.dirname(os.path.realpath(__file__)), },
"test-builder.py" "packages": {
) "toolchain-gccarmnoneeabi": {
"type": "toolchain",
"version": ">=1.40803.0,<1.40805.0"
},
"framework-%FRAMEWORK_NAME_1%": {
"type": "framework",
"optional": true,
"version": "~1.10607.0"
},
"framework-%FRAMEWORK_NAME_N%": {
"type": "framework",
"optional": true,
"version": "~1.117.0"
}
}
}
.. _platform_creating_build_script: .. _platform_creating_build_script:
Build Script Build Script ``main.py``
------------ ------------------------
Platform's build script is based on a next-generation build tool named Platform's build script is based on a next-generation build tool named
`SCons <http://www.scons.org>`_. PlatformIO has own built-in firmware builder `SCons <http://www.scons.org>`_. PlatformIO has own built-in firmware builder
``env.BuildProgram`` with the nested libraries search. Please look into a ``env.BuildProgram`` with the deep libraries search. Please look into a
base template of ``test-builder.py``. base template of ``main.py``.
.. code-block:: python .. code-block:: python
@ -347,15 +337,6 @@ base template of ``test-builder.py``.
Default(target_bin) Default(target_bin)
Please look into the examples with built-in scripts for the popular
platforms:
* `baseavr.py <https://github.com/platformio/platformio/blob/develop/platformio/builder/scripts/baseavr.py>`_
* `basearm.py <https://github.com/platformio/platformio/blob/develop/platformio/builder/scripts/basearm.py>`_
* `atmelavr.py <https://github.com/platformio/platformio/blob/develop/platformio/builder/scripts/atmelavr.py>`_
* `timsp430.py <https://github.com/platformio/platformio/blob/develop/platformio/builder/scripts/timsp430.py>`_
* `ststm32.py <https://github.com/platformio/platformio/blob/develop/platformio/builder/scripts/ststm32.py>`_
.. _platform_creating_installation: .. _platform_creating_installation:
Installation Installation
@ -363,126 +344,17 @@ Installation
1. Create ``platforms`` directory in :ref:`projectconf_pio_home_dir` if it 1. Create ``platforms`` directory in :ref:`projectconf_pio_home_dir` if it
doesn't exist. doesn't exist.
2. Copy ``test.py`` and ``test-builder.py`` files to ``platforms`` directory. 2. Create ``myplatform`` directory in ``platforms``
3. Search available platforms via :ref:`cmd_platforms_search` command. You should see 3. Copy ``platform.json`` and ``builder/main.py`` files to ``myplatform`` directory.
``test`` platform. 4. Search available platforms via :ref:`cmd_platform_search` command. You
4. Install ``test`` platform via :ref:`cmd_platforms_install` command. should see ``myplatform`` platform.
5. Install ``myplatform`` platform via :ref:`cmd_platform_install` command.
Now, you can use ``test`` for the :ref:`projectconf_env_platform` option in Now, you can use ``myplatform`` for the :ref:`projectconf_env_platform`
:ref:`projectconf`. option in :ref:`projectconf`.
Example Examples
------- --------
Let's use the real example which was requested by our user in `issue 175 <https://github.com/platformio/platformio/issues/175>`_. Need to add support for uploading firmware using GDB to
:ref:`platform_ststm32`.
First of all, need to create new folder ``platforms`` in :ref:`projectconf_pio_home_dir`
and copy there two files:
1. Platform manifest file ``ststm32gdb.py`` with the next content:
.. code-block:: python
import os
from platformio.platforms.ststm32 import Ststm32Platform
class Ststm32gdbPlatform(Ststm32Platform):
"""
ST STM32 using GDB as uploader
http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32
"""
def get_build_script(self):
return os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"ststm32gdb-builder.py"
)
2. Build script file ``ststm32gdb-builder.py`` with the next content:
.. code-block:: python
"""
Builder for ST STM32 Series ARM microcontrollers with GDB upload.
"""
from os.path import join
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
DefaultEnvironment, SConscript)
env = DefaultEnvironment()
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
env.Replace(
UPLOADER=join(
"$PIOPACKAGES_DIR", "toolchain-gccarmnoneeabi",
"bin", "arm-none-eabi-gdb"
),
UPLOADERFLAGS=[
join("$BUILD_DIR", "firmware.elf"),
"-batch",
"-x", join("$PROJECT_DIR", "upload.gdb")
],
UPLOADCMD="$UPLOADER $UPLOADERFLAGS"
)
env.Append(
CPPDEFINES=[
"${BOARD_OPTIONS['build']['variant'].upper()}"
],
LINKFLAGS=[
"-nostartfiles",
"-nostdlib"
]
)
#
# Target: Build executable and linkable firmware
#
target_elf = env.BuildProgram()
#
# Target: Build the .bin file
#
if "uploadlazy" in COMMAND_LINE_TARGETS:
target_firm = join("$BUILD_DIR", "firmware.bin")
else:
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
#
# Target: Print binary size
#
target_size = env.Alias("size", target_elf, "$SIZEPRINTCMD")
AlwaysBuild(target_size)
#
# Target: Upload by default .bin file
#
upload = env.Alias(
["upload", "uploadlazy"], target_firm, "$UPLOADCMD")
AlwaysBuild(upload)
#
# Target: Define targets
#
Default([target_firm, target_size])
Now, we should see ``ststm32gdb`` platform using :ref:`cmd_platforms_search` command output
and can install it via :ref:`platformio platforms install ststm32gdb <cmd_platforms_install>` command.
Please take a look at the source code of
`PlatformIO Development Platforms <https://github.com/platformio?query=platform->`_.

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -137,7 +137,7 @@ Adafruit
* - ``protrinket3ftdi`` * - ``protrinket3ftdi``
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_ - `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P - ATMEGA328P
- 16 MHz - 12 MHz
- 32 Kb - 32 Kb
- 2 Kb - 2 Kb
@ -1123,6 +1123,26 @@ Fubarino
- 512 Kb - 512 Kb
- 128 Kb - 128 Kb
Generic
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``bluepill_f103c8``
- `BluePill F103C8 <http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html>`_
- STM32F103C8T6
- 72 MHz
- 64 Kb
- 20 Kb
Generic ATTiny Generic ATTiny
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -9,10 +9,10 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
.. _platform_espressif: .. _platform_espressif8266:
Platform ``espressif`` Platform ``espressif8266``
====================== ==========================
Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.
For more detailed information please visit `vendor site <https://espressif.com/>`_. For more detailed information please visit `vendor site <https://espressif.com/>`_.
@ -28,26 +28,26 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``toolchain-xtensa`` * - ``framework-arduinoespressif8266``
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
* - ``framework-simba`` * - ``framework-simba``
- `Simba Framework <https://github.com/eerimoq/simba>`_ - `Simba Framework <https://github.com/eerimoq/simba>`_
* - ``sdk-esp8266``
- `ESP8266 SDK <http://bbs.espressif.com>`_
* - ``tool-esptool`` * - ``tool-esptool``
- `esptool-ck <https://github.com/igrr/esptool-ck>`_ - `esptool-ck <https://github.com/igrr/esptool-ck>`_
* - ``tool-mkspiffs`` * - ``tool-mkspiffs``
- `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_ - `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_
* - ``framework-arduinoespressif`` * - ``tool-scons``
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_ - `SCons software construction tool <http://www.scons.org>`_
* - ``ldscripts`` * - ``toolchain-xtensa``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``sdk-esp8266``
- `ESP8266 SDK <http://bbs.espressif.com>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
@ -386,4 +386,4 @@ WeMos
- 4096 Kb - 4096 Kb
- 80 Kb - 80 Kb
.. include:: espressif_extra.rst .. include:: espressif8266_extra.rst

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -17,7 +17,7 @@ See :ref:`projectconf_board_f_cpu` option from :ref:`projectconf`
.. code-block:: ini .. code-block:: ini
[env:myenv] [env:myenv]
# set frequency to 160MHz ; set frequency to 160MHz
board_f_cpu = 160000000L board_f_cpu = 160000000L
Custom FLASH Frequency Custom FLASH Frequency
@ -34,7 +34,7 @@ values:
.. code-block:: ini .. code-block:: ini
[env:myenv] [env:myenv]
# set frequency to 80MHz ; set frequency to 80MHz
board_f_flash = 80000000L board_f_flash = 80000000L
Custom FLASH Mode Custom FLASH Mode
@ -181,7 +181,7 @@ For the full list with available options please run
.. code-block:: bash .. code-block:: bash
~/.platformio/packages/framework-arduinoespressif/tools/espota.py -h ~/.platformio/packages/framework-arduinoespressif8266/tools/espota.py -h
Usage: espota.py [options] Usage: espota.py [options]
@ -221,9 +221,20 @@ Using Arduino Framework with Staging version
-------------------------------------------- --------------------------------------------
1. Clone/Copy `main repository <https://github.com/esp8266/Arduino>`_ to 1. Clone/Copy `main repository <https://github.com/esp8266/Arduino>`_ to
:ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif`` :ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif8266``
and create new file ``packages/framework-arduinoespressif/version.txt`` and create new file ``packages/framework-arduinoespressif8266/package.json``
with the new version (for example, ``2.2.0``). with the next contents (you can specify own version if you want)
.. code-block:: json
{
"description":"Arduino Wiring-based Framework (ESP8266 Core)",
"name":"framework-arduinoespressif8266",
"system":"all",
"url":"https://github.com/esp8266/Arduino",
"version":"1.20300.0"
}
2. Try to build project 2. Try to build project
3. If you see build errors, then try to build this project using the same 3. If you see build errors, then try to build this project using the same
``stage`` on Arduino IDE ``stage`` on Arduino IDE
@ -240,6 +251,8 @@ Using Arduino Framework with Staging version
Articles Articles
-------- --------
* Sep 2, 2016 - **Tinkerman** `Optimizing files for SPIFFS with Gulp <http://tinkerman.cat/optimizing-files-for-spiffs-with-gulp/>`_
* Jul 15, 2016 - **Jaime** - `ESP8266 Mobile Rick Roll Captive Portal <https://hackaday.io/project/12709-esp8266-mobile-rick-roll-captive-portal>`_
* Jun 13, 2016 - **Daniel Eichhorn** - `New Weather Station Demo on Github <http://blog.squix.org/2016/06/new-weather-station-demo-on-github.html>`_ * Jun 13, 2016 - **Daniel Eichhorn** - `New Weather Station Demo on Github <http://blog.squix.org/2016/06/new-weather-station-demo-on-github.html>`_
* Jun 3, 2016 - **Daniel Eichhorn** - `ESP8266: Continuous Delivery Pipeline Push To Production <http://blog.squix.org/2016/06/esp8266-continuous-delivery-pipeline-push-to-production.html>`_ * Jun 3, 2016 - **Daniel Eichhorn** - `ESP8266: Continuous Delivery Pipeline Push To Production <http://blog.squix.org/2016/06/esp8266-continuous-delivery-pipeline-push-to-production.html>`_
* May 29, 2016 - **Chris Synan** - `Reverse Engineer RF Remote Controller for IoT! <http://www.instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT/?ALLSTEPS>`_ * May 29, 2016 - **Chris Synan** - `Reverse Engineer RF Remote Controller for IoT! <http://www.instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT/?ALLSTEPS>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -31,6 +31,9 @@ Packages
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi`` * - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -30,7 +30,7 @@ Embedded
atmelavr atmelavr
atmelsam atmelsam
espressif espressif8266
freescalekinetis freescalekinetis
intel_arc32 intel_arc32
lattice_ice40 lattice_ice40

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -34,6 +34,9 @@ Packages
* - ``tool-arduino101load`` * - ``tool-arduino101load``
- `Genuino101 uploader <https://github.com/01org/intel-arduino-tools>`_ - `Genuino101 uploader <https://github.com/01org/intel-arduino-tools>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-intelarc32`` * - ``toolchain-intelarc32``
- `GCC for Intel ARC <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain>`_ - `GCC for Intel ARC <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,6 +28,9 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-icestorm`` * - ``toolchain-icestorm``
- `GCC for FPGA IceStorm <http://www.clifford.at/icestorm/>`_ - `GCC for FPGA IceStorm <http://www.clifford.at/icestorm/>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -31,6 +31,9 @@ Packages
* - ``framework-wiringpi`` * - ``framework-wiringpi``
- `GPIO Interface library for the Raspberry Pi <http://wiringpi.com>`_ - `GPIO Interface library for the Raspberry Pi <http://wiringpi.com>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmlinuxgnueabi`` * - ``toolchain-gccarmlinuxgnueabi``
- `GCC for Linux ARM GNU EABI <https://gcc.gnu.org>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `GCC for Linux ARM GNU EABI <https://gcc.gnu.org>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,5 +28,8 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gcclinux32`` * - ``toolchain-gcclinux32``
- `GCC for Linux i686 <https://gcc.gnu.org>`_ - `GCC for Linux i686 <https://gcc.gnu.org>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -15,7 +15,7 @@ Platform ``linux_x86_64``
========================= =========================
Linux x86_64 (64-bit) is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. Using host OS (Mac OS X or Linux 64-bit) you can build native application for Linux x86_64 platform. Linux x86_64 (64-bit) is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. Using host OS (Mac OS X or Linux 64-bit) you can build native application for Linux x86_64 platform.
For more detailed information please visit `vendor site <http://platformio.org/platforms/linux_i686>`_. For more detailed information please visit `vendor site <http://platformio.org/platforms/linux_x86_64>`_.
.. contents:: .. contents::
@ -28,5 +28,8 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gcclinux64`` * - ``toolchain-gcclinux64``
- `GCC for Linux x86_64 <https://gcc.gnu.org>`_ - `GCC for Linux x86_64 <https://gcc.gnu.org>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -31,12 +31,15 @@ Packages
* - ``framework-arduinomicrochippic32`` * - ``framework-arduinomicrochippic32``
- `Arduino Wiring-based Framework (PIC32 Core) <https://github.com/chipKIT32/chipKIT-core>`_ - `Arduino Wiring-based Framework (PIC32 Core) <https://github.com/chipKIT32/chipKIT-core>`_
* - ``toolchain-microchippic32``
- `GCC for Microchip PIC32 <https://github.com/chipKIT32/chipKIT-cxx>`_
* - ``tool-pic32prog`` * - ``tool-pic32prog``
- `pic32prog <https://github.com/sergev/pic32prog>`_ - `pic32prog <https://github.com/sergev/pic32prog>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-microchippic32``
- `GCC for Microchip PIC32 <https://github.com/chipKIT32/chipKIT-cxx>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file). `99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -17,4 +17,16 @@ Native development platform is intended to be used for desktop OS. This platform
For more detailed information please visit `vendor site <http://platformio.org/platforms/native>`_. For more detailed information please visit `vendor site <http://platformio.org/platforms/native>`_.
.. contents:: .. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,20 +28,23 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``framework-arduinonordicnrf51``
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-rfdloader`` * - ``tool-rfdloader``
- `rfdloader <https://github.com/RFduino/RFduino>`_ - `rfdloader <https://github.com/RFduino/RFduino>`_
* - ``toolchain-gccarmnoneeabi`` * - ``tool-scons``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `SCons software construction tool <http://www.scons.org>`_
* - ``tool-sreccat`` * - ``tool-sreccat``
- `Merging tool <https://github.com/marcows/SRecord>`_ - `Merging tool <https://github.com/marcows/SRecord>`_
* - ``framework-arduinonordicnrf51`` * - ``toolchain-gccarmnoneeabi``
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -9,6 +9,11 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
Articles
--------
* Aug 28, 2016 - **Tom Parker** `Using the BBC micro:bit with PlatformIO <http://www.lshift.net/blog/2016/08/28/using-the-bbc-microbit-with-platformio/>`_
Examples Examples
-------- --------

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -31,6 +31,9 @@ Packages
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi`` * - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -31,6 +31,9 @@ Packages
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi`` * - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,26 +28,26 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-stlink``
- `ST-Link <https://github.com/texane/stlink>`_
* - ``framework-spl``
- `Standard Peripheral Library for STM32 MCUs <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`_
* - ``framework-cmsis`` * - ``framework-cmsis``
- `Vendor-independent hardware abstraction layer for the Cortex-M processor series <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_ - `Vendor-independent hardware abstraction layer for the Cortex-M processor series <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_
* - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``ldscripts`` * - ``framework-spl``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `Standard Peripheral Library for STM32 MCUs <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``tool-stlink``
- `ST-Link <https://github.com/texane/stlink>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
@ -73,12 +73,12 @@ Frameworks
* - :ref:`framework_libopencm3` * - :ref:`framework_libopencm3`
- The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. - The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
* - :ref:`framework_spl` * - :ref:`framework_spl`
- The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers. - The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
Boards Boards
------ ------
@ -142,6 +142,26 @@ Armstrap
- 512 Kb - 512 Kb
- 192 Kb - 192 Kb
Generic
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``bluepill_f103c8``
- `BluePill F103C8 <http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html>`_
- STM32F103C8T6
- 72 MHz
- 64 Kb
- 20 Kb
MultiTech MultiTech
~~~~~~~~~ ~~~~~~~~~

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -31,20 +31,20 @@ Packages
* - ``framework-arduinoteensy`` * - ``framework-arduinoteensy``
- `Arduino Wiring-based Framework <http://arduino.cc/en/Reference/HomePage>`_ - `Arduino Wiring-based Framework <http://arduino.cc/en/Reference/HomePage>`_
* - ``tool-teensy``
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``tool-teensy``
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
* - ``toolchain-atmelavr`` * - ``toolchain-atmelavr``
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_ - `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_
* - ``ldscripts`` * - ``toolchain-gccarmnoneeabi``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,17 +28,20 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``toolchain-timsp430`` * - ``framework-arduinomsp430``
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
* - ``tool-mspdebug``
- `MSPDebug <http://mspdebug.sourceforge.net/>`_
* - ``framework-energiamsp430`` * - ``framework-energiamsp430``
- `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_ - `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_
* - ``framework-arduinomsp430`` * - ``tool-mspdebug``
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_ - `MSPDebug <http://mspdebug.sourceforge.net/>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-timsp430``
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,20 +28,20 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``ldscripts`` * - ``framework-energiativa``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
* - ``framework-libopencm3`` * - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_ - `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-lm4flash`` * - ``tool-lm4flash``
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_ - `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
* - ``framework-energiativa`` * - ``tool-scons``
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_ - `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
@ -61,12 +61,12 @@ Frameworks
* - Name * - Name
- Description - Description
* - :ref:`framework_energia`
- Energia Wiring-based framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before.
* - :ref:`framework_libopencm3` * - :ref:`framework_libopencm3`
- The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. - The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others.
* - :ref:`framework_energia`
- Energia Wiring-based framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before.
Boards Boards
------ ------

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -28,5 +28,8 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccmingw32`` * - ``toolchain-gccmingw32``
- `MinGW <http://www.mingw.org>`_ - `MinGW <http://www.mingw.org>`_

480
docs/plus/unit-testing.rst Normal file
View File

@ -0,0 +1,480 @@
.. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.. _unit_testing:
Unit Testing
============
.. versionadded:: 3.0 (`PlatformIO Plus <https://pioplus.com>`_)
`Unit Testing (wiki) <https://en.wikipedia.org/wiki/Unit_testing>`_
is a software testing method by which individual units of source code, sets
of one or more MCU program modules together with associated control data,
usage procedures, and operating procedures, are tested to determine whether
they are fit for use. Unit testing finds problems early in the development cycle.
PlatformIO Testing Engine supports 2 different test types:
1. **Local Test** - *[host, native]*, process test on the host machine
using :ref:`platform_native`.
2. **Embedded Test** - *[remote, hardware]*, prepare special firmware for the
target device and upload it. Run test on the embedded device and collect
results. Process test results on the host machine.
You will be able to run the same test on the different target devices
(:ref:`embedded_boards`).
PlatformIO Testing Engine consists of:
* Project builder
* Test builder
* Firmware uploader (is used only for embedded test)
* Test processor
There is special command :ref:`cmd_test` to run tests from PlatformIO Project.
It allows to process specific environments or to ignore some tests using
"Glob patterns".
Also, is possible to ignore some tests for specific environment using
:ref:`projectconf_test_ignore` option from :ref:`projectconf`.
.. contents::
Demo
----
Demo of `Local & Embedded: Calculator <https://github.com/platformio/platformio-examples/tree/develop/unit-testing/calculator>`_.
.. image:: ../_static/pioplus-unit-testing-demo.png
:target: https://youtu.be/bo3VVRZVKhA
.. _unit_testing_design:
Design
------
PlatformIO Testing Engine design is based on a few isolated components:
1. **Main program**. Contains the independent modules, procedures,
functions or methods that will be the target candidates (TC) for testing.
2. **Unit test**. This a small independent program that is intended to
re-use TC from the main program and apply tests for them.
3. **Test processor**. The set of approaches and tools that will be used
to apply test for the environments from :ref:`projectconf`.
Workflow
--------
1. Create PlatformIO project using :ref:`cmd_init` command. For Local Unit
Testing (on the host machine), need to use :ref:`platform_native`.
.. code-block:: ini
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
;
; Embedded platforms
;
[env:uno]
platform = atmelavr
framework = arduino
board = uno
[env:nodemcu]
platform = espressif8266
framework = arduino
board = nodemcuv2
;
; Local (PC, native) platforms
;
[env:local]
platform = native
2. Place source code of main program to ``src`` directory.
3. Wrap ``main()`` or ``setup()/loop()`` methods of main program in ``UNIT_TEST``
guard:
.. code-block:: c
/**
* Arduino Wiring-based Framework
*/
#ifndef UNIT_TEST
#include <Arduino.h>
void setup () {
// some code...
}
void loop () {
// some code...
}
#endif
.. code-block:: c
/**
* Generic C/C++
*/
#ifndef UNIT_TEST
int main(int argc, char **argv) {
// setup code...
while (1) {
// loop code...
}
return 0
}
#endif
4. Create ``test`` directory in the root of project. See :ref:`projectconf_pio_test_dir`.
5. Write test using :ref:`unit_testing_api`. The each test is a small
independent program with own ``main()`` or ``setup()/loop()`` methods. Also,
test should start from ``UNITY_BEGIN()`` and finish with ``UNITY_END()``.
6. Place test to ``test`` directory. If you have more than one test, split them
into sub-folders. For example, ``test/test_1/*.[c,cpp,h]``,
``test_N/*.[c,cpp,h]``, etc. If no such directory in ``test`` folder, then
PlatformIO Testing Engine will treat the source code of ``test`` folder
as SINGLE test.
7. Run tests using :ref:`cmd_test` command.
.. _unit_testing_api:
Test API
--------
The summary of `Unity Test API <https://github.com/ThrowTheSwitch/Unity#unity-test-api>`_:
* `Running Tests <https://github.com/ThrowTheSwitch/Unity#running-tests>`_
- ``RUN_TEST(func, linenum)``
* `Ignoring Tests <https://github.com/ThrowTheSwitch/Unity#ignoring-tests>`_
- ``TEST_IGNORE()``
- ``TEST_IGNORE_MESSAGE (message)``
* `Aborting Tests <https://github.com/ThrowTheSwitch/Unity#aborting-tests>`_
- ``TEST_PROTECT()``
- ``TEST_ABORT()``
* `Basic Validity Tests <https://github.com/ThrowTheSwitch/Unity#basic-validity-tests>`_
- ``TEST_ASSERT_TRUE(condition)``
- ``TEST_ASSERT_FALSE(condition)``
- ``TEST_ASSERT(condition)``
- ``TEST_ASSERT_UNLESS(condition)``
- ``TEST_FAIL()``
- ``TEST_FAIL_MESSAGE(message)``
* `Numerical Assertions: Integers <https://github.com/ThrowTheSwitch/Unity#numerical-assertions-integers>`_
- ``TEST_ASSERT_EQUAL_INT(expected, actual)``
- ``TEST_ASSERT_EQUAL_INT8(expected, actual)``
- ``TEST_ASSERT_EQUAL_INT16(expected, actual)``
- ``TEST_ASSERT_EQUAL_INT32(expected, actual)``
- ``TEST_ASSERT_EQUAL_INT64(expected, actual)``
- ``TEST_ASSERT_EQUAL_UINT(expected, actual)``
- ``TEST_ASSERT_EQUAL_UINT8(expected, actual)``
- ``TEST_ASSERT_EQUAL_UINT16(expected, actual)``
- ``TEST_ASSERT_EQUAL_UINT32(expected, actual)``
- ``TEST_ASSERT_EQUAL_UINT64(expected, actual)``
- ``TEST_ASSERT_EQUAL_HEX(expected, actual)``
- ``TEST_ASSERT_EQUAL_HEX8(expected, actual)``
- ``TEST_ASSERT_EQUAL_HEX16(expected, actual)``
- ``TEST_ASSERT_EQUAL_HEX32(expected, actual)``
- ``TEST_ASSERT_EQUAL_HEX64(expected, actual)``
- ``TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements)``
- ``TEST_ASSERT_EQUAL(expected, actual)``
- ``TEST_ASSERT_INT_WITHIN(delta, expected, actual)``
* `Numerical Assertions: Bitwise <https://github.com/ThrowTheSwitch/Unity#numerical-assertions-bitwise>`_
- ``TEST_ASSERT_BITS(mask, expected, actual)``
- ``TEST_ASSERT_BITS_HIGH(mask, actual)``
- ``TEST_ASSERT_BITS_LOW(mask, actual)``
- ``TEST_ASSERT_BIT_HIGH(mask, actual)``
- ``TEST_ASSERT_BIT_LOW(mask, actual)``
* `Numerical Assertions: Floats <https://github.com/ThrowTheSwitch/Unity#numerical-assertions-floats>`_
- ``TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)``
- ``TEST_ASSERT_EQUAL_FLOAT(expected, actual)``
- ``TEST_ASSERT_EQUAL_DOUBLE(expected, actual)``
* `String Assertions <https://github.com/ThrowTheSwitch/Unity#string-assertions>`_
- ``TEST_ASSERT_EQUAL_STRING(expected, actual)``
- ``TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len)``
- ``TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)``
- ``TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message)``
* `Pointer Assertions <https://github.com/ThrowTheSwitch/Unity#pointer-assertions>`_
- ``TEST_ASSERT_NULL(pointer)``
- ``TEST_ASSERT_NOT_NULL(pointer)``
* `Memory Assertions <https://github.com/ThrowTheSwitch/Unity#pointer-assertions>`_
- ``TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)``
Test "Blink" Project
--------------------
1. Please follow to :ref:`quickstart` and create "Blink Project". According
to the Unit Testing :ref:`unit_testing_design` it is the **Main program**.
2. Create ``test`` directory in that project (on the same level as ``src``)
and place ``test_main.cpp`` file to it (the source code is located below).
3. Wrap ``setup()`` and ``loop()`` methods of main program in ``UNIT_TEST``
guard.
4. Run tests using :ref:`cmd_test` command.
Project structure
~~~~~~~~~~~~~~~~~
.. code-block:: bash
project_dir
├── lib
│   └── readme.txt
├── platformio.ini
├── src
│   └── main.cpp
└── test
└── test_main.cpp
Source files
~~~~~~~~~~~~
* ``platformio.ini``
.. code-block:: ini
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
[env:uno]
platform = atmelavr
framework = arduino
board = uno
[env:nodemcu]
platform = espressif8266
framework = arduino
board = nodemcu
[env:teensy31]
platform = teensy
framework = arduino
board = teensy31
* ``src/main.cpp``
.. code-block:: cpp
/*
* Blink
* Turns on an LED on for one second,
* then off for one second, repeatedly.
*/
#include "Arduino.h"
#ifndef UNIT_TEST // IMPORTANT LINE!
void setup()
{
// initialize LED digital pin as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
// wait for a second
delay(1000);
}
#endif // IMPORTANT LINE!
* ``test/test_main.cpp``
.. code-block:: cpp
#include <Arduino.h>
#include <unity.h>
#ifdef UNIT_TEST
// void setUp(void) {
// // set stuff up here
// }
// void tearDown(void) {
// // clean stuff up here
// }
void test_led_builtin_pin_number(void) {
TEST_ASSERT_EQUAL(LED_BUILTIN, 13);
}
void test_led_state_high(void) {
digitalWrite(LED_BUILTIN, HIGH);
TEST_ASSERT_EQUAL(digitalRead(LED_BUILTIN), HIGH);
}
void test_led_state_low(void) {
digitalWrite(LED_BUILTIN, LOW);
TEST_ASSERT_EQUAL(digitalRead(LED_BUILTIN), LOW);
}
void setup() {
UNITY_BEGIN(); // IMPORTANT LINE!
RUN_TEST(test_led_builtin_pin_number);
pinMode(LED_BUILTIN, OUTPUT);
}
uint8_t i = 0;
uint8_t max_blinks = 5;
void loop() {
if (i < max_blinks)
{
RUN_TEST(test_led_state_high);
delay(500);
RUN_TEST(test_led_state_low);
delay(500);
i++;
}
else if (i == max_blinks) {
UNITY_END(); // stop unit testing
}
}
#endif
Test results
~~~~~~~~~~~~
.. code::
> platformio test -e nodemcu --verbose
PlatformIO Plus (https://pioplus.com) v0.1.0
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items
============================== [test::*] Building... (1/3) ==============================
[Wed Sep 7 15:16:55 2016] Processing nodemcu (platform: espressif8266, board: nodemcu, framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 34 compatible libraries
Looking for dependencies...
Project does not have dependencies
Compiling .pioenvs/nodemcu/src/main.o
Compiling .pioenvs/nodemcu/test/output_export.o
Compiling .pioenvs/nodemcu/test/test_main.o
Compiling .pioenvs/nodemcu/UnityTestLib/unity.o
Archiving .pioenvs/nodemcu/libFrameworkArduinoVariant.a
Indexing .pioenvs/nodemcu/libFrameworkArduinoVariant.a
Compiling .pioenvs/nodemcu/FrameworkArduino/Esp.o
Compiling .pioenvs/nodemcu/FrameworkArduino/FS.o
Compiling .pioenvs/nodemcu/FrameworkArduino/HardwareSerial.o
Compiling .pioenvs/nodemcu/FrameworkArduino/IPAddress.o
Archiving .pioenvs/nodemcu/libUnityTestLib.a
Indexing .pioenvs/nodemcu/libUnityTestLib.a
Compiling .pioenvs/nodemcu/FrameworkArduino/MD5Builder.o
...
Compiling .pioenvs/nodemcu/FrameworkArduino/umm_malloc/umm_malloc.o
Archiving .pioenvs/nodemcu/libFrameworkArduino.a
Indexing .pioenvs/nodemcu/libFrameworkArduino.a
Linking .pioenvs/nodemcu/firmware.elf
Calculating size .pioenvs/nodemcu/firmware.elf
text data bss dec hex filename
223500 2408 29536 255444 3e5d4 .pioenvs/nodemcu/firmware.elf
Building .pioenvs/nodemcu/firmware.bin
============================== [test::*] Uploading... (2/3) ==============================
[Wed Sep 7 15:17:01 2016] Processing nodemcu (platform: espressif8266, board: nodemcu, framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 34 compatible libraries
Looking for dependencies...
Project does not have dependencies
Linking .pioenvs/nodemcu/firmware.elf
Checking program size .pioenvs/nodemcu/firmware.elf
text data bss dec hex filename
223500 2408 29536 255444 3e5d4 .pioenvs/nodemcu/firmware.elf
Calculating size .pioenvs/nodemcu/firmware.elf
text data bss dec hex filename
223500 2408 29536 255444 3e5d4 .pioenvs/nodemcu/firmware.elf
Looking for upload port...
Auto-detected: /dev/cu.SLAB_USBtoUART
Uploading .pioenvs/nodemcu/firmware.bin
Uploading 230064 bytes from .pioenvs/nodemcu/firmware.bin to flash at 0x00000000
................................................................................ [ 35% ]
................................................................................ [ 71% ]
................................................................. [ 100% ]
=============================== [test::*] Testing... (3/3) ===============================
If you don't see any output for the first 10 secs, please reset board (press reset button)
test/test_main.cpp:41:test_led_state_high [PASSED]
test/test_main.cpp:43:test_led_state_low [PASSED]
test/test_main.cpp:41:test_led_state_high [PASSED]
test/test_main.cpp:43:test_led_state_low [PASSED]
test/test_main.cpp:41:test_led_state_high [PASSED]
test/test_main.cpp:43:test_led_state_low [PASSED]
test/test_main.cpp:41:test_led_state_high [PASSED]
test/test_main.cpp:43:test_led_state_low [PASSED]
-----------------------
11 Tests 1 Failures 0 Ignored
===================================== [TEST SUMMARY] =====================================
test:*/env:nodemcu [PASSED]
================================ [PASSED] Took 38.15 seconds ================================
Examples
--------
* `Embedded: Wiring Blink <https://github.com/platformio/platformio-examples/tree/develop/unit-testing/wiring-blink>`_
* `Local & Embedded: Calculator <https://github.com/platformio/platformio-examples/tree/develop/unit-testing/calculator>`_
For the other examples and source code please follow to
`PlatformIO Unit Testing Examples <https://github.com/platformio/platformio-examples/tree/develop/unit-testing>`_ repository.

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -18,7 +18,7 @@ The Project configuration file is named ``platformio.ini``. This is a
`INI-style <http://en.wikipedia.org/wiki/INI_file>`_ file. `INI-style <http://en.wikipedia.org/wiki/INI_file>`_ file.
``platformio.ini`` has sections (each denoted by a ``[header]``) and ``platformio.ini`` has sections (each denoted by a ``[header]``) and
key / value pairs within the sections. Lines beginning with ``#`` or ``;`` key / value pairs within the sections. Lines beginning with ``;``
are ignored and may be used to provide comments. are ignored and may be used to provide comments.
The sections and their allowable values are described below. The sections and their allowable values are described below.
@ -44,8 +44,8 @@ Options
``home_dir`` ``home_dir``
^^^^^^^^^^^^ ^^^^^^^^^^^^
Is used to store platform toolchains, frameworks, external libraries, Is used to store platform toolchains, frameworks, global libraries for
service data and etc. :ref: `ldf`, service data and etc.
A default value is User's home directory: A default value is User's home directory:
@ -60,18 +60,59 @@ This option can be overridden by global environment variable
``lib_dir`` ``lib_dir``
^^^^^^^^^^^ ^^^^^^^^^^^
This directory is used to store external libraries downloaded by You can put here your own/private libraries. The source code of each library
:ref:`librarymanager`. should be placed in separate directory, like
``lib/private_lib/[here are source files]``. This directory has the highest
priority for :ref:`ldf`.
A default value is ``%home_dir%/lib``. A default value is ``lib`` that means that folder is located in the root of
project.
This option can be overridden by global environment variable This option can be overridden by global environment variable
:envvar:`PLATFORMIO_LIB_DIR`. :envvar:`PLATFORMIO_LIB_DIR`.
.. note:: For example, see how can be organized ``Foo`` and ``Bar`` libraries:
You can put here your own/private libraries. The source code of each
library should be placed in separate directory. For example, .. code::
``%lib_dir%/private_lib/[here are source files]``.
|--lib
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| |--Foo
| | |- Foo.c
| | |- Foo.h
|- platformio.ini
|--src
|- main.c
Then in ``src/main.c`` you should use:
.. code-block:: c
#include <Foo.h>
#include <Bar.h>
// rest H/C/CPP code
PlatformIO will find your libraries automatically, configure preprocessor's
include paths and build them.
.. _projectconf_pio_libdeps_dir:
``libdeps_dir``
^^^^^^^^^^^^^^^
Internal storage where :ref:`librarymanager` will install project dependencies
(:ref:`projectconf_lib_deps`). A default value is ``.piolibdeps`` that means
that folder is located in the root of project.
This option can be overridden by global environment variable
:envvar:`PLATFORMIO_LIBDEPS_DIR`.
.. _projectconf_pio_src_dir: .. _projectconf_pio_src_dir:
@ -79,10 +120,8 @@ This option can be overridden by global environment variable
^^^^^^^^^^^ ^^^^^^^^^^^
A path to project's source directory. PlatformIO uses it for :ref:`cmd_run` A path to project's source directory. PlatformIO uses it for :ref:`cmd_run`
command. command. A default value is ``src`` that means that folder is located in the
root of project.
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 This option can be overridden by global environment variable
:envvar:`PLATFORMIO_SRC_DIR`. :envvar:`PLATFORMIO_SRC_DIR`.
@ -110,14 +149,14 @@ fast!
then PlatformIO will remove this folder automatically. It will be created on the then PlatformIO will remove this folder automatically. It will be created on the
next build operation. next build operation.
A default value is ``.pioenvs`` which means that folder is located in the root of A default value is ``.pioenvs`` that means that folder is located in the root of
project. project.
This option can be overridden by global environment variable This option can be overridden by global environment variable
:envvar:`PLATFORMIO_ENVS_DIR`. :envvar:`PLATFORMIO_ENVS_DIR`.
.. note:: .. note::
If you have any problems with building your Project environmets which If you have any problems with building your Project environments which
are defined in :ref:`projectconf`, then **TRY TO DELETE** this folder. In are defined in :ref:`projectconf`, then **TRY TO DELETE** this folder. In
this situation you will remove all cached files without any risk. this situation you will remove all cached files without any risk.
@ -127,13 +166,24 @@ This option can be overridden by global environment variable
^^^^^^^^^^^^ ^^^^^^^^^^^^
Data directory to store contents and :ref:`platform_espressif_uploadfs`. Data directory to store contents and :ref:`platform_espressif_uploadfs`.
A default value is ``data`` that means that folder is located in the root of
A default value is ``data`` which means that folder is located in the root of
project. project.
This option can be overridden by global environment variable This option can be overridden by global environment variable
:envvar:`PLATFORMIO_DATA_DIR`. :envvar:`PLATFORMIO_DATA_DIR`.
.. _projectconf_pio_test_dir:
``test_dir``
^^^^^^^^^^^^
Directory where :ref:`unit_testing` engine will look for the tests.
A default value is ``test`` that means that folder is located in the root of
project.
This option can be overridden by global environment variable
:envvar:`PLATFORMIO_TEST_DIR`.
.. _projectconf_pio_env_default: .. _projectconf_pio_env_default:
``env_default`` ``env_default``
@ -144,8 +194,8 @@ if :option:`platformio run --environment` option is not specified.
:ref:`projectconf_pio_env_default` allows to define environments which :ref:`projectconf_pio_env_default` allows to define environments which
should be processed by default. should be processed by default.
Multiple environments are allowed if they are separated with ``,`` (comma). Multiple environments are allowed if they are separated with ", "
For example. (comma+space). For example.
.. code-block:: ini .. code-block:: ini
@ -158,7 +208,7 @@ For example.
board = uno board = uno
[env:nodemcu] [env:nodemcu]
platform = espressif platform = espressif8266
framework = arduino framework = arduino
board = nodemcu board = nodemcu
@ -193,22 +243,50 @@ For example, ``[env:hello_world]``.
General options General options
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
.. contents::
:local:
.. _projectconf_env_platform: .. _projectconf_env_platform:
``platform`` ``platform``
^^^^^^^^^^^^ ^^^^^^^^^^^^
:ref:`platforms` type. :ref:`platforms` name.
PlatformIO allows to use specific version of platform using
`Semantic Versioning <http://semver.org>`_ (X.Y.Z=MAJOR.MINOR.PATCH).
Version specifications can take any of the following forms:
* ``0.1.2``: an exact version number. Use only this exact version
* ``^0.1.2``: any compatible version (exact version for ``0.x.x`` versions
* ``~0.1.2``: any version with the same major and minor versions, and an
equal or greater patch version
* ``>0.1.2``: any version greater than ``0.1.2``. ``>=``, ``<``, and ``<=``
are also possible
* ``>0.1.0,!=0.2.0,<0.3.0``: any version greater than ``0.1.0``, not equal to
``0.2.0`` and less than ``0.3.0``
Examples:
.. code-block:: ini
[env:the_latest_version]
platform = atmelavr
[env:specific_major_version]
platform = atmelavr@^0.1.2
[env:specific_major_and_minor_version]
platform = atmelavr@~0.1.2
.. _projectconf_env_framework: .. _projectconf_env_framework:
``framework`` ``framework``
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
:ref:`Framework <frameworks>` type. :ref:`frameworks` name.
The multiple frameworks are allowed, split them with comma ``,`` separator. The multiple frameworks are allowed, split them with comma+space ", ".
.. _projectconf_env_board: .. _projectconf_env_board:
@ -227,6 +305,9 @@ using `PlatformIO Embedded Boards Explorer <http://platformio.org/boards>`_.
Board options Board options
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
.. contents::
:local:
``board_mcu`` ``board_mcu``
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
@ -261,7 +342,7 @@ format of this option is ``C-like long integer`` value with ``L`` suffix. The
1 Hertz is equal to ``1L``, then 40 Mhz (Mega Hertz) is equal to ``40000000L``. 1 Hertz is equal to ``1L``, then 40 Mhz (Mega Hertz) is equal to ``40000000L``.
This option isn't available for the all development platforms. The only This option isn't available for the all development platforms. The only
:ref:`platform_espressif` supports it. :ref:`platform_espressif8266` supports it.
.. _projectconf_board_flash_mode: .. _projectconf_board_flash_mode:
@ -269,10 +350,13 @@ This option isn't available for the all development platforms. The only
^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
Flash chip interface mode. This option isn't available for the all development Flash chip interface mode. This option isn't available for the all development
platforms. The only :ref:`platform_espressif` supports it. platforms. The only :ref:`platform_espressif8266` supports it.
Building options Build options
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
.. contents::
:local:
.. _projectconf_build_flags: .. _projectconf_build_flags:
@ -356,7 +440,7 @@ Example:
build_flags = -Wl,-T/path/to/ld_script.ld build_flags = -Wl,-T/path/to/ld_script.ld
[env:exec_command] [env:exec_command]
# get VCS revision "on-the-fly" ; get VCS revision "on-the-fly"
build_flags = !echo "-DPIO_SRC_REV="$(git rev-parse HEAD) build_flags = !echo "-DPIO_SRC_REV="$(git rev-parse HEAD)
@ -388,6 +472,8 @@ but will be applied only for the project source code from
This option can be set by global environment variable This option can be set by global environment variable
:envvar:`PLATFORMIO_SRC_BUILD_FLAGS`. :envvar:`PLATFORMIO_SRC_BUILD_FLAGS`.
.. _projectconf_build_unflags:
``build_unflags`` ``build_unflags``
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
@ -416,7 +502,7 @@ be applied in theirs order.
By default, ``src_filter`` is predefined to By default, ``src_filter`` is predefined to
``+<*> -<.git/> -<svn/> -<example/> -<examples/> -<test/> -<tests/>``, ``+<*> -<.git/> -<svn/> -<example/> -<examples/> -<test/> -<tests/>``,
which means "includes ALL files, then that means "includes ALL files, then
exclude ``.git`` and ``svn`` repository folders, ``example`` ... folder. exclude ``.git`` and ``svn`` repository folders, ``example`` ... folder.
This option can be set by global environment variable This option can be set by global environment variable
@ -427,6 +513,9 @@ This option can be set by global environment variable
``extra_script`` ``extra_script``
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
.. contents::
:local:
Allows to launch extra script using `SCons <http://www.scons.org>`_ software Allows to launch extra script using `SCons <http://www.scons.org>`_ software
construction tool. For more details please follow to "Construction Environments" construction tool. For more details please follow to "Construction Environments"
section of section of
@ -435,13 +524,23 @@ section of
This option can be set by global environment variable This option can be set by global environment variable
:envvar:`PLATFORMIO_EXTRA_SCRIPT`. :envvar:`PLATFORMIO_EXTRA_SCRIPT`.
Take a look at the multiple snippets/answers for the user questions:
- `#462 Split C/C++ build flags <https://github.com/platformio/platformio/issues/462#issuecomment-172667342>`_
- `#365 Extra configuration for ESP8266 uploader <https://github.com/platformio/platformio/issues/365#issuecomment-163695011>`_
- `#351 Specific reset method for ESP8266 <https://github.com/platformio/platformio/issues/351#issuecomment-161789165>`_
- `#247 Specific options for avrdude <https://github.com/platformio/platformio/issues/247#issuecomment-118169728>`_.
Custom Uploader
'''''''''''''''
Example, specify own upload command for :ref:`platform_atmelavr`: Example, specify own upload command for :ref:`platform_atmelavr`:
``platformio.ini``: ``platformio.ini``:
.. code-block:: ini .. code-block:: ini
[env:env_with_specific_extra_script] [env:env_custom_uploader]
platform = atmelavr platform = atmelavr
extra_script = /path/to/extra_script.py extra_script = /path/to/extra_script.py
custom_option = hello custom_option = hello
@ -450,9 +549,7 @@ Example, specify own upload command for :ref:`platform_atmelavr`:
.. code-block:: python .. code-block:: python
from SCons.Script import DefaultEnvironment Import('env')
env = DefaultEnvironment()
env.Replace(UPLOADHEXCMD='"$UPLOADER" ${ARGUMENTS.get("custom_option")} --uploader --flags') env.Replace(UPLOADHEXCMD='"$UPLOADER" ${ARGUMENTS.get("custom_option")} --uploader --flags')
@ -460,14 +557,52 @@ Example, specify own upload command for :ref:`platform_atmelavr`:
# print env.Dump() # print env.Dump()
# print ARGUMENTS # print ARGUMENTS
Before/Pre and After/Post actions
'''''''''''''''''''''''''''''''''
* see built-in examples of `PlatformIO build scripts <https://github.com/platformio/platformio/tree/develop/platformio/builder/scripts>`_. PlatformIO Build System has rich API that allows to attach different pre-/post
* take a look at the multiple snippets/answers for the user questions: actions (hooks) using ``env.AddPreAction(target, callback)`` function. A first
argument ``target`` can be a name of target that is passed using
:option:`platformio run --target` command or path to file which PlatformIO
processes (ELF, HEX, BIN, etc.). For example, to call function before HEX file
will be created, need to use as a ``$BUILD_DIR/firmware.hex`` target value.
- `#462 Split C/C++ build flags <https://github.com/platformio/platformio/issues/462#issuecomment-172667342>`_ The example below demonstrates how to call different functions
- `#365 Extra configuration for ESP8266 uploader <https://github.com/platformio/platformio/issues/365#issuecomment-163695011>`_ when :option:`platformio run --target` is called with ``upload`` value.
- `#351 Specific reset method for ESP8266 <https://github.com/platformio/platformio/issues/351#issuecomment-161789165>`_ `extra_script.py` file is located on the same level as ``platformio.ini``.
- `#247 Specific options for avrdude <https://github.com/platformio/platformio/issues/247#issuecomment-118169728>`_.
``platformio.ini``:
.. code-block:: ini
[env:pre_and_post_hooks]
extra_script = extra_script.py
``extra_script.py``:
.. code-block:: python
Import("env")
def before_upload(source, target, env):
print "before_upload"
# do some actions
def after_upload(source, target, env):
print "after_upload"
# do some actions
print "Current build targets", map(str, BUILD_TARGETS)
# env.AddPreAction("$BUILD_DIR/firmware.elf", callback...)
# env.AddPostAction("$BUILD_DIR/firmware.hex", callback...)
env.AddPreAction("upload", before_upload)
env.AddPostAction("upload", after_upload)
.. _projectconf_targets:
``targets`` ``targets``
^^^^^^^^^^^ ^^^^^^^^^^^
@ -485,14 +620,17 @@ The list with available targets is located in :option:`platformio run --target`.
# clean project # clean project
platformio run -t clean platformio run -t clean
# dump curent build environment # dump current build environment
platformio run --target envdump platformio run --target envdump
When no targets are defined, *PlatformIO* will build only sources by default. When no targets are defined, *PlatformIO* will build only sources by default.
Uploading options Upload options
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
.. contents::
:local:
.. _projectconf_upload_port: .. _projectconf_upload_port:
@ -509,7 +647,7 @@ This option is used by "uploader" tool when sending firmware to board via
If ``upload_port`` isn't specified, then *PlatformIO* will try to detect it If ``upload_port`` isn't specified, then *PlatformIO* will try to detect it
automatically. automatically.
To print all available serial ports use :ref:`cmd_serialports` command. To print all available serial ports use :ref:`cmd_device` command.
This option can be set by global environment variable This option can be set by global environment variable
:envvar:`PLATFORMIO_UPLOAD_PORT`. :envvar:`PLATFORMIO_UPLOAD_PORT`.
@ -544,70 +682,201 @@ This option can be set by global environment variable
^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
Specify reset method for "uploader" tool. This option isn't available for all Specify reset method for "uploader" tool. This option isn't available for all
development platforms. The only :ref:`platform_espressif` supports it. development platforms. The only :ref:`platform_espressif8266` supports it.
Library options Library options
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
``lib_install`` .. contents::
^^^^^^^^^^^^^^^ :local:
Specify dependent libraries which should be installed before environment .. _projectconf_lib_deps:
process. The only library IDs are allowed. Multiple libraries can be passed
using comma ``,`` sign.
You can obtain library IDs using :ref:`cmd_lib_search` command. ``lib_deps``
^^^^^^^^^^^^
.. versionadded:: 3.0
.. seealso::
Please make sure to read :ref:`ldf` guide first.
Specify project dependencies that should be installed automatically to
:ref:`projectconf_pio_libdeps_dir` before environment processing.
Multiple dependencies are allowed (multi-lines or separated with comma+space ", ").
**Valid forms**
.. code-block:: ini
[env:myenv]
lib_deps = LIBRARY_1, LIBRARY_2, LIBRARY_N
[env:myenv2]
lib_deps =
LIBRARY_1
LIBRARY_2
LIBRARY_N
The each line with ``LIBRARY_1... LIBRARY_N`` will be passed automatically to
:ref:`cmd_lib_install` command. Please follow to :ref:`cmd_lib_install` for
detailed documentation about possible values.
Example: Example:
.. code-block:: ini .. code-block:: ini
[env:depends_on_some_libs] [env:depends_on_some_libs]
lib_install = 1,13,19 lib_deps =
13
PubSubClient
Json@~5.6,!=5.4
https://github.com/gioblu/PJON.git@v2.0
https://github.com/me-no-dev/ESPAsyncTCP.git
``lib_use`` .. _projectconf_lib_force:
^^^^^^^^^^^
Specify libraries which should be used by ``Library Dependency Finder (LDF)`` with ``lib_force``
the highest priority. ^^^^^^^^^^^^^
.. seealso::
Please make sure to read :ref:`ldf` guide first.
Force Library Dependency Finder to depend on the specified library if it even
is not included in the project source code. Also, this library will be
processed in the first order.
The correct value for this option is library name (not folder name). In the
most cases, library name is pre-defined in manifest file
(:ref:`library_config`, ``library.properties``, ``module.json``). The multiple
library names are allowed, split them with comma+space ", ".
Example: Example:
.. code-block:: ini .. code-block:: ini
[env:libs_with_highest_priority] [env:myenv]
lib_use = OneWire_ID1,SPI lib_force = OneWire, SPI
.. _projectconf_lib_ignore:
``lib_ignore`` ``lib_ignore``
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
Specify libraries which should be ignored by ``Library Dependency Finder (LDF)`` .. seealso::
Please make sure to read :ref:`ldf` guide first.
Specify libraries which should be ignored by Library Dependency Finder.
The correct value for this option is library name (not
folder name). In the most cases, library name is pre-defined in manifest file
(:ref:`library_config`, ``library.properties``, ``module.json``). The multiple
library names are allowed, split them with comma+space ", ".
Example: Example:
.. code-block:: ini .. code-block:: ini
[env:ignore_some_libs] [env:ignore_some_libs]
lib_ignore = SPI,EngduinoV3_ID123 lib_ignore = SPI, Ethernet
``lib_dfcyclic`` .. _projectconf_lib_extra_dirs:
^^^^^^^^^^^^^^^^
Control cyclic (recursive) behavior for ``Library Dependency Finder (LDF)``. ``lib_extra_dirs``
By default, this option is turned OFF (``lib_dfcyclic=False``) and means that ^^^^^^^^^^^^^^^^^^
``LDF`` will find only libraries which are included in source files from the
project :ref:`projectconf_pio_src_dir`.
If you want to enable cyclic (recursive, nested) search, please set this option .. versionadded:: 3.0
to ``True``. Founded library will be treated like a new source files and .. seealso::
``LDF`` will search dependencies for it. Please make sure to read :ref:`ldf` guide first.
A list with extra directories/storages where :ref:`ldf` will
look for dependencies. Multiple paths are allowed. Please separate them
using comma+space ", ".
This option can be set by global environment variable
:envvar:`PLATFORMIO_LIB_EXTRA_DIRS`.
.. warning::
This is a not direct path to library with source code. It should be the path
to storage that contains libraries grouped by folders. For example,
``/extra/lib/storage/`` but not ``/extra/lib/storage/MyLibrary``.
Example: Example:
.. code-block:: ini .. code-block:: ini
[env:libs_with_enabled_ldf_cyclic] [env:custom_lib_dirs]
lib_dfcyclic = True lib_extra_dirs = /path/to/private/dir1,/path/to/private/dir2
.. _projectconf_lib_ldf_mode:
``lib_ldf_mode``
^^^^^^^^^^^^^^^^
.. versionadded:: 3.0
.. seealso::
Please make sure to read :ref:`ldf` guide first.
This option specifies how does Library Dependency Finder should analyze
dependencies (``#include`` directives). See :ref:`ldf_mode` for details.
.. _projectconf_lib_compat_mode:
``lib_compat_mode``
^^^^^^^^^^^^^^^^^^^
.. versionadded:: 3.0
.. seealso::
Please make sure to read :ref:`ldf` guide first.
Library compatibility mode allows to control strictness of Library Dependency
Finder. More details :ref:`ldf_compat_mode`.
By default, this value is set to ``lib_compat_mode = 1`` and means that LDF
will check only for framework compatibility.
Test options
~~~~~~~~~~~~
.. contents::
:local:
.. _projectconf_test_ignore:
``test_ignore``
^^^^^^^^^^^^^^^
.. versionadded:: 3.0
.. seealso::
Please make sure to read :ref:`unit_testing` guide first.
Ignore tests where the name matches specified patterns. Multiple names are
allowed. Please separate them using comma+space ", ". Also, you can
ignore some tests using :option:`platformio test --ignore` command.
.. list-table::
:header-rows: 1
* - Pattern
- Meaning
* - ``*``
- matches everything
* - ``?``
- matches any single character
* - ``[seq]``
- matches any character in seq
* - ``[!seq]``
- matches any character not in seq
**Example**
.. code-block:: ini
[env:myenv]
test_ignore = footest, bartest_*, test[13]
----------- -----------
@ -631,7 +900,7 @@ Examples
framework = arduino framework = arduino
board = uno board = uno
# enable auto-uploading ; enable auto-uploading
targets = upload targets = upload
@ -646,12 +915,12 @@ Examples
board_f_cpu = 16000000L board_f_cpu = 16000000L
upload_port = /dev/ttyUSB0 upload_port = /dev/ttyUSB0
# for Windows OS ; for Windows OS
# upload_port = COM3 ; upload_port = COM3
upload_protocol = arduino upload_protocol = arduino
upload_speed = 19200 upload_speed = 19200
# enable auto-uploading ; enable auto-uploading
targets = upload targets = upload

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -82,11 +82,10 @@ According to the table above the ID/TYPE for Teensy 3.1 is ``teensy31``. Also,
the ID for Arduino UNO is ``uno`` and for NodeMCU 1.0 (ESP-12E Module) the ID for Arduino UNO is ``uno`` and for NodeMCU 1.0 (ESP-12E Module)
is ``nodemcuv2``. is ``nodemcuv2``.
Initialize Project Initialize Project
------------------ ------------------
PlatformIO ecosystem contains huge database with pre-configured settings for the PlatformIO ecosystem contains big database with pre-configured settings for the
most popular embedded boards. It helps you to forget about installing most popular embedded boards. It helps you to forget about installing
toolchains, writing build scripts or configuring uploading process. Just tell toolchains, writing build scripts or configuring uploading process. Just tell
PlatformIO the Board ID and you will receive full working project with PlatformIO the Board ID and you will receive full working project with
@ -146,12 +145,14 @@ The result of just generated ``platformio.ini``:
.. code-block:: ini .. code-block:: ini
# ; PlatformIO Project Configuration File
# PlatformIO Project Configuration File ;
# ; Build options: build flags, source filter, extra scripting
# Please make sure to read documentation with examples first ; Upload options: custom port, speed and extra flags
# http://docs.platformio.org/en/stable/projectconf.html ; Library options: dependencies, extra library storages
# ;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
[env:uno] [env:uno]
platform = atmelavr platform = atmelavr
@ -159,7 +160,7 @@ The result of just generated ``platformio.ini``:
board = uno board = uno
[env:nodemcuv2] [env:nodemcuv2]
platform = espressif platform = espressif8266
framework = arduino framework = arduino
board = nodemcuv2 board = nodemcuv2

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -33,6 +33,11 @@ Options
.. program:: platformio boards .. program:: platformio boards
.. option::
--installed
List boards only from the installed platforms
.. option:: .. option::
--json-output --json-output

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -35,19 +35,25 @@ with the build environments (using :option:`platformio ci --board` or
:option:`platformio ci --project-conf`) and processes them via :ref:`cmd_run` :option:`platformio ci --project-conf`) and processes them via :ref:`cmd_run`
command. command.
:ref:`cmd_ci` command accepts **multiple** ``SRC`` arguments,
:option:`platformio ci --lib` and :option:`platformio ci --exclude` options
which can be a path to directory, file or
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_.
Also, you can omit ``SRC`` argument and set path (multiple paths are allowed
denoting with ``:``) to
``PLATFORMIO_CI_SRC`` `Environment variable <http://en.wikipedia.org/wiki/Environment_variable>`_
For more details as for integration with the popular Continuous Integration For more details as for integration with the popular Continuous Integration
Systems please follow to :ref:`ci` page. Systems please follow to :ref:`ci` page.
.. note:: .. note::
:ref:`cmd_ci` command accepts **multiple** ``SRC`` arguments, :ref:`cmd_ci` command is useful for library developers. It allows to build
:option:`platformio ci --lib` and :option:`platformio ci --exclude` options different examples without creating own project per them. Also, is possible
which can be a path to directory, file or to upload firmware to the target device. In this case, you need to pass
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_. additional option ``--project-option="targets=upload"``. What is more,
you can specify custom upload port using
.. note:: ``--project-option="upload_port=<port>"`` option.
You can omit ``SRC`` argument and set path (multiple paths are allowed See :option:`platformio ci --project-option` for details.
denoting with ``:``) to
``PLATFORMIO_CI_SRC`` `Environment variable <http://en.wikipedia.org/wiki/Environment_variable>`_
Options Options
------- -------
@ -57,10 +63,10 @@ Options
.. option:: .. option::
-l, --lib -l, --lib
Source code which will be copied to ``%build_dir%/lib`` directly. Source code which will be copied to ``<BUILD_DIR>/lib`` directly.
If :option:`platformio ci --lib` is a path to file (not to directory), then If :option:`platformio ci --lib` is a path to file (not to directory), then
PlatformIO will create temporary directory within ``%build_dir%/lib`` and copy PlatformIO will create temporary directory within ``<BUILD_DIR>/lib`` and copy
the rest files into it. the rest files into it.
@ -105,17 +111,28 @@ temporary directory within your operation system.
Don't remove :option:`platformio ci --build-dir` after build process. Don't remove :option:`platformio ci --build-dir` after build process.
.. option:: .. option::
--project-conf -P, --project-conf
Buid project using pre-configured :ref:`projectconf`. Buid project using pre-configured :ref:`projectconf`.
.. option::
-O, --project-option
Pass additional options from :ref:`projectconf` to
:option:`platformio init --project-option` command. For example,
automatically install dependent libraries
``platformio ci --project-option="lib_deps=ArduinoJSON"`` or ignore specific
library ``platformio ci --project-option="lib_ignore=SomeLib"``.
.. option:: .. option::
-v, --verbose -v, --verbose
Shows details about the results of processing environments. More details Shows detailed information when processing environments.
:option:`platformio run --verbose`
This option can be set globally using :ref:`setting_force_verbose` setting
or by environment variable :envvar:`PLATFORMIO_SETTING_FORCE_VERBOSE`.
Examples Examples
-------- --------
For the examples please follow to :ref:`ci` page. For the others examples please follow to :ref:`ci` page.

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -9,14 +9,14 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
.. _cmd_serialports: .. _cmd_device:
platformio serialports platformio device
====================== ======================
.. contents:: .. contents::
platformio serialports list platformio device list
--------------------------- ---------------------------
Usage Usage
@ -24,7 +24,7 @@ Usage
.. code-block:: bash .. code-block:: bash
platformio serialports list [OPTIONS] platformio device list [OPTIONS]
Description Description
@ -35,7 +35,7 @@ List available `Serial Ports <http://en.wikipedia.org/wiki/Serial_port>`_
Options Options
~~~~~~~ ~~~~~~~
.. program:: platformio serialports list .. program:: platformio device list
.. option:: .. option::
--json-output --json-output
@ -50,7 +50,7 @@ Examples
.. code-block:: bash .. code-block:: bash
$ platformio serialports list $ platformio device list
/dev/cu.SLAB_USBtoUART /dev/cu.SLAB_USBtoUART
---------- ----------
Hardware ID: USB VID:PID=10c4:ea60 SNR=0001 Hardware ID: USB VID:PID=10c4:ea60 SNR=0001
@ -66,7 +66,7 @@ Examples
.. code-block:: bash .. code-block:: bash
$ platformio serialports list $ platformio device list
COM4 COM4
---------- ----------
Hardware ID: USB VID:PID=0451:F432 Hardware ID: USB VID:PID=0451:F432
@ -78,9 +78,9 @@ Examples
Description: Silicon Labs CP210x USB to UART Bridge (COM3) Description: Silicon Labs CP210x USB to UART Bridge (COM3)
.. _cmd_serialports_monitor: .. _cmd_device_monitor:
platformio serialports monitor platformio device monitor
------------------------------ ------------------------------
Usage Usage
@ -88,7 +88,7 @@ Usage
.. code-block:: bash .. code-block:: bash
platformio serialports monitor [OPTIONS] platformio device monitor [OPTIONS]
Description Description
@ -112,7 +112,7 @@ To control *monitor* please use these "hot keys":
Options Options
~~~~~~~ ~~~~~~~
.. program:: platformio serialports monitor .. program:: platformio device monitor
.. option:: .. option::
-p, --port -p, --port
@ -194,7 +194,7 @@ ASCII code of special character that is used to exit the application,
default ``29`` (DEC). default ``29`` (DEC).
For example, to use ``Ctrl+Q`` run For example, to use ``Ctrl+Q`` run
``platformio serialports monitor --exit-char 17``. ``platformio device monitor --exit-char 17``.
.. option:: .. option::
--menu-char --menu-char
@ -238,8 +238,8 @@ multiple times:
3. hex dump everything 3. hex dump everything
**REMOVED**: Is not available in Miniterm/PySerial 3.0. **REMOVED**: Is not available in Miniterm/PySerial 3.0.
See :option:`platformio serialports monitor --encoding` and See :option:`platformio device monitor --encoding` and
:option:`platformio serialports monitor --filter` options. :option:`platformio device monitor --filter` options.
Examples Examples
~~~~~~~~ ~~~~~~~~
@ -248,8 +248,8 @@ Examples
.. code-block:: bash .. code-block:: bash
$ platformio serialports monitor --help $ platformio device monitor --help
Usage: platformio serialports monitor [OPTIONS] Usage: platformio device monitor [OPTIONS]
Options: Options:
-p, --port TEXT Port, a number or a device name -p, --port TEXT Port, a number or a device name
@ -276,7 +276,7 @@ Examples
.. code-block:: bash .. code-block:: bash
$ platformio serialports monitor $ platformio device monitor
--- Available ports: --- Available ports:
--- /dev/cu.Bluetooth-Incoming-Port n/a --- /dev/cu.Bluetooth-Incoming-Port n/a

View File

@ -1,4 +1,4 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -52,7 +52,7 @@ A path to the directory where *PlatformIO* will initialize new project.
.. option:: .. option::
-b, --board -b, --board
If you specify board ``type`` (you can pass multiple ``--board`` options), then If you specify board ``ID`` (you can pass multiple ``--board`` options), then
*PlatformIO* will automatically generate environment for :ref:`projectconf` and *PlatformIO* will automatically generate environment for :ref:`projectconf` and
pre-fill these data: pre-fill these data:
@ -65,18 +65,17 @@ The full list with pre-configured boards is available here :ref:`platforms`.
.. option:: .. option::
--ide --ide
Initialise PlatformIO project for the specified IDE which can be imported later Initialize PlatformIO project for the specified IDE which can be imported later
via "Import Project" functionality. via "Import Project" functionality.
A list with supported IDE is available within ``platformio init --help`` command. A list with supported IDE is available within ``platformio init --help`` command.
Also, please take a look at :ref:`ide` page. Also, please take a look at :ref:`ide` page.
.. option:: .. option::
--enable-auto-uploading -O, --project-option
If you initialise project with the specified Initialize project with additional options from :ref:`projectconf`. For example,
:option:`platformio init --board`, then *PlatformIO* ``platformio init --project-option="lib_deps=ArduinoJSON"``.
will create environment with enabled firmware auto-uploading.
.. option:: .. option::
--env-prefix --env-prefix
@ -104,7 +103,6 @@ Examples
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-| platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source files here src - Put your source files here
lib - Put here project specific (private) libraries lib - Put here project specific (private) libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized! Project has been successfully initialized!
Useful commands: Useful commands:
`platformio run` - process/build project from the current directory `platformio run` - process/build project from the current directory
@ -122,14 +120,13 @@ Examples
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-| platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source files here src - Put your source files here
lib - Put here project specific (private) libraries lib - Put here project specific (private) libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized! Project has been successfully initialized!
Useful commands: Useful commands:
`platformio run` - process/build project from the current directory `platformio run` - process/build project from the current directory
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board `platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
`platformio run --target clean` - clean project (remove compiled files) `platformio run --target clean` - clean project (remove compiled files)
3. Initialise project for Arduino Uno 3. Initialize project for Arduino Uno
.. code-block:: bash .. code-block:: bash
@ -143,7 +140,6 @@ Examples
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-| platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
src - Put your source files here src - Put your source files here
lib - Put here project specific (private) libraries lib - Put here project specific (private) libraries
Do you want to continue? [y/N]: y
Project has been successfully initialized! Project has been successfully initialized!
Useful commands: Useful commands:
`platformio run` - process/build project from the current directory `platformio run` - process/build project from the current directory

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -64,7 +64,9 @@ Pre-built targets:
--upload-port --upload-port
Upload port of embedded board. To print all available ports use Upload port of embedded board. To print all available ports use
:ref:`cmd_serialports` command :ref:`cmd_device` command.
If upload port is not specified, PlatformIO will try to detect it automatically.
.. option:: .. option::
-d, --project-dir -d, --project-dir
@ -75,17 +77,10 @@ to current working directory (``CWD``).
.. option:: .. option::
-v, --verbose -v, --verbose
Shows details about the results of processing environments. Each instance of Shows detailed information when processing environments.
``--verbose`` on the command line increases the verbosity level by one, so if
you need more details on the output, specify it twice.
There 3 levels of verbosity: This option can be set globally using :ref:`setting_force_verbose` setting
or by environment variable :envvar:`PLATFORMIO_SETTING_FORCE_VERBOSE`.
1. ``-v`` - output errors only
2. ``-vv`` - output errors and warnings
3. ``-vvv`` - output errors, warnings and additional information
By default, verbosity level is set to 3 (maximum information).
.. option:: .. option::
--disable-auto-clean --disable-auto-clean
@ -98,87 +93,285 @@ Examples
1. Process `Wiring Blink Example <https://github.com/platformio/platformio-examples/tree/develop/wiring-blink>`_ 1. Process `Wiring Blink Example <https://github.com/platformio/platformio-examples/tree/develop/wiring-blink>`_
.. code-block:: bash .. code::
$ platformio run > platformio run
Processing arduino_pro5v environment:
scons: `.pioenvs/arduino_pro5v/firmware.elf' is up to date.
scons: `.pioenvs/arduino_pro5v/firmware.hex' is up to date.
Processing launchpad_msp430g2 environment: [Wed Sep 7 15:48:58 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
scons: `.pioenvs/launchpad_msp430g2/firmware.elf' is up to date. -----------------------------------------------------------------------------------------------
scons: `.pioenvs/launchpad_msp430g2/firmware.hex' is up to date. Verbose mode can be enabled via `-v, --verbose` option
Collected 36 compatible libraries
Looking for dependencies...
Project does not have dependencies
Compiling .pioenvs/uno/src/main.o
Archiving .pioenvs/uno/libFrameworkArduinoVariant.a
Indexing .pioenvs/uno/libFrameworkArduinoVariant.a
Compiling .pioenvs/uno/FrameworkArduino/CDC.o
...
Compiling .pioenvs/uno/FrameworkArduino/wiring_shift.o
Archiving .pioenvs/uno/libFrameworkArduino.a
Indexing .pioenvs/uno/libFrameworkArduino.a
Linking .pioenvs/uno/firmware.elf
Building .pioenvs/uno/firmware.hex
Calculating size .pioenvs/uno/firmware.elf
AVR Memory Usage
----------------
Device: atmega328p
Processing launchpad_lm4f120 environment: Program: 1034 bytes (3.2% Full)
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date. (.text + .data + .bootloader)
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date
Data: 9 bytes (0.4% Full)
(.data + .bss + .noinit)
=========================== [SUCCESS] Took 2.47 seconds ===========================
[Wed Sep 7 15:49:01 2016] Processing nodemcu (platform: espressif8266, board: nodemcu, framework: arduino)
-----------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 34 compatible libraries
Looking for dependencies...
Project does not have dependencies
Compiling .pioenvs/nodemcu/src/main.o
Archiving .pioenvs/nodemcu/libFrameworkArduinoVariant.a
Indexing .pioenvs/nodemcu/libFrameworkArduinoVariant.a
Compiling .pioenvs/nodemcu/FrameworkArduino/Esp.o
Compiling .pioenvs/nodemcu/FrameworkArduino/FS.o
Compiling .pioenvs/nodemcu/FrameworkArduino/HardwareSerial.o
...
Archiving .pioenvs/nodemcu/libFrameworkArduino.a
Indexing .pioenvs/nodemcu/libFrameworkArduino.a
Linking .pioenvs/nodemcu/firmware.elf
Calculating size .pioenvs/nodemcu/firmware.elf
text data bss dec hex filename
221240 888 29400 251528 3d688 .pioenvs/nodemcu/firmware.elf
Building .pioenvs/nodemcu/firmware.bin
=========================== [SUCCESS] Took 6.43 seconds ===========================
[Wed Sep 7 15:49:07 2016] Processing teensy31 (platform: teensy, board: teensy31, framework: arduino)
-----------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 96 compatible libraries
Looking for dependencies...
Project does not have dependencies
Compiling .pioenvs/teensy31/src/main.o
Compiling .pioenvs/teensy31/FrameworkArduino/AudioStream.o
Compiling .pioenvs/teensy31/FrameworkArduino/DMAChannel.o
...
Compiling .pioenvs/teensy31/FrameworkArduino/yield.o
Archiving .pioenvs/teensy31/libFrameworkArduino.a
Indexing .pioenvs/teensy31/libFrameworkArduino.a
Linking .pioenvs/teensy31/firmware.elf
Calculating size .pioenvs/teensy31/firmware.elf
text data bss dec hex filename
11288 168 2288 13744 35b0 .pioenvs/teensy31/firmware.elf
Building .pioenvs/teensy31/firmware.hex
=========================== [SUCCESS] Took 5.36 seconds ===========================
[Wed Sep 7 15:49:12 2016] Processing lpmsp430g2553 (platform: timsp430, build_flags: -D LED_BUILTIN=RED_LED, board: lpmsp430g2553, framework: energia)
-----------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 29 compatible libraries
Looking for dependencies...
Project does not have dependencies
Compiling .pioenvs/lpmsp430g2553/src/main.o
Compiling .pioenvs/lpmsp430g2553/FrameworkEnergia/HardwareSerial.o
Compiling .pioenvs/lpmsp430g2553/FrameworkEnergia/IPAddress.o
...
Compiling .pioenvs/lpmsp430g2553/FrameworkEnergia/wiring_digital.o
Compiling .pioenvs/lpmsp430g2553/FrameworkEnergia/wiring_pulse.o
Compiling .pioenvs/lpmsp430g2553/FrameworkEnergia/wiring_shift.o
Archiving .pioenvs/lpmsp430g2553/libFrameworkEnergia.a
Indexing .pioenvs/lpmsp430g2553/libFrameworkEnergia.a
Linking .pioenvs/lpmsp430g2553/firmware.elf
Calculating size .pioenvs/lpmsp430g2553/firmware.elf
text data bss dec hex filename
820 0 20 840 348 .pioenvs/lpmsp430g2553/firmware.elf
Building .pioenvs/lpmsp430g2553/firmware.hex
=========================== [SUCCESS] Took 2.34 seconds ===========================
2. Process specific environment 2. Process specific environment
.. code-block:: bash .. code::
$ platformio run -e arduino_pro5v -e launchpad_lm4f120 > platformio run -e nodemcu -e teensy31
Processing arduino_pro5v environment:
scons: `.pioenvs/arduino_pro5v/firmware.elf' is up to date.
scons: `.pioenvs/arduino_pro5v/firmware.hex' is up to date.
Processing launchpad_lm4f120 environment: [Wed Sep 7 15:49:01 2016] Processing nodemcu (platform: espressif8266, board: nodemcu, framework: arduino)
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date. -----------------------------------------------------------------------------------------------
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date. Verbose mode can be enabled via `-v, --verbose` option
Collected 34 compatible libraries
Looking for dependencies...
3. Process specific target Project does not have dependencies
Compiling .pioenvs/nodemcu/src/main.o
.. code-block:: bash Archiving .pioenvs/nodemcu/libFrameworkArduinoVariant.a
Indexing .pioenvs/nodemcu/libFrameworkArduinoVariant.a
$ platformio run -t clean Compiling .pioenvs/nodemcu/FrameworkArduino/Esp.o
Processing arduino_pro5v environment: Compiling .pioenvs/nodemcu/FrameworkArduino/FS.o
Removed .pioenvs/arduino_pro5v/src/main.o Compiling .pioenvs/nodemcu/FrameworkArduino/HardwareSerial.o
... ...
Removed .pioenvs/arduino_pro5v/firmware.hex Archiving .pioenvs/nodemcu/libFrameworkArduino.a
Indexing .pioenvs/nodemcu/libFrameworkArduino.a
Linking .pioenvs/nodemcu/firmware.elf
Calculating size .pioenvs/nodemcu/firmware.elf
text data bss dec hex filename
221240 888 29400 251528 3d688 .pioenvs/nodemcu/firmware.elf
Building .pioenvs/nodemcu/firmware.bin
=========================== [SUCCESS] Took 6.43 seconds ===========================
Processing launchpad_msp430g2 environment: [Wed Sep 7 15:49:07 2016] Processing teensy31 (platform: teensy, board: teensy31, framework: arduino)
Removed .pioenvs/launchpad_msp430g2/src/main.o -----------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 96 compatible libraries
Looking for dependencies...
Project does not have dependencies
Compiling .pioenvs/teensy31/src/main.o
Compiling .pioenvs/teensy31/FrameworkArduino/AudioStream.o
Compiling .pioenvs/teensy31/FrameworkArduino/DMAChannel.o
... ...
Removed .pioenvs/launchpad_msp430g2/firmware.hex Compiling .pioenvs/teensy31/FrameworkArduino/yield.o
Archiving .pioenvs/teensy31/libFrameworkArduino.a
Indexing .pioenvs/teensy31/libFrameworkArduino.a
Linking .pioenvs/teensy31/firmware.elf
Calculating size .pioenvs/teensy31/firmware.elf
text data bss dec hex filename
11288 168 2288 13744 35b0 .pioenvs/teensy31/firmware.elf
Building .pioenvs/teensy31/firmware.hex
=========================== [SUCCESS] Took 5.36 seconds ===========================
Processing launchpad_lm4f120 environment:
Removed .pioenvs/launchpad_lm4f120/src/main.o 3. Process specific target (clean project)
.. code:: bash
> platformio run -t clean
[Wed Sep 7 15:53:26 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
-----------------------------------------------------------------------------------------------------
Removed .pioenvs/uno/firmware.elf
Removed .pioenvs/uno/firmware.hex
Removed .pioenvs/uno/libFrameworkArduino.a
Removed .pioenvs/uno/libFrameworkArduinoVariant.a
Removed .pioenvs/uno/FrameworkArduino/_wiring_pulse.o
Removed .pioenvs/uno/FrameworkArduino/abi.o
Removed .pioenvs/uno/FrameworkArduino/CDC.o
Removed .pioenvs/uno/FrameworkArduino/HardwareSerial.o
Removed .pioenvs/uno/FrameworkArduino/HardwareSerial0.o
Removed .pioenvs/uno/FrameworkArduino/HardwareSerial1.o
Removed .pioenvs/uno/FrameworkArduino/HardwareSerial2.o
Removed .pioenvs/uno/FrameworkArduino/HardwareSerial3.o
Removed .pioenvs/uno/FrameworkArduino/hooks.o
Removed .pioenvs/uno/FrameworkArduino/IPAddress.o
Removed .pioenvs/uno/FrameworkArduino/main.o
Removed .pioenvs/uno/FrameworkArduino/new.o
Removed .pioenvs/uno/FrameworkArduino/PluggableUSB.o
Removed .pioenvs/uno/FrameworkArduino/Print.o
Removed .pioenvs/uno/FrameworkArduino/Stream.o
Removed .pioenvs/uno/FrameworkArduino/Tone.o
Removed .pioenvs/uno/FrameworkArduino/USBCore.o
Removed .pioenvs/uno/FrameworkArduino/WInterrupts.o
Removed .pioenvs/uno/FrameworkArduino/wiring.o
Removed .pioenvs/uno/FrameworkArduino/wiring_analog.o
Removed .pioenvs/uno/FrameworkArduino/wiring_digital.o
Removed .pioenvs/uno/FrameworkArduino/wiring_pulse.o
Removed .pioenvs/uno/FrameworkArduino/wiring_shift.o
Removed .pioenvs/uno/FrameworkArduino/WMath.o
Removed .pioenvs/uno/FrameworkArduino/WString.o
Removed .pioenvs/uno/src/main.o
Done cleaning
======================= [SUCCESS] Took 0.49 seconds =======================
[Wed Sep 7 15:53:27 2016] Processing nodemcu (platform: espressif8266, board: nodemcu, framework: arduino)
-----------------------------------------------------------------------------------------------------
Removed .pioenvs/nodemcu/firmware.bin
Removed .pioenvs/nodemcu/firmware.elf
Removed .pioenvs/nodemcu/libFrameworkArduino.a
Removed .pioenvs/nodemcu/libFrameworkArduinoVariant.a
... ...
Removed .pioenvs/launchpad_lm4f120/firmware.hex Removed .pioenvs/nodemcu/FrameworkArduino/spiffs/spiffs_nucleus.o
Removed .pioenvs/nodemcu/FrameworkArduino/umm_malloc/umm_malloc.o
Removed .pioenvs/nodemcu/src/main.o
Done cleaning
======================= [SUCCESS] Took 0.50 seconds =======================
[Wed Sep 7 15:53:27 2016] Processing teensy31 (platform: teensy, board: teensy31, framework: arduino)
-----------------------------------------------------------------------------------------------------
Removed .pioenvs/teensy31/firmware.elf
Removed .pioenvs/teensy31/firmware.hex
Removed .pioenvs/teensy31/libFrameworkArduino.a
Removed .pioenvs/teensy31/FrameworkArduino/analog.o
Removed .pioenvs/teensy31/FrameworkArduino/AudioStream.o
...
Removed .pioenvs/teensy31/FrameworkArduino/WString.o
Removed .pioenvs/teensy31/FrameworkArduino/yield.o
Removed .pioenvs/teensy31/src/main.o
Done cleaning
======================= [SUCCESS] Took 0.50 seconds =======================
[Wed Sep 7 15:53:28 2016] Processing lpmsp430g2553 (platform: timsp430, build_flags: -D LED_BUILTIN=RED_LED, board: lpmsp430g2553, framework: energia)
-----------------------------------------------------------------------------------------------------
Removed .pioenvs/lpmsp430g2553/firmware.elf
Removed .pioenvs/lpmsp430g2553/firmware.hex
Removed .pioenvs/lpmsp430g2553/libFrameworkEnergia.a
Removed .pioenvs/lpmsp430g2553/FrameworkEnergia/atof.o
...
Removed .pioenvs/lpmsp430g2553/FrameworkEnergia/avr/dtostrf.o
Removed .pioenvs/lpmsp430g2553/src/main.o
Done cleaning
======================= [SUCCESS] Took 0.49 seconds =======================
4. Mix environments and targets 4. Mix environments and targets
.. code-block:: bash .. code::
$ platformio run -e launchpad_msp430g2 -t upload > platformio run -e uno -t upload
Processing launchpad_msp430g2 environment:
/Users/ikravets/.platformio/timsp430/tools/mspdebug/mspdebug rf2500 --force-reset "prog .pioenvs/launchpad_msp430g2/firmware.hex"
MSPDebug version 0.20 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Trying to open interface 1 on 009 [Wed Sep 7 15:55:11 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
Initializing FET... --------------------------------------------------------------------------------------------------
FET protocol version is 30394216 Verbose mode can be enabled via `-v, --verbose` option
Configured for Spy-Bi-Wire Collected 36 compatible libraries
Sending reset... Looking for dependencies...
Set Vcc: 3000 mV Project does not have dependencies
Device ID: 0x2553 Compiling .pioenvs/uno/src/main.o
Code start address: 0xc000 Archiving .pioenvs/uno/libFrameworkArduinoVariant.a
Code size : 16384 byte = 16 kb Indexing .pioenvs/uno/libFrameworkArduinoVariant.a
RAM start address: 0x200 Compiling .pioenvs/uno/FrameworkArduino/CDC.o
RAM end address: 0x3ff ...
RAM size : 512 byte = 0 kb Compiling .pioenvs/uno/FrameworkArduino/wiring_shift.o
Device: MSP430G2553/G2403 Archiving .pioenvs/uno/libFrameworkArduino.a
Code memory starts at 0xc000 Indexing .pioenvs/uno/libFrameworkArduino.a
Number of breakpoints: 2 Linking .pioenvs/uno/firmware.elf
Chip ID data: 25 53 Checking program size .pioenvs/uno/firmware.elf
Erasing... text data bss dec hex filename
Programming... 1034 0 9 1043 413 .pioenvs/uno/firmware.elf
Writing 646 bytes at c000... Building .pioenvs/uno/firmware.hex
Writing 32 bytes at ffe0... Looking for upload port...
Done, 678 bytes total Auto-detected: /dev/cu.usbmodemFA141
Uploading .pioenvs/uno/firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f
avrdude: reading input file ".pioenvs/uno/firmware.hex"
avrdude: writing flash (1034 bytes):
Writing | ################################################## | 100% 0.18s
avrdude: 1034 bytes of flash written
avrdude: verifying flash memory against .pioenvs/uno/firmware.hex:
avrdude: load data flash data from input file .pioenvs/uno/firmware.hex:
avrdude: input file .pioenvs/uno/firmware.hex contains 1034 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.15s
avrdude: verifying ...
avrdude: 1034 bytes of flash verified
avrdude: safemode: Fuses OK (H:00, E:00, L:00)
avrdude done. Thank you.
======================== [SUCCESS] Took 4.14 seconds ========================

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -87,23 +87,29 @@ Check for the new PlatformIO interval.
Check for the platform updates interval. Check for the platform updates interval.
.. _setting_enable_prompts: .. _setting_disable_ssl:
``enable_prompts`` ``disable_ssl``
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
:Default: Yes :Default: No
:Values: Yes/No :Values: Yes/No
Can PlatformIO communicate with you via prompts? Disable SSL for PlatformIO API (NOT RECOMMENDED, INSECURE)
* propose to install platforms which aren't installed yet .. _setting_force_verbose:
* paginate over library search results
* and etc.
.. warning:: ``force_verbose``
If you are going to run *PlatformIO* from **subprocess**, you **MUST ^^^^^^^^^^^^^^^^^
DISABLE** all prompts. It will allow you to avoid blocking.
:Default: No
:Values: Yes/No
Force verbose output when processing environments. This setting overrides
* :option:`platformio run --verbose`
* :option:`platformio ci --verbose`
* :option:`platformio test --verbose`
.. _setting_enable_telemetry: .. _setting_enable_telemetry:
@ -148,7 +154,6 @@ Examples
check_libraries_interval 7 Check for the library updates interval (days) check_libraries_interval 7 Check for the library updates interval (days)
check_platformio_interval 3 Check for the new PlatformIO interval (days) check_platformio_interval 3 Check for the new PlatformIO interval (days)
check_platforms_interval 7 Check for the platform updates interval (days) check_platforms_interval 7 Check for the platform updates interval (days)
enable_prompts Yes Can PlatformIO communicate with you via prompts ...
enable_telemetry Yes Telemetry service (Yes/No) enable_telemetry Yes Telemetry service (Yes/No)

Some files were not shown because too many files have changed in this diff Show More