mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Merge branch 'release/v3.0.0'
This commit is contained in:
@ -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");
|
||||
# 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
[run]
|
||||
omit =
|
||||
platformio/builder/*
|
||||
source = platformio
|
||||
|
||||
[report]
|
||||
# Regexes for lines to exclude from consideration
|
||||
exclude_lines =
|
||||
pragma: no cover
|
||||
def __repr__
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
11
.github/ISSUE_TEMPLATE.md
vendored
11
.github/ISSUE_TEMPLATE.md
vendored
@ -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
|
||||
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 you’re trying to solve. Often a solution
|
||||
already exists! Don’t send pull requests to implement new features without first getting our
|
||||
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
|
||||
https://github.com/platformio/platformio-atom-ide/issues
|
||||
|
||||
- [ ] Bug report. If you’ve found a bug, please provide information below.
|
||||
- [ ] PlatformIO Core. If you’ve found a bug, please provide an information below.
|
||||
|
||||
*You can erase any parts of this template not applicable to your Issue.*
|
||||
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,3 +6,6 @@ docs/_build
|
||||
dist
|
||||
build
|
||||
.cache
|
||||
coverage.xml
|
||||
.coverage
|
||||
htmlcov
|
||||
|
@ -1,3 +1,3 @@
|
||||
[settings]
|
||||
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
|
||||
|
@ -20,4 +20,4 @@ confidence=
|
||||
# --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=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
3
.style.yapf
Normal file
@ -0,0 +1,3 @@
|
||||
[style]
|
||||
blank_line_before_nested_class_or_def = true
|
||||
allow_multiline_lambdas = true
|
39
.travis.yml
39
.travis.yml
@ -1,23 +1,42 @@
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
|
||||
env:
|
||||
- TOX_ENV=docs
|
||||
- TOX_ENV=lint
|
||||
- TOX_ENV=py26
|
||||
- TOX_ENV=py27
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
sudo: false
|
||||
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:
|
||||
- git submodule update --init --recursive
|
||||
- pip install -U pip setuptools tox
|
||||
- sudo apt-get install -qq lib32z1 lib32ncurses5 lib32bz2-1.0 # temporarily
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip install -U tox; else pip install -U tox; fi
|
||||
|
||||
# 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:
|
||||
- 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:
|
||||
email: false
|
||||
|
||||
slack:
|
||||
secure: ksQmXOP5NVsf8IgoDuxD68Q/YNwDpZuwq0V29h2dxYCr38oYdAkq/Os4LSCs0X6P0cQFf6nC1hM/d+cAvU+SmzcHGxEceHNEGCg3/TAj+68KIwooPU93Lfq1zwdfteZWxANjKlCQy4+wZliHLhL8fvCYgfJww/6qKmqSYleBNM=
|
||||
rooms:
|
||||
secure: JD6VGfN4+SLU2CwDdiIOr1VgwD+zbYUCE/srwyGuHavnjIkPItkl6T6Bn8Y4VrU6ysbuKotfdV2TAJJ82ivFbY8BvZBc7FBcYp/AGQ4FaCCV5ySv8RDAcQgdE12oaGzMdODiLqsB85f65zOlAFa+htaXyEiRTcotn6Y2hupatrI=
|
||||
on_failure: always
|
||||
on_success: change
|
||||
|
112
HISTORY.rst
112
HISTORY.rst
@ -1,6 +1,115 @@
|
||||
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
|
||||
--------------
|
||||
|
||||
@ -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>`_)
|
||||
* Added new setting `enable_prompts <http://docs.platformio.org/en/latest/userguide/cmd_settings.html>`_
|
||||
and allowed to disable all *PlatformIO* prompts (useful for cloud compilers)
|
||||
* Added new setting ``enable_prompts`` and allowed to disable all *PlatformIO* prompts (useful for cloud compilers)
|
||||
(`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>`_)
|
||||
|
||||
|
23
Makefile
Normal file
23
Makefile
Normal 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
|
62
README.rst
62
README.rst
@ -7,6 +7,8 @@ PlatformIO
|
||||
.. image:: https://ci.appveyor.com/api/projects/status/dku0h2rutfj0ctls/branch/develop?svg=true
|
||||
:target: https://ci.appveyor.com/project/ivankravets/platformio
|
||||
: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
|
||||
:target: https://requires.io/github/platformio/platformio/requirements/?branch=develop
|
||||
:alt: Requirements Status
|
||||
@ -19,29 +21,30 @@ PlatformIO
|
||||
.. image:: https://img.shields.io/community/PlatformIO.png
|
||||
:alt: Community Forums
|
||||
:target: https://community.platformio.org
|
||||
.. image:: https://img.shields.io/donate/PlatformIO.png?color=yellow
|
||||
:alt: Donate for PlatformIO.Org
|
||||
:target: http://platformio.org/donate
|
||||
.. image:: https://img.shields.io/PlatformIO/Plus.png?color=orange
|
||||
:alt: PlatformIO Plus: Professional solutions for an awesome open source PlatformIO ecosystem
|
||||
:target: https://pioplus.com
|
||||
|
||||
|
||||
`Home <http://platformio.org>`_ |
|
||||
`IDE <http://platformio.org/platformio-ide>`_ |
|
||||
**Quick Links:** `Home Page <http://platformio.org>`_ |
|
||||
`PlatformIO Plus <https://pioplus.com>`_ |
|
||||
`PlatformIO IDE <http://platformio.org/platformio-ide>`_ |
|
||||
`Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_ |
|
||||
`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>`_ |
|
||||
`Hackaday <https://hackaday.io/project/7980-platformio>`_ |
|
||||
`Bintray <https://bintray.com/platformio>`_ |
|
||||
`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
|
||||
:target: http://platformio.org
|
||||
|
||||
`PlatformIO <http://platformio.org>`_ is an open source ecosystem for IoT
|
||||
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.
|
||||
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
|
||||
:target: http://platformio.org
|
||||
|
||||
* `PlatformIO Plus and professional solutions <https://pioplus.com>`_
|
||||
* `PlatformIO IDE <http://platformio.org/platformio-ide>`_
|
||||
* `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>`_
|
||||
* `Frameworks <http://platformio.org/frameworks>`_
|
||||
* `Embedded Boards Explorer <http://platformio.org/boards>`_
|
||||
* `Library Manager <http://docs.platformio.org/en/latest/librarymanager/index.html>`_
|
||||
* `User Guide <http://docs.platformio.org/en/latest/userguide/index.html>`_
|
||||
* `Continuous Integration <http://docs.platformio.org/en/latest/ci/index.html>`_
|
||||
* `IDE Integration <http://docs.platformio.org/en/latest/ide.html>`_
|
||||
* `Articles about us <http://docs.platformio.org/en/latest/articles.html>`_
|
||||
* `FAQ <http://docs.platformio.org/en/latest/faq.html>`_
|
||||
* `Release Notes <http://docs.platformio.org/en/latest/history.html>`_
|
||||
* `Library Manager <http://docs.platformio.org/en/stable/librarymanager/index.html>`_
|
||||
* `User Guide <http://docs.platformio.org/en/stable/userguide/index.html>`_
|
||||
* `Continuous Integration <http://docs.platformio.org/en/stable/ci/index.html>`_
|
||||
* `IDE Integration <http://docs.platformio.org/en/stable/ide.html>`_
|
||||
* `Articles about us <http://docs.platformio.org/en/stable/articles.html>`_
|
||||
* `FAQ <http://docs.platformio.org/en/stable/faq.html>`_
|
||||
* `Release Notes <http://docs.platformio.org/en/stable/history.html>`_
|
||||
|
||||
Use whenever. *Run everywhere.*
|
||||
-------------------------------
|
||||
@ -95,12 +99,12 @@ Embedded Development. *Easier Than Ever.*
|
||||
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>`_
|
||||
* `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*
|
||||
* 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*
|
||||
* Built-in `Serial Port Monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ and configurable
|
||||
`build -flags/-options <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`_
|
||||
* 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/stable/projectconf.html#build-flags>`_
|
||||
* Automatic **firmware uploading**
|
||||
* 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
|
||||
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>`_
|
||||
* 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
|
||||
* Library **dependency management**
|
||||
* Automatic library updating
|
||||
@ -135,7 +139,7 @@ cross-platform substitute for the classic *Make* utility.
|
||||
* Reliable detection of *build changes*
|
||||
* Improved support for *parallel builds*
|
||||
* 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
|
||||
:target: http://platformio.org
|
||||
@ -145,9 +149,9 @@ Single source code. *Multiple platforms.*
|
||||
-----------------------------------------
|
||||
*PlatformIO* allows the developer to compile the same code with different
|
||||
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
|
||||
`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
|
||||
type, firmware uploading settings, pre-built framework, build flags and many
|
||||
more).
|
||||
@ -180,7 +184,7 @@ Frameworks:
|
||||
* `SPL <http://platformio.org/frameworks/spl>`_
|
||||
* `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
|
||||
------------
|
||||
@ -190,7 +194,7 @@ See `contributing guidelines <https://github.com/platformio/platformio/blob/deve
|
||||
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,
|
||||
so you can use it in both commercial and personal projects with confidence.
|
||||
|
@ -11,3 +11,11 @@ install:
|
||||
|
||||
test_script:
|
||||
- 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
|
||||
|
18
docs/_static/extra.css
vendored
18
docs/_static/extra.css
vendored
@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -262,6 +262,12 @@ nav {
|
||||
visibility: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.wy-side-scroll {
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-header .navbar-brand {
|
||||
color: #e0e0e0;
|
||||
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 {
|
||||
display: block;
|
||||
padding: 10px 20px;
|
||||
|
BIN
docs/_static/pioplus-unit-testing-demo.png
vendored
Normal file
BIN
docs/_static/pioplus-unit-testing-demo.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 159 KiB |
2
docs/_templates/footer.html
vendored
2
docs/_templates/footer.html
vendored
@ -27,7 +27,7 @@
|
||||
<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><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>
|
||||
</div>
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
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
|
||||
^^^^
|
||||
|
||||
* 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 - **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>`_
|
||||
@ -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 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 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 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 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 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>`_
|
||||
* 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 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 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/>`_
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
|
||||
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`
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -49,9 +49,9 @@ guide first.
|
||||
|
||||
test:
|
||||
override:
|
||||
- platformio ci path/to/test/file.c --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
|
||||
- platformio ci examples/file.ino --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
|
||||
- platformio ci path/to/test/directory --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=<ID_1> --board=<ID_2> --board=<ID_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`.
|
||||
@ -65,7 +65,7 @@ it), please use ``--lib="."`` option for :ref:`cmd_ci` command
|
||||
.. code-block:: yaml
|
||||
|
||||
script:
|
||||
- platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
|
||||
- platformio ci --lib="." --board=<ID_1> --board=<ID_2> --board=<ID_N>
|
||||
|
||||
Library dependecies
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
@ -83,11 +83,11 @@ Install dependent library using :ref:`librarymanager`
|
||||
- sudo pip install -U platformio
|
||||
|
||||
# OneWire Library with ID=1 http://platformio.org/lib/show/1/OneWire
|
||||
- platformio lib install 1
|
||||
- platformio lib -g install 1
|
||||
|
||||
test:
|
||||
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
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -105,7 +105,7 @@ Manually download dependent library and include in build process via ``--lib`` o
|
||||
|
||||
test:
|
||||
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
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
@ -152,14 +152,14 @@ Examples
|
||||
- sudo pip install -U platformio
|
||||
|
||||
# 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:
|
||||
#
|
||||
# http://platformio.org/lib/show/416/TinyGPS
|
||||
# http://platformio.org/lib/show/417/SPI4Teensy3
|
||||
- platformio lib install 416 417
|
||||
- platformio lib -g install 416 417
|
||||
|
||||
test:
|
||||
override:
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -58,7 +58,7 @@ GitHub repository.
|
||||
- pip install -U platformio
|
||||
|
||||
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`
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
|
||||
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/
|
||||
|
||||
@ -87,10 +87,10 @@ it), please use ``--lib="."`` option for :ref:`cmd_ci` command
|
||||
.. code-block:: yaml
|
||||
|
||||
script:
|
||||
- platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
|
||||
- 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:
|
||||
|
||||
@ -106,7 +106,7 @@ Install dependent library using :ref:`librarymanager`
|
||||
# Libraries from PlatformIO Library Registry:
|
||||
#
|
||||
# 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
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -121,7 +121,7 @@ Manually download dependent library and include in build process via ``--lib`` o
|
||||
- unzip /tmp/onewire_source.zip -d /tmp/
|
||||
|
||||
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
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
@ -189,7 +189,7 @@ Examples
|
||||
#
|
||||
# http://platformio.org/lib/show/416/TinyGPS
|
||||
# http://platformio.org/lib/show/417/SPI4Teensy3
|
||||
- platformio lib install 416 417
|
||||
- platformio lib -g install 416 417
|
||||
|
||||
script:
|
||||
- platformio ci --board=uno --board=teensy31 --board=due --lib="."
|
||||
@ -260,7 +260,7 @@ Examples
|
||||
# Libraries from PlatformIO Library Registry:
|
||||
#
|
||||
# http://platformio.org/lib/show/416/TinyGPS
|
||||
- platformio lib install 416 421 422
|
||||
- platformio lib -g install 416 421 422
|
||||
|
||||
script:
|
||||
- platformio ci --lib="." --board=uno --board=teensy20pp $PLATFORMIO_CI_EXTRA_ARGS
|
||||
|
@ -45,7 +45,7 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
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
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@ -199,7 +199,7 @@ latex_elements = {
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
('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
|
||||
@ -229,7 +229,7 @@ latex_documents = [
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'platformio', u'PlatformIO Documentation',
|
||||
[u'Ivan Kravets'], 1)
|
||||
[u'PlatformIO'], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
@ -243,7 +243,7 @@ man_pages = [
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'PlatformIO', u'PlatformIO Documentation',
|
||||
u'Ivan Kravets', 'PlatformIO', 'One line description of project.',
|
||||
u'PlatformIO', 'PlatformIO', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -41,11 +41,11 @@ Platform Manager
|
||||
Used in demo
|
||||
~~~~~~~~~~~~
|
||||
|
||||
1. :ref:`userguide_platforms`
|
||||
2. :ref:`cmd_platforms_list` command
|
||||
3. :ref:`platformio platforms search avr <cmd_platforms_search>` command
|
||||
4. :ref:`platformio platforms show teensy <cmd_platforms_show>` command
|
||||
5. :ref:`cmd_platforms_update` command.
|
||||
1. :ref:`userguide_platform`
|
||||
2. :ref:`cmd_platform_list` command
|
||||
3. :ref:`platformio platform search avr <cmd_platform_search>` command
|
||||
4. :ref:`platformio platform show teensy <cmd_platform_show>` command
|
||||
5. :ref:`cmd_platform_update` command.
|
||||
|
||||
Library Manager
|
||||
---------------
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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>`_
|
||||
(Travis, Circle and etc.) systems.
|
||||
PlatformIO uses it to disable prompts and progress bars. In other words,
|
||||
``CI=true`` automatically setup :envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS` to
|
||||
``false`` and :envvar:`PLATFORMIO_DISABLE_PROGRESSBAR` to ``true``.
|
||||
``CI=true`` automatically setup :envvar:`PLATFORMIO_DISABLE_PROGRESSBAR` to
|
||||
``true``.
|
||||
|
||||
.. 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`.
|
||||
|
||||
.. envvar:: PLATFORMIO_LIBDEPS_DIR
|
||||
|
||||
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_libdeps_dir`.
|
||||
|
||||
.. envvar:: PLATFORMIO_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`.
|
||||
|
||||
.. envvar:: PLATFORMIO_TEST_DIR
|
||||
|
||||
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_test_dir`.
|
||||
|
||||
|
||||
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`.
|
||||
|
||||
.. envvar:: PLATFORMIO_LIB_EXTRA_DIRS
|
||||
|
||||
Allows to set :ref:`projectconf` option :ref:`projectconf_lib_extra_dirs`.
|
||||
|
||||
|
||||
Uploading
|
||||
---------
|
||||
@ -142,10 +154,15 @@ Allows to override setting :ref:`setting_check_platformio_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
|
||||
|
||||
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`.
|
||||
|
30
docs/faq.rst
30
docs/faq.rst
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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>`.
|
||||
|
||||
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:
|
||||
|
||||
Troubleshooting
|
||||
@ -132,21 +139,6 @@ Please upgrade *SetupTools* package:
|
||||
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
|
||||
'''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
@ -155,12 +147,6 @@ Answered in `issue #144 <https://github.com/platformio/platformio/issues/144#iss
|
||||
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
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -33,7 +33,7 @@ Platforms
|
||||
* - :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.
|
||||
|
||||
* - :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.
|
||||
|
||||
* - :ref:`platform_intel_arc32`
|
||||
@ -151,7 +151,7 @@ Adafruit
|
||||
* - ``protrinket3ftdi``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
|
||||
- ATMEGA328P
|
||||
- 16 MHz
|
||||
- 12 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -266,6 +266,26 @@ Freescale
|
||||
- 256 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
|
||||
~~~~~~
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -33,7 +33,7 @@ Platforms
|
||||
* - :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.
|
||||
|
||||
* - :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.
|
||||
|
||||
Boards
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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>`_.
|
||||
|
||||
.. 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
|
||||
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>`_.
|
||||
|
||||
.. warning::
|
||||
The libraries which are added/installed after initializing process will
|
||||
not be reflected in code linter. You need ``Menu: PlatformIO >
|
||||
Rebuild C/C++ Project Index (Autocomplete, Linter)``.
|
||||
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)``
|
||||
|
||||
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...``.
|
||||
|
||||
.. warning::
|
||||
The libraries which are added/installed after initializing process will
|
||||
not be reflected in code linter. You need ``Menu: PlatformIO >
|
||||
Rebuild C/C++ Project Index (Autocomplete, Linter)``.
|
||||
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)``
|
||||
|
||||
|
||||
.. error::
|
||||
@ -381,11 +381,11 @@ For example, we have the next ``Demo.ino`` file:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
void function setup () {
|
||||
void setup () {
|
||||
someFunction(13);
|
||||
}
|
||||
|
||||
void function loop() {
|
||||
void loop() {
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
@ -406,11 +406,11 @@ The final ``Demo.cpp``:
|
||||
|
||||
void someFunction(int num);
|
||||
|
||||
void function setup () {
|
||||
void setup () {
|
||||
someFunction(13);
|
||||
}
|
||||
|
||||
void function loop() {
|
||||
void loop() {
|
||||
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`
|
||||
(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:
|
||||
|
||||
Frequently Asked Questions
|
||||
@ -478,6 +483,8 @@ package and `C/C++ Uncrustify Code Beautifier <http://sourceforge.net/projects/u
|
||||
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 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/>`_
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -31,12 +31,12 @@ page for more detailed information.
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide clion --board %TYPE%
|
||||
platformio init --ide clion --board <ID>
|
||||
|
||||
# For example, generate project for Arduino UNO
|
||||
platformio init --ide clion --board uno
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
-----------
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide codeblocks --board %TYPE%
|
||||
platformio init --ide codeblocks --board <ID>
|
||||
|
||||
# For example, generate project for Arduino UNO
|
||||
platformio init --ide codeblocks --board uno
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -35,12 +35,12 @@ page for more detailed information.
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide eclipse --board %TYPE%
|
||||
platformio init --ide eclipse --board <ID>
|
||||
|
||||
# For example, generate project for Arduino UNO
|
||||
platformio init --ide eclipse --board uno
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide emacs --board %TYPE%
|
||||
platformio init --ide emacs --board <ID>
|
||||
|
||||
|
||||
There are 6 predefined targets for building.
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -33,12 +33,12 @@ install the C/C++ development plugins).
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide netbeans --board %TYPE%
|
||||
platformio init --ide netbeans --board <ID>
|
||||
|
||||
# For example, generate project for Arduino UNO
|
||||
platformio init --ide netbeans --board uno
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -35,12 +35,12 @@ Integration
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide qtcreator --board %TYPE%
|
||||
platformio init --ide qtcreator --board <ID>
|
||||
|
||||
# For example, generate project for Arduino 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.
|
||||
|
||||
.. code-block:: none
|
||||
.. code-block:: ini
|
||||
|
||||
#
|
||||
# PlatformIO Project Configuration File
|
||||
#
|
||||
# Please make sure to read documentation with examples first
|
||||
# http://docs.platformio.org/en/stable/projectconf.html
|
||||
#
|
||||
; 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:arduino_uno]
|
||||
platform = atmelavr
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -42,12 +42,12 @@ steps and documentation.
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide sublimetext --board %TYPE%
|
||||
platformio init --ide sublimetext --board <ID>
|
||||
|
||||
# For example, generate project for Arduino 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.
|
||||
Copy the source code which is described below to it.
|
||||
|
||||
.. code-block:: none
|
||||
.. code-block:: ini
|
||||
|
||||
#
|
||||
# PlatformIO Project Configuration File
|
||||
#
|
||||
# Please make sure to read documentation with examples first
|
||||
# http://docs.platformio.org/en/stable/projectconf.html
|
||||
#
|
||||
; 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:arduino_uno]
|
||||
platform = atmelavr
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -35,12 +35,12 @@ Integration
|
||||
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:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
platformio init --ide sublimetext --board %TYPE%
|
||||
platformio init --ide sublimetext --board <ID>
|
||||
|
||||
# For example, generate project for Arduino 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.
|
||||
|
||||
.. code-block:: none
|
||||
.. code-block:: ini
|
||||
|
||||
#
|
||||
# PlatformIO Project Configuration File
|
||||
#
|
||||
# Please make sure to read documentation with examples first
|
||||
# http://docs.platformio.org/en/stable/projectconf.html
|
||||
#
|
||||
; 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:arduino_uno]
|
||||
platform = atmelavr
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
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.
|
||||
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,
|
||||
libOpenCM3, etc.*
|
||||
|
||||
* `Website <http://platformio.org>`_
|
||||
* `Home Page <http://platformio.org>`_
|
||||
* `PlatformIO Plus and professional solutions <https://pioplus.com>`_
|
||||
* :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>`_
|
||||
* `Project Examples <https://github.com/platformio/platformio-examples/tree/develop>`_
|
||||
* `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,
|
||||
Energia, Qt Creator, Sublime Text, Vim, Visual Studio*
|
||||
* Cloud compiling and :ref:`ci` with *AppVeyor, Circle CI, Drone, Shippable, Travis CI*
|
||||
* Built-in :ref:`Serial Port Monitor <cmd_serialports_monitor>` and
|
||||
* Built-in :ref:`Serial Port Monitor <cmd_device_monitor>` and
|
||||
configurable build :ref:`-flags/-options <projectconf_build_flags>`
|
||||
* Pre-built toolchains, :ref:`frameworks` for the :ref:`platforms`
|
||||
|
||||
@ -112,12 +113,19 @@ Contents
|
||||
frameworks/index
|
||||
platforms/custom_platform_and_board
|
||||
|
||||
.. toctree::
|
||||
:caption: PlatformIO Plus
|
||||
:maxdepth: 3
|
||||
|
||||
plus/unit-testing
|
||||
|
||||
.. toctree::
|
||||
:caption: Library Manager
|
||||
:maxdepth: 2
|
||||
|
||||
Quickstart <librarymanager/index>
|
||||
User Guide <userguide/lib/index.rst>
|
||||
librarymanager/ldf
|
||||
librarymanager/config
|
||||
librarymanager/creating
|
||||
|
||||
@ -135,3 +143,5 @@ Contents
|
||||
articles
|
||||
FAQ <faq>
|
||||
history
|
||||
migration
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -200,11 +200,6 @@ To revert to the latest stable version
|
||||
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::
|
||||
**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).
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -22,10 +22,11 @@ to keep project in own structure and define:
|
||||
* examples list
|
||||
* compatible frameworks and platforms
|
||||
* library dependencies
|
||||
* advanced build settings
|
||||
|
||||
PlatformIO Library Crawler uses ``library.json`` manifest to extract
|
||||
source code from developer's location and keeps cleaned library in own
|
||||
Library Storage.
|
||||
source code from developer's location and keeps a cleaned library in own
|
||||
Library Registry.
|
||||
|
||||
A data in ``library.json`` should be represented
|
||||
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``
|
||||
|
||||
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:
|
||||
|
||||
* ``type`` the only "git", "hg" or "svn" are supported
|
||||
@ -221,6 +222,21 @@ Example:
|
||||
},
|
||||
"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:
|
||||
|
||||
``downloadUrl``
|
||||
@ -246,27 +262,40 @@ Example with fixed release/tag on GitHub:
|
||||
|
||||
See more ``library.json`` :ref:`library_creating_examples`.
|
||||
|
||||
.. _libjson_url:
|
||||
|
||||
``url``
|
||||
-------
|
||||
``homepage``
|
||||
------------
|
||||
|
||||
*Optional* | Type: ``String`` | Max. Length: 255
|
||||
|
||||
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``
|
||||
-----------
|
||||
~~~~~~~~~~~
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array`` |
|
||||
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
|
||||
|
||||
If :ref:`libjson_include` field is a type of ``String``, then
|
||||
|PIOAPICR| will recognize it like a "relative path inside
|
||||
repository/archive to library source code". See example below where the only
|
||||
If ``include`` field is a type of ``String``, then |PIOAPICR| will recognize
|
||||
it like a "relative path inside repository/archive to library source code".
|
||||
See example below where the only
|
||||
source code from the relative directory ``LibrarySourceCodeHere`` will be
|
||||
included.
|
||||
|
||||
@ -274,21 +303,23 @@ included.
|
||||
|
||||
"include": "some/child/dir/LibrarySourceCodeHere"
|
||||
|
||||
If :ref:`libjson_include` field is a type of ``Array``, then
|
||||
|PIOAPICR| firstly will apply :ref:`libjson_exclude` filter and
|
||||
then include only directories/files which match with :ref:`libjson_include`
|
||||
patterns.
|
||||
If ``include`` field is a type of ``Array``, then |PIOAPICR| firstly will
|
||||
apply ``exclude`` filter and then include only directories/files
|
||||
which match with ``include`` patterns.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
"include":
|
||||
[
|
||||
"dir/*.[ch]pp",
|
||||
"dir/examples/*",
|
||||
"*/*/*.h"
|
||||
]
|
||||
"export": {
|
||||
"include":
|
||||
[
|
||||
"dir/*.[ch]pp",
|
||||
"dir/examples/*",
|
||||
"*/*/*.h"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Pattern Meaning
|
||||
|
||||
@ -308,16 +339,14 @@ Pattern Meaning
|
||||
|
||||
See more ``library.json`` :ref:`library_creating_examples`.
|
||||
|
||||
.. _libjson_exclude:
|
||||
|
||||
``exclude``
|
||||
-----------
|
||||
~~~~~~~~~~~
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array`` |
|
||||
`Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
|
||||
|
||||
Exclude the directories and files which match with :ref:`libjson_exclude`
|
||||
patterns.
|
||||
Exclude the directories and files which match with ``exclude`` patterns.
|
||||
|
||||
.. _libjson_frameworks:
|
||||
|
||||
@ -367,10 +396,26 @@ A list of dependent libraries. They will be installed automatically with
|
||||
Allowed requirements for dependent library:
|
||||
|
||||
* ``name`` | Type: ``String``
|
||||
* ``version`` | Type: ``String``
|
||||
* ``authors`` | Type: ``String`` or ``Array``
|
||||
* ``frameworks`` | 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:
|
||||
|
||||
.. code-block:: javascript
|
||||
@ -387,17 +432,30 @@ Example:
|
||||
},
|
||||
{
|
||||
"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`.
|
||||
|
||||
.. _libjson_examples:
|
||||
|
||||
``examples``
|
||||
----------------
|
||||
------------
|
||||
|
||||
*Optional* | Type: ``String`` or ``Array`` |
|
||||
`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
|
||||
|
||||
"examples": [
|
||||
"[Ee]xamples/*.c",
|
||||
"[Ee]xamples/*.cpp",
|
||||
"[Ee]xamples/*.ino",
|
||||
"[Ee]xamples/*.pde",
|
||||
"[Ee]xamples/*/*.c",
|
||||
"[Ee]xamples/*/*.cpp",
|
||||
"[Ee]xamples/*/*.h",
|
||||
"[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"
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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>`_).
|
||||
|
||||
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`
|
||||
field to specify the relative path to your library's source code.
|
||||
|
||||
the repository/archive. In this case, you need to specify ``include`` option of
|
||||
:ref:`libjson_export` field to relative path to your library's source code.
|
||||
|
||||
At GitHub
|
||||
^^^^^^^^^
|
||||
@ -132,7 +131,9 @@ of **required** fields in the :ref:`library_config` will look like:
|
||||
},
|
||||
"version": "2.2",
|
||||
"downloadUrl": "http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip",
|
||||
"include": "OneWire",
|
||||
"export": {
|
||||
"include": "OneWire"
|
||||
},
|
||||
"frameworks": "arduino",
|
||||
"platforms": "atmelavr"
|
||||
}
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -14,13 +14,50 @@
|
||||
Library Manager
|
||||
===============
|
||||
|
||||
*PlatformIO Library Manager* allows you to organize external embedded libraries.
|
||||
You can search for new libraries via
|
||||
*PlatformIO Library Manager* is a tool for managing libraries of
|
||||
`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>`
|
||||
* `Web 2.0 Library Search <http://platformio.org/lib>`_
|
||||
There 2 options how to find library:
|
||||
|
||||
You don't need to bother for finding the latest version of library. Due to
|
||||
:ref:`cmd_lib_update` command you will have up-to-date external libraries.
|
||||
* :ref:`Command Line Interface <cmd_lib_search>`
|
||||
* `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
|
||||
|
167
docs/librarymanager/ldf.rst
Normal file
167
docs/librarymanager/ldf.rst
Normal 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
213
docs/migration.rst
Normal 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
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,21 +28,34 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``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/>`_
|
||||
|
||||
* - ``tool-avrdude``
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
* - ``framework-arduinoavr``
|
||||
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
* - ``framework-simba``
|
||||
- `Simba Framework <https://github.com/eerimoq/simba>`_
|
||||
|
||||
* - ``framework-arduinoavr``
|
||||
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
* - ``tool-avrdude``
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
|
||||
* - ``tool-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
|
||||
----------
|
||||
.. list-table::
|
||||
@ -124,7 +137,7 @@ Adafruit
|
||||
* - ``protrinket3ftdi``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
|
||||
- ATMEGA328P
|
||||
- 16 MHz
|
||||
- 12 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -30,7 +30,7 @@ Configuration for the programmers:
|
||||
upload_protocol = stk500v1
|
||||
upload_flags = -P$UPLOAD_PORT
|
||||
|
||||
# edit this line with valid upload port
|
||||
; edit this line with valid upload port
|
||||
upload_port = SERIAL_PORT_HERE
|
||||
|
||||
* AVRISP mkII
|
||||
@ -91,7 +91,7 @@ Configuration for the programmers:
|
||||
upload_protocol = stk500v1
|
||||
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED
|
||||
|
||||
# edit these lines
|
||||
; edit these lines
|
||||
upload_port = SERIAL_PORT_HERE
|
||||
upload_speed = 19200
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,30 +28,30 @@ Packages
|
||||
* - Name
|
||||
- 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``
|
||||
- `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.org>`_
|
||||
|
||||
* - ``framework-simba``
|
||||
- `Simba Framework <https://github.com/eerimoq/simba>`_
|
||||
|
||||
* - ``tool-openocd``
|
||||
- `OpenOCD <http://openocd.org>`_
|
||||
|
||||
* - ``tool-avrdude``
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
|
||||
* - ``tool-bossac``
|
||||
- `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::
|
||||
**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).
|
||||
@ -73,12 +73,12 @@ Frameworks
|
||||
* - :ref:`framework_arduino`
|
||||
- Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
|
||||
|
||||
* - :ref:`framework_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`
|
||||
- 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
|
||||
------
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
* ``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``
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"myboard": {
|
||||
"build": {},
|
||||
"frameworks": ["%LIST_WITH_SUPPORTED_FRAMEWORKS%"],
|
||||
"name": "My test board",
|
||||
"platform": "%PLATFORM_TYPE_HERE%",
|
||||
"upload": {},
|
||||
"url": "http://example.com",
|
||||
"vendor": "My Company Ltd."
|
||||
}
|
||||
"build": {
|
||||
"extra_flags": "-DHELLO_PLATFORMIO",
|
||||
"f_cpu": "16000000L",
|
||||
"hwids": [
|
||||
[
|
||||
"0x1234",
|
||||
"0x0013"
|
||||
],
|
||||
[
|
||||
"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
|
||||
------------
|
||||
|
||||
1. Create ``boards`` directory in :ref:`projectconf_pio_home_dir` if it
|
||||
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
|
||||
``myboard`` board.
|
||||
|
||||
@ -68,5 +83,6 @@ Now, you can use ``myboard`` for the :ref:`projectconf_env_board` option in
|
||||
Examples
|
||||
--------
|
||||
|
||||
For the examples, please look into built-in ``*.json`` files with boards
|
||||
settings: https://github.com/platformio/platformio/tree/develop/platformio/boards.
|
||||
Please take a look at the source code of
|
||||
`PlatformIO Development Platforms <https://github.com/platformio?query=platform->`_
|
||||
and navigate to ``boards`` folder of the repository.
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -14,7 +14,7 @@
|
||||
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`
|
||||
without any dependent software or requirements.
|
||||
|
||||
@ -32,7 +32,7 @@ different/own build scripts, uploader and etc.
|
||||
|
||||
**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`
|
||||
3. Create :ref:`platform_creating_build_script`
|
||||
4. Finish with the :ref:`platform_creating_installation`.
|
||||
@ -56,7 +56,7 @@ Packages
|
||||
* - ``framework-arduinoavr``
|
||||
- `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>`_
|
||||
|
||||
* - ``framework-arduinointel``
|
||||
@ -187,89 +187,79 @@ Packages
|
||||
|
||||
.. _platform_creating_manifest_file:
|
||||
|
||||
Manifest File
|
||||
-------------
|
||||
Manifest File ``platform.json``
|
||||
-------------------------------
|
||||
|
||||
A platform manifest file is a `Python <https://www.python.org>`_ script with the
|
||||
next requirements:
|
||||
.. code-block:: json
|
||||
|
||||
1. The file should have ``.py`` extension
|
||||
2. The **name of the file** is the **platform name** (lowercase)
|
||||
3. The source code of this file should contain a ``class`` which describes your
|
||||
own platform. The name of the ``class`` should start with your
|
||||
**platform name** (the first letter should be capitalized) + ``Platform``
|
||||
ending. This ``class`` should be derived from *PlatformIO* ``BasePlatform``
|
||||
class.
|
||||
|
||||
.. warning::
|
||||
If you are new to *Python* language, please read:
|
||||
|
||||
* `Style Guide for Python Code <https://www.python.org/dev/peps/pep-0008>`_.
|
||||
* A hash sign (#) that is not inside a string literal begins a comment.
|
||||
All characters after the # and up to the physical line end are part
|
||||
of the comment and the *Python* interpreter ignores them.
|
||||
|
||||
Example of the **test** platform (``test.py``):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import os
|
||||
|
||||
from platformio.platforms.base import BasePlatform
|
||||
|
||||
class TestPlatform(BasePlatform):
|
||||
# This is a description of your platform.
|
||||
# Platformio uses it for the `platformio search / list` commands
|
||||
"""
|
||||
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
|
||||
{
|
||||
"name": "myplatform",
|
||||
"title": "My Platform",
|
||||
"description": "My custom development platform",
|
||||
"url": "http://example.com",
|
||||
"homepage": "http://platformio.org/platforms/myplatform",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"platformio": "~3.0.0",
|
||||
"scons": ">=2.3.0,<2.6.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/platformio/platform-myplatform.git"
|
||||
},
|
||||
"version": "0.0.0",
|
||||
"packageRepositories": [
|
||||
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
|
||||
"https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download",
|
||||
"http://dl.platformio.org/packages/manifest.json",
|
||||
{
|
||||
"framework-%FRAMEWORK_NAME_1%": [
|
||||
{
|
||||
"url": "http://dl.example.com/packages/framework-%FRAMEWORK_NAME_1%-1.10607.0.tar.gz",
|
||||
"sha1": "adce2cd30a830d71cb6572575bf08461b7b73c07",
|
||||
"version": "1.10607.0",
|
||||
"system": "*"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
def get_build_script(self):
|
||||
""" Returns a path to build script """
|
||||
|
||||
# You can return static path
|
||||
#return "/path/to/test-builder.py"
|
||||
|
||||
# or detect dynamically if `test-builder.py` is located in the same
|
||||
# folder with `test.py`
|
||||
return os.path.join(
|
||||
os.path.dirname(os.path.realpath(__file__)),
|
||||
"test-builder.py"
|
||||
)
|
||||
],
|
||||
"frameworks": {
|
||||
"%FRAMEWORK_NAME_1%": {
|
||||
"package": "framework-%FRAMEWORK_NAME_1%",
|
||||
"script": "builder/frameworks/%FRAMEWORK_NAME_1%.py"
|
||||
},
|
||||
"%FRAMEWORK_NAME_N%": {
|
||||
"package": "framework-%FRAMEWORK_NAME_N%",
|
||||
"script": "builder/frameworks/%FRAMEWORK_NAME_N%.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:
|
||||
|
||||
Build Script
|
||||
------------
|
||||
Build Script ``main.py``
|
||||
------------------------
|
||||
|
||||
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
|
||||
``env.BuildProgram`` with the nested libraries search. Please look into a
|
||||
base template of ``test-builder.py``.
|
||||
``env.BuildProgram`` with the deep libraries search. Please look into a
|
||||
base template of ``main.py``.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@ -347,15 +337,6 @@ base template of ``test-builder.py``.
|
||||
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:
|
||||
|
||||
Installation
|
||||
@ -363,126 +344,17 @@ Installation
|
||||
|
||||
1. Create ``platforms`` directory in :ref:`projectconf_pio_home_dir` if it
|
||||
doesn't exist.
|
||||
2. Copy ``test.py`` and ``test-builder.py`` files to ``platforms`` directory.
|
||||
3. Search available platforms via :ref:`cmd_platforms_search` command. You should see
|
||||
``test`` platform.
|
||||
4. Install ``test`` platform via :ref:`cmd_platforms_install` command.
|
||||
2. Create ``myplatform`` directory in ``platforms``
|
||||
3. Copy ``platform.json`` and ``builder/main.py`` files to ``myplatform`` directory.
|
||||
4. Search available platforms via :ref:`cmd_platform_search` command. You
|
||||
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
|
||||
:ref:`projectconf`.
|
||||
Now, you can use ``myplatform`` for the :ref:`projectconf_env_platform`
|
||||
option in :ref:`projectconf`.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
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.
|
||||
Examples
|
||||
--------
|
||||
|
||||
Please take a look at the source code of
|
||||
`PlatformIO Development Platforms <https://github.com/platformio?query=platform->`_.
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -137,7 +137,7 @@ Adafruit
|
||||
* - ``protrinket3ftdi``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
|
||||
- ATMEGA328P
|
||||
- 16 MHz
|
||||
- 12 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
@ -1123,6 +1123,26 @@ Fubarino
|
||||
- 512 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
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -9,10 +9,10 @@
|
||||
See the License for the specific language governing permissions and
|
||||
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.
|
||||
|
||||
For more detailed information please visit `vendor site <https://espressif.com/>`_.
|
||||
@ -28,26 +28,26 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``toolchain-xtensa``
|
||||
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``framework-arduinoespressif8266``
|
||||
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
|
||||
|
||||
* - ``framework-simba``
|
||||
- `Simba Framework <https://github.com/eerimoq/simba>`_
|
||||
|
||||
* - ``sdk-esp8266``
|
||||
- `ESP8266 SDK <http://bbs.espressif.com>`_
|
||||
|
||||
* - ``tool-esptool``
|
||||
- `esptool-ck <https://github.com/igrr/esptool-ck>`_
|
||||
|
||||
* - ``tool-mkspiffs``
|
||||
- `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_
|
||||
|
||||
* - ``framework-arduinoespressif``
|
||||
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
|
||||
* - ``sdk-esp8266``
|
||||
- `ESP8266 SDK <http://bbs.espressif.com>`_
|
||||
* - ``toolchain-xtensa``
|
||||
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
@ -386,4 +386,4 @@ WeMos
|
||||
- 4096 Kb
|
||||
- 80 Kb
|
||||
|
||||
.. include:: espressif_extra.rst
|
||||
.. include:: espressif8266_extra.rst
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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
|
||||
|
||||
[env:myenv]
|
||||
# set frequency to 160MHz
|
||||
; set frequency to 160MHz
|
||||
board_f_cpu = 160000000L
|
||||
|
||||
Custom FLASH Frequency
|
||||
@ -34,7 +34,7 @@ values:
|
||||
.. code-block:: ini
|
||||
|
||||
[env:myenv]
|
||||
# set frequency to 80MHz
|
||||
; set frequency to 80MHz
|
||||
board_f_flash = 80000000L
|
||||
|
||||
Custom FLASH Mode
|
||||
@ -181,7 +181,7 @@ For the full list with available options please run
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
~/.platformio/packages/framework-arduinoespressif/tools/espota.py -h
|
||||
~/.platformio/packages/framework-arduinoespressif8266/tools/espota.py -h
|
||||
|
||||
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
|
||||
:ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif``
|
||||
and create new file ``packages/framework-arduinoespressif/version.txt``
|
||||
with the new version (for example, ``2.2.0``).
|
||||
:ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif8266``
|
||||
and create new file ``packages/framework-arduinoespressif8266/package.json``
|
||||
with the next contents (you can specify own version if you want)
|
||||
|
||||
.. 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
|
||||
3. If you see build errors, then try to build this project using the same
|
||||
``stage`` on Arduino IDE
|
||||
@ -240,6 +251,8 @@ Using Arduino Framework with Staging version
|
||||
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 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>`_
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.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/>`_
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -30,7 +30,7 @@ Embedded
|
||||
|
||||
atmelavr
|
||||
atmelsam
|
||||
espressif
|
||||
espressif8266
|
||||
freescalekinetis
|
||||
intel_arc32
|
||||
lattice_ice40
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -34,6 +34,9 @@ Packages
|
||||
* - ``tool-arduino101load``
|
||||
- `Genuino101 uploader <https://github.com/01org/intel-arduino-tools>`_
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-intelarc32``
|
||||
- `GCC for Intel ARC <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain>`_
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,6 +28,9 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-icestorm``
|
||||
- `GCC for FPGA IceStorm <http://www.clifford.at/icestorm/>`_
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-wiringpi``
|
||||
- `GPIO Interface library for the Raspberry Pi <http://wiringpi.com>`_
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gccarmlinuxgnueabi``
|
||||
- `GCC for Linux ARM GNU EABI <https://gcc.gnu.org>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,5 +28,8 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gcclinux32``
|
||||
- `GCC for Linux i686 <https://gcc.gnu.org>`_
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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.
|
||||
|
||||
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::
|
||||
|
||||
@ -28,5 +28,8 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gcclinux64``
|
||||
- `GCC for Linux x86_64 <https://gcc.gnu.org>`_
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -31,12 +31,15 @@ Packages
|
||||
* - ``framework-arduinomicrochippic32``
|
||||
- `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``
|
||||
- `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::
|
||||
**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).
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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>`_.
|
||||
|
||||
.. contents::
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,20 +28,23 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``framework-arduinonordicnrf51``
|
||||
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
|
||||
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.org>`_
|
||||
|
||||
* - ``tool-rfdloader``
|
||||
- `rfdloader <https://github.com/RFduino/RFduino>`_
|
||||
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``tool-sreccat``
|
||||
- `Merging tool <https://github.com/marcows/SRecord>`_
|
||||
|
||||
* - ``framework-arduinonordicnrf51``
|
||||
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules 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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -9,6 +9,11 @@
|
||||
See the License for the specific language governing permissions and
|
||||
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
|
||||
--------
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.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/>`_
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.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/>`_
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,26 +28,26 @@ Packages
|
||||
* - Name
|
||||
- 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``
|
||||
- `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``
|
||||
- `mbed Framework <http://mbed.org>`_
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``framework-spl``
|
||||
- `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::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
@ -73,12 +73,12 @@ Frameworks
|
||||
* - :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.
|
||||
|
||||
* - :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`
|
||||
- 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
|
||||
------
|
||||
|
||||
@ -142,6 +142,26 @@ Armstrap
|
||||
- 512 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
|
||||
~~~~~~~~~
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -31,20 +31,20 @@ Packages
|
||||
* - ``framework-arduinoteensy``
|
||||
- `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``
|
||||
- `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``
|
||||
- `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``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules 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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,17 +28,20 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``toolchain-timsp430``
|
||||
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
* - ``tool-mspdebug``
|
||||
- `MSPDebug <http://mspdebug.sourceforge.net/>`_
|
||||
* - ``framework-arduinomsp430``
|
||||
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
* - ``framework-energiamsp430``
|
||||
- `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_
|
||||
|
||||
* - ``framework-arduinomsp430``
|
||||
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
* - ``tool-mspdebug``
|
||||
- `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::
|
||||
**Linux Users:** Don't forget to install "udev" rules 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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,20 +28,20 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``framework-energiativa``
|
||||
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
|
||||
|
||||
* - ``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-lm4flash``
|
||||
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
|
||||
|
||||
* - ``framework-energiativa``
|
||||
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
|
||||
* - ``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::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
@ -61,12 +61,12 @@ Frameworks
|
||||
* - Name
|
||||
- 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`
|
||||
- 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
|
||||
------
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -28,5 +28,8 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gccmingw32``
|
||||
- `MinGW <http://www.mingw.org>`_
|
480
docs/plus/unit-testing.rst
Normal file
480
docs/plus/unit-testing.rst
Normal 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.
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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.
|
||||
|
||||
``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.
|
||||
|
||||
The sections and their allowable values are described below.
|
||||
@ -44,8 +44,8 @@ Options
|
||||
``home_dir``
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Is used to store platform toolchains, frameworks, external libraries,
|
||||
service data and etc.
|
||||
Is used to store platform toolchains, frameworks, global libraries for
|
||||
:ref: `ldf`, service data and etc.
|
||||
|
||||
A default value is User's home directory:
|
||||
|
||||
@ -60,18 +60,59 @@ This option can be overridden by global environment variable
|
||||
``lib_dir``
|
||||
^^^^^^^^^^^
|
||||
|
||||
This directory is used to store external libraries downloaded by
|
||||
:ref:`librarymanager`.
|
||||
You can put here your own/private libraries. The source code of each library
|
||||
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
|
||||
:envvar:`PLATFORMIO_LIB_DIR`.
|
||||
|
||||
.. note::
|
||||
You can put here your own/private libraries. The source code of each
|
||||
library should be placed in separate directory. For example,
|
||||
``%lib_dir%/private_lib/[here are source files]``.
|
||||
For example, see how can be organized ``Foo`` and ``Bar`` libraries:
|
||||
|
||||
.. code::
|
||||
|
||||
|--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:
|
||||
|
||||
@ -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`
|
||||
command.
|
||||
|
||||
A default value is ``src`` which means that folder is located in the root of
|
||||
project.
|
||||
command. A default value is ``src`` that means that folder is located in the
|
||||
root of project.
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
:envvar:`PLATFORMIO_SRC_DIR`.
|
||||
@ -110,14 +149,14 @@ fast!
|
||||
then PlatformIO will remove this folder automatically. It will be created on the
|
||||
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.
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
:envvar:`PLATFORMIO_ENVS_DIR`.
|
||||
|
||||
.. 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
|
||||
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`.
|
||||
|
||||
A default value is ``data`` which means that folder is located in the root of
|
||||
A default value is ``data`` that means that folder is located in the root of
|
||||
project.
|
||||
|
||||
This option can be overridden by global environment variable
|
||||
: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:
|
||||
|
||||
``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
|
||||
should be processed by default.
|
||||
|
||||
Multiple environments are allowed if they are separated with ``,`` (comma).
|
||||
For example.
|
||||
Multiple environments are allowed if they are separated with ", "
|
||||
(comma+space). For example.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
@ -158,7 +208,7 @@ For example.
|
||||
board = uno
|
||||
|
||||
[env:nodemcu]
|
||||
platform = espressif
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = nodemcu
|
||||
|
||||
@ -193,22 +243,50 @@ For example, ``[env:hello_world]``.
|
||||
General options
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
.. _projectconf_env_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:
|
||||
|
||||
``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:
|
||||
|
||||
@ -227,6 +305,9 @@ using `PlatformIO Embedded Boards Explorer <http://platformio.org/boards>`_.
|
||||
Board options
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
``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``.
|
||||
|
||||
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:
|
||||
|
||||
@ -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
|
||||
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:
|
||||
|
||||
@ -356,7 +440,7 @@ Example:
|
||||
build_flags = -Wl,-T/path/to/ld_script.ld
|
||||
|
||||
[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)
|
||||
|
||||
|
||||
@ -388,6 +472,8 @@ but will be applied only for the project source code from
|
||||
This option can be set by global environment variable
|
||||
:envvar:`PLATFORMIO_SRC_BUILD_FLAGS`.
|
||||
|
||||
.. _projectconf_build_unflags:
|
||||
|
||||
``build_unflags``
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -416,7 +502,7 @@ be applied in theirs order.
|
||||
|
||||
By default, ``src_filter`` is predefined to
|
||||
``+<*> -<.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.
|
||||
|
||||
This option can be set by global environment variable
|
||||
@ -427,6 +513,9 @@ This option can be set by global environment variable
|
||||
``extra_script``
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Allows to launch extra script using `SCons <http://www.scons.org>`_ software
|
||||
construction tool. For more details please follow to "Construction Environments"
|
||||
section of
|
||||
@ -435,13 +524,23 @@ section of
|
||||
This option can be set by global environment variable
|
||||
: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`:
|
||||
|
||||
``platformio.ini``:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:env_with_specific_extra_script]
|
||||
[env:env_custom_uploader]
|
||||
platform = atmelavr
|
||||
extra_script = /path/to/extra_script.py
|
||||
custom_option = hello
|
||||
@ -450,9 +549,7 @@ Example, specify own upload command for :ref:`platform_atmelavr`:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from SCons.Script import DefaultEnvironment
|
||||
|
||||
env = DefaultEnvironment()
|
||||
Import('env')
|
||||
|
||||
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 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>`_.
|
||||
* take a look at the multiple snippets/answers for the user questions:
|
||||
PlatformIO Build System has rich API that allows to attach different pre-/post
|
||||
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>`_
|
||||
- `#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>`_.
|
||||
The example below demonstrates how to call different functions
|
||||
when :option:`platformio run --target` is called with ``upload`` value.
|
||||
`extra_script.py` file is located on the same level as ``platformio.ini``.
|
||||
|
||||
``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``
|
||||
^^^^^^^^^^^
|
||||
@ -485,14 +620,17 @@ The list with available targets is located in :option:`platformio run --target`.
|
||||
# clean project
|
||||
platformio run -t clean
|
||||
|
||||
# dump curent build environment
|
||||
# dump current build environment
|
||||
platformio run --target envdump
|
||||
|
||||
When no targets are defined, *PlatformIO* will build only sources by default.
|
||||
|
||||
|
||||
Uploading options
|
||||
~~~~~~~~~~~~~~~~~
|
||||
Upload options
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
.. _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
|
||||
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
|
||||
: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
|
||||
development platforms. The only :ref:`platform_espressif` supports it.
|
||||
development platforms. The only :ref:`platform_espressif8266` supports it.
|
||||
|
||||
Library options
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
``lib_install``
|
||||
^^^^^^^^^^^^^^^
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Specify dependent libraries which should be installed before environment
|
||||
process. The only library IDs are allowed. Multiple libraries can be passed
|
||||
using comma ``,`` sign.
|
||||
.. _projectconf_lib_deps:
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:depends_on_some_libs]
|
||||
lib_install = 1,13,19
|
||||
[env:depends_on_some_libs]
|
||||
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
|
||||
the highest priority.
|
||||
``lib_force``
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. seealso::
|
||||
Please make sure to read :ref:`ldf` guide first.
|
||||
|
||||
Force Library Dependency Finder to depend on the specified library if it even
|
||||
is not included in the project source code. Also, this library will be
|
||||
processed in the first order.
|
||||
|
||||
The correct value for this option is library name (not folder name). In the
|
||||
most cases, library name is pre-defined in manifest file
|
||||
(:ref:`library_config`, ``library.properties``, ``module.json``). The multiple
|
||||
library names are allowed, split them with comma+space ", ".
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:libs_with_highest_priority]
|
||||
lib_use = OneWire_ID1,SPI
|
||||
[env:myenv]
|
||||
lib_force = OneWire, SPI
|
||||
|
||||
.. _projectconf_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:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[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)``.
|
||||
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`.
|
||||
``lib_extra_dirs``
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you want to enable cyclic (recursive, nested) search, please set this option
|
||||
to ``True``. Founded library will be treated like a new source files and
|
||||
``LDF`` will search dependencies for it.
|
||||
.. versionadded:: 3.0
|
||||
.. seealso::
|
||||
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:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:libs_with_enabled_ldf_cyclic]
|
||||
lib_dfcyclic = True
|
||||
[env:custom_lib_dirs]
|
||||
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
|
||||
board = uno
|
||||
|
||||
# enable auto-uploading
|
||||
; enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
@ -646,12 +915,12 @@ Examples
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_port = /dev/ttyUSB0
|
||||
# for Windows OS
|
||||
# upload_port = COM3
|
||||
; for Windows OS
|
||||
; upload_port = COM3
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
|
||||
# enable auto-uploading
|
||||
; enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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)
|
||||
is ``nodemcuv2``.
|
||||
|
||||
|
||||
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
|
||||
toolchains, writing build scripts or configuring uploading process. Just tell
|
||||
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
|
||||
|
||||
#
|
||||
# PlatformIO Project Configuration File
|
||||
#
|
||||
# Please make sure to read documentation with examples first
|
||||
# http://docs.platformio.org/en/stable/projectconf.html
|
||||
#
|
||||
; 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
|
||||
@ -159,7 +160,7 @@ The result of just generated ``platformio.ini``:
|
||||
board = uno
|
||||
|
||||
[env:nodemcuv2]
|
||||
platform = espressif
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = nodemcuv2
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -33,6 +33,11 @@ Options
|
||||
|
||||
.. program:: platformio boards
|
||||
|
||||
.. option::
|
||||
--installed
|
||||
|
||||
List boards only from the installed platforms
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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`
|
||||
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
|
||||
Systems please follow to :ref:`ci` page.
|
||||
|
||||
.. note::
|
||||
: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)>`_.
|
||||
|
||||
.. note::
|
||||
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>`_
|
||||
:ref:`cmd_ci` command is useful for library developers. It allows to build
|
||||
different examples without creating own project per them. Also, is possible
|
||||
to upload firmware to the target device. In this case, you need to pass
|
||||
additional option ``--project-option="targets=upload"``. What is more,
|
||||
you can specify custom upload port using
|
||||
``--project-option="upload_port=<port>"`` option.
|
||||
See :option:`platformio ci --project-option` for details.
|
||||
|
||||
Options
|
||||
-------
|
||||
@ -57,10 +63,10 @@ Options
|
||||
.. option::
|
||||
-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
|
||||
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.
|
||||
|
||||
|
||||
@ -105,17 +111,28 @@ temporary directory within your operation system.
|
||||
Don't remove :option:`platformio ci --build-dir` after build process.
|
||||
|
||||
.. option::
|
||||
--project-conf
|
||||
-P, --project-conf
|
||||
|
||||
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::
|
||||
-v, --verbose
|
||||
|
||||
Shows details about the results of processing environments. More details
|
||||
:option:`platformio run --verbose`
|
||||
Shows detailed information when processing environments.
|
||||
|
||||
This option can be set globally using :ref:`setting_force_verbose` setting
|
||||
or by environment variable :envvar:`PLATFORMIO_SETTING_FORCE_VERBOSE`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
For the examples please follow to :ref:`ci` page.
|
||||
For the others examples please follow to :ref:`ci` page.
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -9,14 +9,14 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
.. _cmd_serialports:
|
||||
.. _cmd_device:
|
||||
|
||||
platformio serialports
|
||||
platformio device
|
||||
======================
|
||||
|
||||
.. contents::
|
||||
|
||||
platformio serialports list
|
||||
platformio device list
|
||||
---------------------------
|
||||
|
||||
Usage
|
||||
@ -24,7 +24,7 @@ Usage
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio serialports list [OPTIONS]
|
||||
platformio device list [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
@ -35,7 +35,7 @@ List available `Serial Ports <http://en.wikipedia.org/wiki/Serial_port>`_
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. program:: platformio serialports list
|
||||
.. program:: platformio device list
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
@ -50,7 +50,7 @@ Examples
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports list
|
||||
$ platformio device list
|
||||
/dev/cu.SLAB_USBtoUART
|
||||
----------
|
||||
Hardware ID: USB VID:PID=10c4:ea60 SNR=0001
|
||||
@ -66,7 +66,7 @@ Examples
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports list
|
||||
$ platformio device list
|
||||
COM4
|
||||
----------
|
||||
Hardware ID: USB VID:PID=0451:F432
|
||||
@ -78,9 +78,9 @@ Examples
|
||||
Description: Silicon Labs CP210x USB to UART Bridge (COM3)
|
||||
|
||||
|
||||
.. _cmd_serialports_monitor:
|
||||
.. _cmd_device_monitor:
|
||||
|
||||
platformio serialports monitor
|
||||
platformio device monitor
|
||||
------------------------------
|
||||
|
||||
Usage
|
||||
@ -88,7 +88,7 @@ Usage
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio serialports monitor [OPTIONS]
|
||||
platformio device monitor [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
@ -112,7 +112,7 @@ To control *monitor* please use these "hot keys":
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. program:: platformio serialports monitor
|
||||
.. program:: platformio device monitor
|
||||
|
||||
.. option::
|
||||
-p, --port
|
||||
@ -194,7 +194,7 @@ ASCII code of special character that is used to exit the application,
|
||||
default ``29`` (DEC).
|
||||
|
||||
For example, to use ``Ctrl+Q`` run
|
||||
``platformio serialports monitor --exit-char 17``.
|
||||
``platformio device monitor --exit-char 17``.
|
||||
|
||||
.. option::
|
||||
--menu-char
|
||||
@ -238,8 +238,8 @@ multiple times:
|
||||
3. hex dump everything
|
||||
|
||||
**REMOVED**: Is not available in Miniterm/PySerial 3.0.
|
||||
See :option:`platformio serialports monitor --encoding` and
|
||||
:option:`platformio serialports monitor --filter` options.
|
||||
See :option:`platformio device monitor --encoding` and
|
||||
:option:`platformio device monitor --filter` options.
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
@ -248,8 +248,8 @@ Examples
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports monitor --help
|
||||
Usage: platformio serialports monitor [OPTIONS]
|
||||
$ platformio device monitor --help
|
||||
Usage: platformio device monitor [OPTIONS]
|
||||
|
||||
Options:
|
||||
-p, --port TEXT Port, a number or a device name
|
||||
@ -276,7 +276,7 @@ Examples
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio serialports monitor
|
||||
$ platformio device monitor
|
||||
|
||||
--- Available ports:
|
||||
--- /dev/cu.Bluetooth-Incoming-Port n/a
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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::
|
||||
-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
|
||||
pre-fill these data:
|
||||
|
||||
@ -65,18 +65,17 @@ The full list with pre-configured boards is available here :ref:`platforms`.
|
||||
.. option::
|
||||
--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.
|
||||
|
||||
A list with supported IDE is available within ``platformio init --help`` command.
|
||||
Also, please take a look at :ref:`ide` page.
|
||||
|
||||
.. option::
|
||||
--enable-auto-uploading
|
||||
-O, --project-option
|
||||
|
||||
If you initialise project with the specified
|
||||
:option:`platformio init --board`, then *PlatformIO*
|
||||
will create environment with enabled firmware auto-uploading.
|
||||
Initialize project with additional options from :ref:`projectconf`. For example,
|
||||
``platformio init --project-option="lib_deps=ArduinoJSON"``.
|
||||
|
||||
.. option::
|
||||
--env-prefix
|
||||
@ -104,7 +103,6 @@ Examples
|
||||
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
|
||||
src - Put your source files here
|
||||
lib - Put here project specific (private) libraries
|
||||
Do you want to continue? [y/N]: y
|
||||
Project has been successfully initialized!
|
||||
Useful commands:
|
||||
`platformio run` - process/build project from the current directory
|
||||
@ -122,14 +120,13 @@ Examples
|
||||
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
|
||||
src - Put your source files here
|
||||
lib - Put here project specific (private) libraries
|
||||
Do you want to continue? [y/N]: y
|
||||
Project has been successfully initialized!
|
||||
Useful commands:
|
||||
`platformio run` - process/build project from the current directory
|
||||
`platformio run --target upload` or `platformio run -t upload` - upload firmware to embedded board
|
||||
`platformio run --target clean` - clean project (remove compiled files)
|
||||
|
||||
3. Initialise project for Arduino Uno
|
||||
3. Initialize project for Arduino Uno
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -143,7 +140,6 @@ Examples
|
||||
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME <-|
|
||||
src - Put your source files here
|
||||
lib - Put here project specific (private) libraries
|
||||
Do you want to continue? [y/N]: y
|
||||
Project has been successfully initialized!
|
||||
Useful commands:
|
||||
`platformio run` - process/build project from the current directory
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@ -64,7 +64,9 @@ Pre-built targets:
|
||||
--upload-port
|
||||
|
||||
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::
|
||||
-d, --project-dir
|
||||
@ -75,17 +77,10 @@ to current working directory (``CWD``).
|
||||
.. option::
|
||||
-v, --verbose
|
||||
|
||||
Shows details about the results of processing environments. Each instance of
|
||||
``--verbose`` on the command line increases the verbosity level by one, so if
|
||||
you need more details on the output, specify it twice.
|
||||
Shows detailed information when processing environments.
|
||||
|
||||
There 3 levels of verbosity:
|
||||
|
||||
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).
|
||||
This option can be set globally using :ref:`setting_force_verbose` setting
|
||||
or by environment variable :envvar:`PLATFORMIO_SETTING_FORCE_VERBOSE`.
|
||||
|
||||
.. option::
|
||||
--disable-auto-clean
|
||||
@ -98,87 +93,285 @@ Examples
|
||||
|
||||
1. Process `Wiring Blink Example <https://github.com/platformio/platformio-examples/tree/develop/wiring-blink>`_
|
||||
|
||||
.. code-block:: bash
|
||||
.. code::
|
||||
|
||||
$ 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.
|
||||
> platformio run
|
||||
|
||||
Processing launchpad_msp430g2 environment:
|
||||
scons: `.pioenvs/launchpad_msp430g2/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_msp430g2/firmware.hex' is up to date.
|
||||
[Wed Sep 7 15:48:58 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
|
||||
-----------------------------------------------------------------------------------------------
|
||||
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:
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date
|
||||
Program: 1034 bytes (3.2% Full)
|
||||
(.text + .data + .bootloader)
|
||||
|
||||
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
|
||||
|
||||
.. code-block:: bash
|
||||
.. code::
|
||||
|
||||
$ platformio run -e arduino_pro5v -e launchpad_lm4f120
|
||||
Processing arduino_pro5v environment:
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/arduino_pro5v/firmware.hex' is up to date.
|
||||
> platformio run -e nodemcu -e teensy31
|
||||
|
||||
Processing launchpad_lm4f120 environment:
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.elf' is up to date.
|
||||
scons: `.pioenvs/launchpad_lm4f120/firmware.hex' is up to date.
|
||||
|
||||
|
||||
3. Process specific target
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio run -t clean
|
||||
Processing arduino_pro5v environment:
|
||||
Removed .pioenvs/arduino_pro5v/src/main.o
|
||||
[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
|
||||
...
|
||||
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:
|
||||
Removed .pioenvs/launchpad_msp430g2/src/main.o
|
||||
[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
|
||||
...
|
||||
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
|
||||
|
||||
.. code-block:: bash
|
||||
.. code::
|
||||
|
||||
$ platformio run -e launchpad_msp430g2 -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.
|
||||
> platformio run -e uno -t upload
|
||||
|
||||
Trying to open interface 1 on 009
|
||||
Initializing FET...
|
||||
FET protocol version is 30394216
|
||||
Configured for Spy-Bi-Wire
|
||||
Sending reset...
|
||||
Set Vcc: 3000 mV
|
||||
Device ID: 0x2553
|
||||
Code start address: 0xc000
|
||||
Code size : 16384 byte = 16 kb
|
||||
RAM start address: 0x200
|
||||
RAM end address: 0x3ff
|
||||
RAM size : 512 byte = 0 kb
|
||||
Device: MSP430G2553/G2403
|
||||
Code memory starts at 0xc000
|
||||
Number of breakpoints: 2
|
||||
Chip ID data: 25 53
|
||||
Erasing...
|
||||
Programming...
|
||||
Writing 646 bytes at c000...
|
||||
Writing 32 bytes at ffe0...
|
||||
Done, 678 bytes total
|
||||
[Wed Sep 7 15:55:11 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
|
||||
--------------------------------------------------------------------------------------------------
|
||||
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
|
||||
Checking program size .pioenvs/uno/firmware.elf
|
||||
text data bss dec hex filename
|
||||
1034 0 9 1043 413 .pioenvs/uno/firmware.elf
|
||||
Building .pioenvs/uno/firmware.hex
|
||||
Looking for upload port...
|
||||
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 ========================
|
||||
|
@ -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");
|
||||
you may not use this file except in compliance with the License.
|
||||
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.
|
||||
|
||||
.. _setting_enable_prompts:
|
||||
.. _setting_disable_ssl:
|
||||
|
||||
``enable_prompts``
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
``disable_ssl``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
:Default: Yes
|
||||
:Default: 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
|
||||
* paginate over library search results
|
||||
* and etc.
|
||||
.. _setting_force_verbose:
|
||||
|
||||
.. warning::
|
||||
If you are going to run *PlatformIO* from **subprocess**, you **MUST
|
||||
DISABLE** all prompts. It will allow you to avoid blocking.
|
||||
``force_verbose``
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
: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:
|
||||
|
||||
@ -148,7 +154,6 @@ Examples
|
||||
check_libraries_interval 7 Check for the library updates interval (days)
|
||||
check_platformio_interval 3 Check for the new PlatformIO interval (days)
|
||||
check_platforms_interval 7 Check for the platform updates interval (days)
|
||||
enable_prompts Yes Can PlatformIO communicate with you via prompts ...
|
||||
enable_telemetry Yes Telemetry service (Yes/No)
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user