From ee086ff5806a41f1d0a53819c98559794fea5fa1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 8 Dec 2016 14:15:13 +0200 Subject: [PATCH] =?UTF-8?q?Produce=20less=20noisy=20output=20when=20?= =?UTF-8?q?=E2=80=9C-s/=E2=80=94silent=E2=80=9D=20options=20are=20used=20f?= =?UTF-8?q?or=20run=20and=20init=20commands=20//=20Resolve=20#850?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HISTORY.rst | 401 ++++++++++++++++++------------------ docs | 2 +- platformio/__init__.py | 2 +- platformio/commands/init.py | 65 +++--- platformio/commands/run.py | 26 ++- 5 files changed, 257 insertions(+), 239 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4c504320..83fd6a47 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,16 +4,25 @@ Release Notes PlatformIO 3.0 -------------- +3.2.2 (2016-12-??) +~~~~~~~~~~~~~~~~~~ + +* Produce less noisy output when ``-s/--silent`` options are used for + `platformio init `_ + and `platformio run `_ + commands + (`issue #850 `_) + 3.2.1 (2016-12-07) ~~~~~~~~~~~~~~~~~~ -* Changed default `LDF Mode `__ +* Changed default `LDF Mode `__ from ``chain+`` to ``chain`` 3.2.0 (2016-12-07) ~~~~~~~~~~~~~~~~~~ -* `PIO Remote™ `__. +* `PIO Remote™ `__. **Your devices are always with you!** + Over-The-Air (OTA) Device Manager @@ -22,44 +31,44 @@ PlatformIO 3.0 + Continuous Deployment + Continuous Delivery -* Integration with `Cloud IDEs `__ +* Integration with `Cloud IDEs `__ + Cloud9 + Codeanywhere + Eclipse Che -* `PIO Account `__ - and `PLATFORMIO_AUTH_TOKEN `__ +* `PIO Account `__ + and `PLATFORMIO_AUTH_TOKEN `__ environment variable for CI systems (`issue #808 `_, `issue #467 `_) * Inject system environment variables to configuration settings in - `Project Configuration File "platformio.ini" `__ + `Project Configuration File "platformio.ini" `__ (`issue #792 `_) * Custom boards per project with ``boards_dir`` option in - `Project Configuration File "platformio.ini" `__ + `Project Configuration File "platformio.ini" `__ (`issue #515 `_) -* Unix shell-style wildcards for `upload_port `_ +* Unix shell-style wildcards for `upload_port `_ (`issue #839 `_) -* Refactored `Library Dependency Finder (LDF) `__ +* Refactored `Library Dependency Finder (LDF) `__ C/C++ Preprocessor for conditional syntax (``#ifdef``, ``#if``, ``#else``, ``#elif``, ``#define``, etc.) (`issue #837 `_) -* Added new `LDF Modes `__: +* Added new `LDF Modes `__: ``chain+`` and ``deep+`` and set ``chain+`` as default * Added global ``lib_extra_dirs`` option to ``[platformio]`` section for - `Project Configuration File "platformio.ini" `__ + `Project Configuration File "platformio.ini" `__ (`issue #842 `_) -* Enabled caching by default for API requests and Library Manager (see `enable_cache `__ setting) +* Enabled caching by default for API requests and Library Manager (see `enable_cache `__ setting) * Native integration with VIM/Neovim using `neomake-platformio `__ plugin * Changed a default exit combination for Device Monitor from ``Ctrl+]`` to ``Ctrl+C`` * Improved detecting of ARM mbed media disk for uploading * Improved Project Generator for CLion IDE when source folder contains nested items * Improved handling of library dependencies specified in ``library.json`` manifest (`issue #814 `_) -* Improved `Library Dependency Finder (LDF) `__ +* Improved `Library Dependency Finder (LDF) `__ for circular dependencies -* Show vendor version of a package for `platformio platform show `__ command +* Show vendor version of a package for `platformio platform show `__ command (`issue #838 `_) * Fixed unable to include SSH user in ``lib_deps`` repository url (`issue #830 `_) @@ -158,15 +167,15 @@ PlatformIO 3.0 3.1.0 (2016-09-19) ~~~~~~~~~~~~~~~~~~ -* New! Dynamic variables/templates for `Project Configuration File "platformio.ini" `__ +* New! Dynamic variables/templates for `Project Configuration File "platformio.ini" `__ (`issue #705 `_) * Summary about processed environments (`issue #777 `_) * Implemented LocalCache system for API and improved a work in off-line mode * Improved Project Generator when custom ``--project-option`` is passed to - `platformio init `__ + `platformio init `__ command -* Deprecated ``lib_force`` option, please use `lib_deps `__ instead +* Deprecated ``lib_force`` option, please use `lib_deps `__ instead * Return valid exit code from ``plaformio test`` command * Fixed Project Generator for CLion IDE using Windows OS (`issue #785 `_) @@ -178,7 +187,7 @@ PlatformIO 3.0 * Development platform `Espressif 8266 `__ + Add support for `SparkFun Blynk Board `_ - + Created `staging `__ + + Created `staging `__ branch to work with development version of Arduino Framework * Development platform `Freescale Kinetis `__ @@ -226,7 +235,7 @@ PlatformIO 3.0 * `PlatformIO Plus `__ - + Local and Embedded `Unit Testing `__ + + Local and Embedded `Unit Testing `__ (`issue #408 `_, `issue #519 `_) @@ -244,7 +253,7 @@ PlatformIO 3.0 * Library Manager 3.0 - + Project dependencies per build environment using `lib_deps `__ option + + Project dependencies per build environment using `lib_deps `__ option (`issue #413 `_) + `Semantic Versioning `__ for library commands and dependencies @@ -263,18 +272,18 @@ PlatformIO 3.0 * New Intelligent Library Build System - + `Library Dependency Finder `__ + + `Library Dependency Finder `__ that interprets C/C++ Preprocessor conditional macros with deep search behavior + Check library compatibility with project environment before building (`issue #415 `_) + Control Library Dependency Finder for compatibility using - `lib_compat_mode `__ + `lib_compat_mode `__ option + Custom library storages/directories with - `lib_extra_dirs `__ option + `lib_extra_dirs `__ option (`issue #537 `_) + Handle extra build flags, source filters and build script from - `library.json `__ + `library.json `__ (`issue #289 `_) + Allowed to disable library archiving (``*.ar``) (`issue #719 `_) @@ -296,7 +305,7 @@ PlatformIO 3.0 * Improved INO to CPP converter (`issue #659 `_, `issue #765 `_) -* Added ``license`` field to `library.json `__ +* Added ``license`` field to `library.json `__ (`issue #522 `_) * Warn about unknown options in project configuration file ``platformio.ini`` (`issue #740 `_) @@ -333,11 +342,11 @@ PlatformIO 2.0 2.11.2 (2016-08-02) ~~~~~~~~~~~~~~~~~~~ -* Improved support for `Microchip PIC32 `__ development platform and ChipKIT boards +* Improved support for `Microchip PIC32 `__ development platform and ChipKIT boards (`issue #438 `_) * Added support for Pinoccio Scout board (`issue #52 `_) -* Added support for `Teensy USB Features `__ +* Added support for `Teensy USB Features `__ (HID, SERIAL_HID, DISK, DISK_SDFLASH, MIDI, etc.) (`issue #722 `_) * Switched to built-in GCC LwIP library for Espressif development platform @@ -362,25 +371,25 @@ PlatformIO 2.0 (`issue #472 `_) * Added support for Microchip chipKIT Lenny board * Updated Microchip PIC32 Arduino framework to v1.2.1 -* Documented `uploading of EEPROM data `__ +* Documented `uploading of EEPROM data `__ (from EEMEM directive) * Added ``Rebuild C/C++ Project Index`` target to CLion and Eclipse IDEs -* Improved project generator for `CLion IDE `__ +* Improved project generator for `CLion IDE `__ * Added ``udev`` rules for OpenOCD CMSIS-DAP adapters (`issue #718 `_) * Auto-remove project cache when PlatformIO is upgraded * Keep user changes for ``.gitignore`` file when re-generate/update project data * Ignore ``[platformio]`` section from custom project configuration file when - `platformio ci --project-conf `__ + `platformio ci --project-conf `__ command is used * Fixed missed ``--boot`` flag for the firmware uploader for ATSAM3X8E Cortex-M3 MCU based boards (Arduino Due, etc) (`issue #710 `_) * Fixed missing trailing ``\`` for the source files list when generate project - for `Qt Creator IDE `__ + for `Qt Creator IDE `__ (`issue #711 `_) * Split source files to ``HEADERS`` and ``SOURCES`` when generate project - for `Qt Creator IDE `__ + for `Qt Creator IDE `__ (`issue #713 `_) 2.11.0 (2016-06-28) @@ -457,7 +466,7 @@ PlatformIO 2.0 2.9.2 (2016-06-02) ~~~~~~~~~~~~~~~~~~ -* Simplified `Continuous Integration with AppVeyor `__ +* Simplified `Continuous Integration with AppVeyor `__ (`issue #671 `_) * Automatically add source directory to ``CPPPATH`` of Build System * Added support for Silicon Labs SLSTK3401A (Pearl Gecko) and @@ -491,21 +500,21 @@ PlatformIO 2.0 2.9.0 (2016-04-28) ~~~~~~~~~~~~~~~~~~ -* Project generator for `CodeBlocks IDE `__ +* Project generator for `CodeBlocks IDE `__ (`issue #600 `_) -* New `Lattice iCE40 FPGA `__ +* New `Lattice iCE40 FPGA `__ development platform with support for Lattice iCEstick FPGA Evaluation Kit and BQ IceZUM Alhambra FPGA (`issue #480 `_) -* New `Intel ARC 32-bit `_ +* New `Intel ARC 32-bit `_ development platform with support for Arduino/Genuino 101 board (`issue #535 `_) -* New `Microchip PIC32 `__ +* New `Microchip PIC32 `__ development platform with support for 20+ different PIC32 based boards (`issue #438 `_) -* New RTOS and build Framework named `Simba `__ +* New RTOS and build Framework named `Simba `__ (`issue #412 `_) -* New boards for `ARM mbed `__ +* New boards for `ARM mbed `__ framework: ST Nucleo F410RB, ST Nucleo L073RZ and BBC micro:bit * Added support for Arduino.Org boards: Arduino Leonardo ETH, Arduino Yun Mini, Arduino Industrial 101 and Linino One @@ -516,7 +525,7 @@ PlatformIO 2.0 * Added support for MightyCore boards: ATmega1284, ATmega644, ATmega324, ATmega164, ATmega32, ATmega16 and ATmega8535 (`issue #585 `_) -* Added support for `TI MSP430 `__ +* Added support for `TI MSP430 `__ boards: TI LaunchPad w/ msp430fr4133 and TI LaunchPad w/ msp430fr6989 * Updated Arduino core for Espressif platform to 2.2.0 (`issue #627 `_) @@ -524,14 +533,14 @@ PlatformIO 2.0 (`issue #366 `_) * PlatformIO Library Registry in JSON format! Implemented ``--json-output`` and ``--page`` options for - `platformio lib search `__ + `platformio lib search `__ command (`issue #604 `_) -* Allowed to specify default environments `env_default `__ +* Allowed to specify default environments `env_default `__ which should be processed by default with ``platformio run`` command (`issue #576 `_) * Allowed to unflag(remove) base/initial flags using - `build_unflags `__ + `build_unflags `__ option (`issue #559 `_) * Allowed multiple VID/PID pairs when detecting serial ports @@ -582,7 +591,7 @@ PlatformIO 2.0 2.8.5 (2016-03-07) ~~~~~~~~~~~~~~~~~~ -* Project generator for `NetBeans IDE `__ +* Project generator for `NetBeans IDE `__ (`issue #541 `_) * Created package for Homebrew Mac OS X Package Manager: ``brew install platformio`` @@ -590,21 +599,21 @@ PlatformIO 2.0 * Updated Arduino core for Espressif platform to 2.1.0 (`issue #544 `_) * Added support for the ESP8266 ESP-07 board to - `Espressif `__ + `Espressif `__ (`issue #527 `_) * Improved handling of String-based ``CPPDEFINES`` passed to extra ``build_flags`` (`issue #526 `_) * Generate appropriate project for CLion IDE and CVS (`issue #523 `_) -* Use ``src_dir`` directory from `Project Configuration File platformio.ini `__ +* Use ``src_dir`` directory from `Project Configuration File platformio.ini `__ when initializing project otherwise create base ``src`` directory (`issue #536 `_) * Fixed issue with incorrect handling of user's build flags where the base flags were passed after user's flags to GCC compiler (`issue #528 `_) * Fixed issue with Project Generator when optional build flags were passed using - system environment variables: `PLATFORMIO_BUILD_FLAGS `__ - or `PLATFORMIO_BUILD_SRC_FLAGS `__ + system environment variables: `PLATFORMIO_BUILD_FLAGS `__ + or `PLATFORMIO_BUILD_SRC_FLAGS `__ * Fixed invalid detecting of compiler type (`issue #550 `_) * Fixed issue with updating package which was deleted manually by user @@ -617,18 +626,18 @@ PlatformIO 2.0 * Added support for the new ESP8266-based boards (ESPDuino, ESP-WROOM-02, ESPresso Lite 1.0 & 2.0, SparkFun ESP8266 Thing Dev, ThaiEasyElec ESPino) to - `Espressif `__ + `Espressif `__ development platform -* Added ``board_f_flash`` option to `Project Configuration File platformio.ini `__ - which allows to specify `custom flash chip frequency `_ +* Added ``board_f_flash`` option to `Project Configuration File platformio.ini `__ + which allows to specify `custom flash chip frequency `_ for Espressif development platform (`issue #501 `_) -* Added ``board_flash_mode`` option to `Project Configuration File platformio.ini `__ - which allows to specify `custom flash chip mode `_ +* Added ``board_flash_mode`` option to `Project Configuration File platformio.ini `__ + which allows to specify `custom flash chip mode `_ for Espressif development platform * Handle new environment variables - `PLATFORMIO_UPLOAD_PORT `_ - and `PLATFORMIO_UPLOAD_FLAGS `_ + `PLATFORMIO_UPLOAD_PORT `_ + and `PLATFORMIO_UPLOAD_FLAGS `_ (`issue #518 `_) * Fixed issue with ``CPPDEFINES`` which contain space and break PlatformIO IDE Linter @@ -664,19 +673,19 @@ PlatformIO 2.0 2.8.0 (2016-01-29) ~~~~~~~~~~~~~~~~~~ -* `PlatformIO IDE `_ for +* `PlatformIO IDE `_ for Atom (`issue #470 `_) * Added ``pio`` command line alias for ``platformio`` command (`issue #447 `_) * Added SPL-Framework support for Nucleo F401RE board (`issue #453 `_) -* Added ``upload_resetmethod`` option to `Project Configuration File platformio.ini `__ - which allows to specify `custom upload reset method `_ +* Added ``upload_resetmethod`` option to `Project Configuration File platformio.ini `__ + which allows to specify `custom upload reset method `_ for Espressif development platform (`issue #444 `_) * Allowed to force output of color ANSI-codes or to disable progress bar even - if the output is a ``pipe`` (not a ``tty``) using `Environment variables `__ + if the output is a ``pipe`` (not a ``tty``) using `Environment variables `__ (`issue #465 `_) * Set 1Mb SPIFFS for Espressif boards by default (`issue #458 `_) @@ -691,7 +700,7 @@ PlatformIO 2.0 * Initial support for Arduino Zero board (`issue #356 `_) * Added support for completions to Atom text editor using ``.clang_complete`` -* Generate default targets for `supported IDE `__ +* Generate default targets for `supported IDE `__ (CLion, Eclipse IDE, Emacs, Sublime Text, VIM): Build, Clean, Upload, Upload SPIFFS image, Upload using Programmer, Update installed platforms and libraries @@ -721,12 +730,12 @@ PlatformIO 2.0 (`issue #403 `_) * Added support for RFDuino (`issue #319 `_) -* Project generator for `Emacs `__ +* Project generator for `Emacs `__ text editor (`pull #404 `_) * Updated Arduino framework for Atmel AVR development platform to 1.6.7 * Documented `firmware uploading for Atmel AVR development platform using - Programmers `_: + Programmers `_: AVR ISP, AVRISP mkII, USBtinyISP, USBasp, Parallel Programmer and Arduino as ISP * Fixed issue with current Python interpreter for Python-based tools (`issue #417 `_) @@ -752,13 +761,13 @@ PlatformIO 2.0 * Added support for the new ESP8266-based boards (SparkFun ESP8266 Thing, NodeMCU 0.9 & 1.0, Olimex MOD-WIFI-ESP8266(-DEV), Adafruit HUZZAH ESP8266, ESPino, SweetPea ESP-210, WeMos D1, WeMos D1 mini) to - `Espressif `__ + `Espressif `__ development platform * Created public `platformio-pkg-ldscripts `_ repository for LD scripts. Moved common configuration for ESP8266 MCU to ``esp8266.flash.common.ld`` (`issue #379 `_) -* Improved documentation for `Espressif `__ +* Improved documentation for `Espressif `__ development platform: OTA update, custom Flash Size, Upload Speed and CPU frequency * Fixed reset method for Espressif NodeMCU (ESP-12E Module) @@ -775,17 +784,17 @@ PlatformIO 2.0 * Install only required packages depending on build environment (`issue #308 `_) -* Added support for Raspberry Pi `WiringPi `__ +* Added support for Raspberry Pi `WiringPi `__ framework (`issue #372 `_) -* Implemented Over The Air (OTA) upgrades for `Espressif `__ +* Implemented Over The Air (OTA) upgrades for `Espressif `__ development platform. (`issue #365 `_) -* Updated `CMSIS framework `__ +* Updated `CMSIS framework `__ and added CMSIS support for Nucleo F401RE board (`issue #373 `_) * Added support for Espressif ESP8266 ESP-01-1MB board (ready for OTA) -* Handle ``upload_flags`` option in `platformio.ini `__ +* Handle ``upload_flags`` option in `platformio.ini `__ (`issue #368 `_) * Improved PlatformIO installation on the Mac OS X El Capitan @@ -793,13 +802,13 @@ PlatformIO 2.0 ~~~~~~~~~~~~~~~~~~ * Improved code builder for parallel builds (up to 4 times faster than before) -* Generate `.travis.yml `__ +* Generate `.travis.yml `__ CI and `.gitignore` files for embedded projects by default (`issue #354 `_) -* Removed prompt with "auto-uploading" from `platformio init `__ +* Removed prompt with "auto-uploading" from `platformio init `__ command and added ``--enable-auto-uploading`` option (`issue #352 `_) -* Fixed incorrect behaviour of `platformio serialports monitor `__ +* Fixed incorrect behaviour of `platformio serialports monitor `__ in pair with PySerial 3.0 2.4.1 (2015-12-01) @@ -816,7 +825,7 @@ PlatformIO 2.0 * Updated Arduino core for Espressif platform to 2.0.0 (`issue #345 `_) * Added to FAQ explanation of `Can not compile a library that compiles without issue - with Arduino IDE `_ + with Arduino IDE `_ (`issue #331 `_) * Fixed ESP-12E flash size (`pull #333 `_) @@ -829,7 +838,7 @@ PlatformIO 2.0 2.3.5 (2015-11-18) ~~~~~~~~~~~~~~~~~~ -* Added support of `libOpenCM3 `_ +* Added support of `libOpenCM3 `_ framework for Nucleo F103RB board (`issue #309 `_) * Added support for Espressif ESP8266 ESP-12E board (NodeMCU) @@ -838,13 +847,13 @@ PlatformIO 2.0 (`issue #307 `_) * Updated Arduino AVR/SAM frameworks to 1.6.6 (`issue #321 `_) -* Upload firmware using external programmer via `platformio run --target program `__ +* Upload firmware using external programmer via `platformio run --target program `__ target (`issue #311 `_) * Fixed handling of upload port when ``board`` option is not specified in - `platformio.ini `__ + `platformio.ini `__ (`issue #313 `_) -* Fixed firmware uploading for `nordicrf51 `__ +* Fixed firmware uploading for `nordicrf51 `__ development platform (`issue #316 `_) * Fixed installation on Mac OS X El Capitan @@ -860,18 +869,18 @@ PlatformIO 2.0 2.3.4 (2015-10-13) ~~~~~~~~~~~~~~~~~~ -* Full support of `CLion IDE `_ +* Full support of `CLion IDE `_ including code auto-completion (`issue #132 `_) -* PlatformIO `command completion in Terminal `_ for ``bash`` and ``zsh`` +* PlatformIO `command completion in Terminal `_ for ``bash`` and ``zsh`` * Added support for ubIQio Ardhat board (`pull #302 `_) * Install SCons automatically and avoid ``error: option --single-version-externally-managed not recognized`` (`issue #279 `_) * Use Teensy CLI Loader for upload of .hex files on Mac OS X (`issue #306 `_) -* Fixed missing `framework-mbed `_ - package for `teensy `_ +* Fixed missing `framework-mbed `_ + package for `teensy `_ platform (`issue #305 `_) @@ -893,7 +902,7 @@ PlatformIO 2.0 * Allowed to use ST-Link uploader for mbed-based projects * Explained how to use ``lib`` directory from the PlatformIO based project in ``readme.txt`` which will be automatically generated using - `platformio init `__ + `platformio init `__ command (`issue #273 `_) * Found solution for "pip/scons error: option --single-version-externally-managed not @@ -906,44 +915,44 @@ PlatformIO 2.0 2.3.1 (2015-09-06) ~~~~~~~~~~~~~~~~~~ -* Fixed critical issue when `platformio init --ide `__ command hangs PlatformIO +* Fixed critical issue when `platformio init --ide `__ command hangs PlatformIO (`issue #283 `_) 2.3.0 (2015-09-05) ~~~~~~~~~~~~~~~~~~ * Added - `native `__, - `linux_arm `__, - `linux_i686 `__, - `linux_x86_64 `__, - `windows_x86 `__ + `native `__, + `linux_arm `__, + `linux_i686 `__, + `linux_x86_64 `__, + `windows_x86 `__ development platforms (`issue #263 `_) -* Added `PlatformIO Demo `_ +* Added `PlatformIO Demo `_ page to documentation -* Simplified `installation `__ +* Simplified `installation `__ process of PlatformIO (`issue #274 `_) -* Significantly improved `Project Generator `__ which allows to integrate with `the most popular - IDE `__ +* Significantly improved `Project Generator `__ which allows to integrate with `the most popular + IDE `__ * Added short ``-h`` help option for PlatformIO and sub-commands -* Updated `mbed `__ +* Updated `mbed `__ framework -* Updated ``tool-teensy`` package for `Teensy `__ +* Updated ``tool-teensy`` package for `Teensy `__ platform (`issue #268 `_) -* Added FAQ answer when `Program "platformio" not found in PATH `_ +* Added FAQ answer when `Program "platformio" not found in PATH `_ (`issue #272 `_) * Generate "readme.txt" for project "lib" directory (`issue #273 `_) * Use toolchain's includes pattern ``include*`` for Project Generator (`issue #277 `_) * Added support for Adafruit Gemma board to - `atmelavr `__ + `atmelavr `__ platform (`pull #256 `_) -* Fixed includes list for Windows OS when generating project for `Eclipse IDE `__ +* Fixed includes list for Windows OS when generating project for `Eclipse IDE `__ (`issue #270 `_) * Fixed ``AttributeError: 'module' object has no attribute 'packages'`` (`issue #252 `_) @@ -951,15 +960,15 @@ PlatformIO 2.0 2.2.2 (2015-07-30) ~~~~~~~~~~~~~~~~~~ -* Integration with `Atom IDE `__ +* Integration with `Atom IDE `__ * Support for off-line/unpublished/private libraries (`issue #260 `_) * Disable project auto-clean while building/uploading firmware using - `platformio run --disable-auto-clean `_ option + `platformio run --disable-auto-clean `_ option (`issue #255 `_) -* Show internal errors from "Miniterm" using `platformio serialports monitor `__ command +* Show internal errors from "Miniterm" using `platformio serialports monitor `__ command (`issue #257 `_) -* Fixed `platformio serialports monitor --help `__ information with HEX char for hotkeys +* Fixed `platformio serialports monitor --help `__ information with HEX char for hotkeys (`issue #253 `_) * Handle "OSError: [Errno 13] Permission denied" for PlatformIO installer script (`issue #254 `_) @@ -967,35 +976,35 @@ PlatformIO 2.0 2.2.1 (2015-07-17) ~~~~~~~~~~~~~~~~~~ -* Project generator for `CLion IDE `__ +* Project generator for `CLion IDE `__ (`issue #132 `_) -* Updated ``tool-bossac`` package to 1.5 version for `atmelsam `__ platform +* Updated ``tool-bossac`` package to 1.5 version for `atmelsam `__ platform (`issue #251 `_) -* Updated ``sdk-esp8266`` package for `espressif `__ platform -* Fixed incorrect arguments handling for `platformio serialports monitor `_ command +* Updated ``sdk-esp8266`` package for `espressif `__ platform +* Fixed incorrect arguments handling for `platformio serialports monitor `_ command (`issue #248 `_) 2.2.0 (2015-07-01) ~~~~~~~~~~~~~~~~~~ * Allowed to exclude/include source files from build process using - `src_filter `__ + `src_filter `__ (`issue #240 `_) * Launch own extra script before firmware building/uploading processes (`issue #239 `_) * Specify own path to the linker script (ld) using - `build_flags `__ + `build_flags `__ option (`issue #233 `_) * Specify library compatibility with the all platforms/frameworks using ``*`` symbol in - `library.json `__ + `library.json `__ * Added support for new embedded boards: *ST 32L0538DISCOVERY and Delta DFCM-NNN40* - to `Framework mbed `__ + to `Framework mbed `__ * Updated packages for - `Framework Arduino (AVR, SAM, Espressif and Teensy cores `__, - `Framework mbed `__, - `Espressif ESP8266 SDK `__ + `Framework Arduino (AVR, SAM, Espressif and Teensy cores `__, + `Framework mbed `__, + `Espressif ESP8266 SDK `__ (`issue #246 `_) * Fixed ``stk500v2_command(): command failed`` (`issue #238 `_) @@ -1023,19 +1032,19 @@ PlatformIO 2.0 2.1.0 (2015-06-03) ~~~~~~~~~~~~~~~~~~ -* Added Silicon Labs EFM32 `siliconlabsefm32 `_ +* Added Silicon Labs EFM32 `siliconlabsefm32 `_ development platform (`issue #226 `_) * Integrate PlatformIO with `Circle CI `_ and `Shippable CI `_ -* Described in documentation how to `create/register own board `_ for PlatformIO +* Described in documentation how to `create/register own board `_ for PlatformIO * Disabled "nano.specs" for ARM-based platforms (`issue #219 `_) * Fixed "ConnectionError" when PlatformIO SF Storage is off-line * Fixed resolving of C/C++ std libs by Eclipse IDE (`issue #220 `_) * Fixed firmware uploading using USB programmer (USBasp) for - `atmelavr `_ + `atmelavr `_ platform (`issue #221 `_) @@ -1048,16 +1057,16 @@ PlatformIO 2.0 ~~~~~~~~~~~~~~~~~~ * Handle new environment variable - `PLATFORMIO_BUILD_FLAGS `_ + `PLATFORMIO_BUILD_FLAGS `_ * Pass to API requests information about Continuous Integration system. This information will be used by PlatformIO-API. * Use ``include`` directories from toolchain when initialising project for IDE (`issue #210 `_) * Added support for new WildFire boards from `Wicked Device `_ to - `atmelavr `__ + `atmelavr `__ platform -* Updated `Arduino Framework `__ to +* Updated `Arduino Framework `__ to 1.6.4 version (`issue #212 `_) * Handle Atmel AVR Symbols when initialising project for IDE (`issue #216 `_) @@ -1070,7 +1079,7 @@ PlatformIO 2.0 *Made in* `Paradise `_ -* PlatformIO as `Continuous Integration `_ +* PlatformIO as `Continuous Integration `_ (CI) tool for embedded projects (`issue #108 `_) * Initialise PlatformIO project for the specified IDE @@ -1083,29 +1092,29 @@ PlatformIO 2.0 * Global ``-f, --force`` option which will force to accept any confirmation prompts (`issue #152 `_) -* Run project with `platformio run --project-dir `_ option without changing the current working +* Run project with `platformio run --project-dir `_ option without changing the current working directory (`issue #192 `_) -* Control verbosity of `platformio run `_ command via ``-v/--verbose`` option +* Control verbosity of `platformio run `_ command via ``-v/--verbose`` option * Add library dependencies for build environment using - `lib_install `_ + `lib_install `_ option in ``platformio.ini`` (`issue #134 `_) * Specify libraries which are compatible with build environment using - `lib_use `_ + `lib_use `_ option in ``platformio.ini`` (`issue #148 `_) * Add more boards to PlatformIO project with - `platformio init --board `__ + `platformio init --board `__ command (`issue #167 `_) * Choose which library to update (`issue #168 `_) -* Specify `platformio init --env-prefix `__ when initialise/update project +* Specify `platformio init --env-prefix `__ when initialise/update project (`issue #182 `_) * Added new Armstrap boards (`issue #204 `_) -* Updated SDK for `espressif `__ +* Updated SDK for `espressif `__ development platform to v1.1 (`issue #179 `_) * Disabled automatic updates by default for platforms, packages and libraries @@ -1122,7 +1131,7 @@ PlatformIO 1.0 * Added support of `Framework mbed `_ for Teensy 3.1 (`issue #183 `_) -* Added GDB as alternative uploader to `ststm32 `__ platform +* Added GDB as alternative uploader to `ststm32 `__ platform (`issue #175 `_) * Added `examples `__ with preconfigured IDE projects @@ -1142,22 +1151,22 @@ PlatformIO 1.0 1.4.0 (2015-04-11) ~~~~~~~~~~~~~~~~~~ -* Added `espressif `_ +* Added `espressif `_ development platform with ESP01 board * Integrated PlatformIO with AppVeyor Windows based Continuous Integration system (`issue #149 `_) * Added support for Teensy LC board to - `teensy `__ + `teensy `__ platform * Added support for new Arduino based boards by *SparkFun, BQ, LightUp, LowPowerLab, Quirkbot, RedBearLab, TinyCircuits* to - `atmelavr `__ + `atmelavr `__ platform -* Upgraded `Arduino Framework `__ to +* Upgraded `Arduino Framework `__ to 1.6.3 version (`issue #156 `_) -* Upgraded `Energia Framework `__ to +* Upgraded `Energia Framework `__ to 0101E0015 version (`issue #146 `_) -* Upgraded `Arduino Framework with Teensy Core `_ +* Upgraded `Arduino Framework with Teensy Core `_ to 1.22 version (`issue #162 `_, `issue #170 `_) @@ -1172,12 +1181,12 @@ PlatformIO 1.0 account to `PlatformIO Organisation `_ (`issue #138 `_) * Added support for new Arduino based boards by *SparkFun, RepRap, Sanguino* to - `atmelavr `__ + `atmelavr `__ platform (`issue #127 `_, `issue #131 `_) -* Added integration instructions for `Visual Studio `_ - and `Sublime Text `_ IDEs +* Added integration instructions for `Visual Studio `_ + and `Sublime Text `_ IDEs * Improved handling of multi-file ``*.ino/pde`` sketches (`issue #130 `_) * Fixed wrong insertion of function prototypes converting ``*.ino/pde`` @@ -1189,31 +1198,31 @@ PlatformIO 1.0 1.2.0 (2015-03-20) ~~~~~~~~~~~~~~~~~~ -* Added full support of `mbed `__ +* Added full support of `mbed `__ framework including libraries: *RTOS, Ethernet, DSP, FAT, USB*. -* Added `freescalekinetis `_ +* Added `freescalekinetis `_ development platform with Freescale Kinetis Freedom boards -* Added `nordicnrf51 `_ +* Added `nordicnrf51 `_ development platform with supported boards from *JKSoft, Nordic, RedBearLab, Switch Science* -* Added `nxplpc `_ +* Added `nxplpc `_ development platform with supported boards from *CQ Publishing, Embedded Artists, NGX Technologies, NXP, Outrageous Circuits, SeeedStudio, Solder Splash Labs, Switch Science, u-blox* * Added support for *ST Nucleo* boards to - `ststm32 `__ + `ststm32 `__ development platform -* Created new `Frameworks `__ +* Created new `Frameworks `__ page in documentation and added to `PlatformIO Web Site `_ (`issue #115 `_) * Introduced online `Embedded Boards Explorer `_ * Automatically append define ``-DPLATFORMIO=%version%`` to builder (`issue #105 `_) * Renamed ``stm32`` development platform to - `ststm32 `__ + `ststm32 `__ * Renamed ``opencm3`` framework to - `libopencm3 `__ -* Fixed uploading for `atmelsam `__ + `libopencm3 `__ +* Fixed uploading for `atmelsam `__ development platform * Fixed re-arranging the ``*.ino/pde`` files when converting to ``*.cpp`` (`issue #100 `_) @@ -1224,15 +1233,15 @@ PlatformIO 1.0 * Implemented ``PLATFORMIO_*`` environment variables (`issue #102 `_) * Added support for *SainSmart* boards to - `atmelsam `__ + `atmelsam `__ development platform * Added - `Project Configuration `__ - option named `envs_dir `__ + `Project Configuration `__ + option named `envs_dir `__ * Disabled "prompts" automatically for *Continuous Integration* systems (`issue #103 `_) * Fixed firmware uploading for - `atmelavr `__ + `atmelavr `__ boards which work within ``usbtiny`` protocol * Fixed uploading for *Digispark* board (`issue #106 `_) @@ -1245,26 +1254,26 @@ PlatformIO 1.0 * Added support for *ARM*-based credit-card sized computers: `Raspberry Pi `_, `BeagleBone `_ and `CubieBoard `_ -* Added `atmelsam `__ +* Added `atmelsam `__ development platform with supported boards: *Arduino Due and Digistump DigiX* (`issue #71 `_) -* Added `ststm32 `__ +* Added `ststm32 `__ development platform with supported boards: *Discovery kit for STM32L151/152, STM32F303xx, STM32F407/417 lines* and `libOpenCM3 Framework `_ (`issue #73 `_) -* Added `teensy `_ +* Added `teensy `_ development platform with supported boards: *Teensy 2.x & 3.x* (`issue #72 `_) * Added new *Arduino* boards to - `atmelavr `__ + `atmelavr `__ platform: *Arduino NG, Arduino BT, Arduino Esplora, Arduino Ethernet, Arduino Robot Control, Arduino Robot Motor and Arduino Yun* * Added support for *Adafruit* boards to - `atmelavr `__ + `atmelavr `__ platform: *Adafruit Flora and Adafruit Trinkets* (`issue #65 `_) * Added support for *Digispark* boards to - `atmelavr `__ + `atmelavr `__ platform: *Digispark USB Development Board and Digispark Pro* (`issue #47 `_) * Covered code with tests (`issue #2 `_) @@ -1272,24 +1281,24 @@ PlatformIO 1.0 `#48 `_, `#50 `_, `#55 `_) -* Added `src_dir `__ +* Added `src_dir `__ option to ``[platformio]`` section of - `platformio.ini `__ + `platformio.ini `__ which allows to redefine location to project's source directory (`issue #83 `_) * Added ``--json-output`` option to - `platformio boards `__ - and `platformio search `__ + `platformio boards `__ + and `platformio search `__ commands which allows to return the output in `JSON `_ format (`issue #42 `_) * Allowed to ignore some libs from *Library Dependency Finder* via - `lib_ignore `_ option -* Improved `platformio run `__ + `lib_ignore `_ option +* Improved `platformio run `__ command: asynchronous output for build process, timing and detailed information about environment configuration (`issue #74 `_) * Output compiled size and static memory usage with - `platformio run `__ + `platformio run `__ command (`issue #59 `_) * Updated `framework-arduino` AVR & SAM to 1.6 stable version * Fixed an issue with the libraries that are git repositories @@ -1313,19 +1322,19 @@ PlatformIO 0.0 * Fixed an issue with ``--json-output`` (`issue #42 `_) * Fixed an exception during - `platformio upgrade `__ + `platformio upgrade `__ under Windows OS (`issue #45 `_) 0.10.1 (2015-01-02) ~~~~~~~~~~~~~~~~~~~ * Added ``--json-output`` option to - `platformio list `__, - `platformio serialports list `__ and - `platformio lib list `__ + `platformio list `__, + `platformio serialports list `__ and + `platformio lib list `__ commands which allows to return the output in `JSON `_ format (`issue #42 `_) -* Fixed missing auto-uploading by default after `platformio init `__ +* Fixed missing auto-uploading by default after `platformio init `__ command 0.10.0 (2015-01-01) @@ -1333,19 +1342,19 @@ PlatformIO 0.0 **Happy New Year!** -* Implemented `platformio boards `_ +* Implemented `platformio boards `_ command (`issue #11 `_) * Added support of *Engduino* boards for - `atmelavr `__ + `atmelavr `__ platform (`issue #38 `_) -* Added ``--board`` option to `platformio init `__ +* Added ``--board`` option to `platformio init `__ command which allows to initialise project with the specified embedded boards (`issue #21 `_) -* Added `example with uploading firmware `_ +* Added `example with uploading firmware `_ via USB programmer (USBasp) for - `atmelavr `_ + `atmelavr `_ *MCUs* (`issue #35 `_) -* Automatic detection of port on `platformio serialports monitor `_ +* Automatic detection of port on `platformio serialports monitor `_ (`issue #37 `_) * Allowed auto-installation of platforms when prompts are disabled (`issue #43 `_) * Fixed urllib3's *SSL* warning under Python <= 2.7.2 (`issue #39 `_) @@ -1363,11 +1372,11 @@ PlatformIO 0.0 ~~~~~~~~~~~~~~~~~~ * Ask user to install platform (when it hasn't been installed yet) within - `platformio run `__ - and `platformio show `_ commands + `platformio run `__ + and `platformio show `_ commands * Improved main `documentation `_ * Fixed "*OSError: [Errno 2] No such file or directory*" within - `platformio run `__ + `platformio run `__ command when PlatformIO isn't installed properly * Fixed example for `Eclipse IDE with Tiva board `_ (`issue #32 `_) @@ -1377,8 +1386,8 @@ PlatformIO 0.0 0.9.0 (2014-12-01) ~~~~~~~~~~~~~~~~~~ -* Implemented `platformio settings `_ command -* Improved `platformio init `_ command. +* Implemented `platformio settings `_ command +* Improved `platformio init `_ command. Added new option ``--project-dir`` where you can specify another path to directory where new project will be initialized (`issue #31 `_) * Added *Migration Manager* which simplifies process with upgrading to a @@ -1395,18 +1404,18 @@ PlatformIO 0.0 0.8.0 (2014-10-19) ~~~~~~~~~~~~~~~~~~ -* Avoided trademark issues in `library.json `_ - with the new fields: `frameworks `_, - `platforms `_ - and `dependencies `_ +* Avoided trademark issues in `library.json `_ + with the new fields: `frameworks `_, + `platforms `_ + and `dependencies `_ (`issue #17 `_) * Switched logic from "Library Name" to "Library Registry ID" for all - `platformio lib `_ + `platformio lib `_ commands (install, uninstall, update and etc.) -* Renamed ``author`` field to `authors `_ - and allowed to setup multiple authors per library in `library.json `_ -* Added option to specify "maintainer" status in `authors `_ field -* New filters/options for `platformio lib search `_ +* Renamed ``author`` field to `authors `_ + and allowed to setup multiple authors per library in `library.json `_ +* Added option to specify "maintainer" status in `authors `_ field +* New filters/options for `platformio lib search `_ command: ``--framework`` and ``--platform`` 0.7.1 (2014-10-06) @@ -1420,15 +1429,15 @@ PlatformIO 0.0 0.7.0 (2014-09-24) ~~~~~~~~~~~~~~~~~~ -* Implemented new `[platformio] `_ - section for Configuration File with `home_dir `_ +* Implemented new `[platformio] `_ + section for Configuration File with `home_dir `_ option (`issue #14 `_) * Implemented *Library Manager* (`issue #6 `_) 0.6.0 (2014-08-09) ~~~~~~~~~~~~~~~~~~ -* Implemented `platformio serialports monitor `_ (`issue #10 `_) +* Implemented `platformio serialports monitor `_ (`issue #10 `_) * Fixed an issue ``ImportError: No module named platformio.util`` (`issue #9 `_) * Fixed bug with auto-conversation from Arduino \*.ino to \*.cpp @@ -1441,7 +1450,7 @@ PlatformIO 0.0 frameworks (`issue #7 `_) * Added `Arduino example `_ with external library (*Adafruit CC3000*) -* Implemented `platformio upgrade `_ +* Implemented `platformio upgrade `_ command and "auto-check" for the latest version (`issue #8 `_) * Fixed an issue with "auto-reset" for *Raspduino* board @@ -1450,21 +1459,21 @@ PlatformIO 0.0 0.4.0 (2014-07-31) ~~~~~~~~~~~~~~~~~~ -* Implemented `platformio serialports `_ command +* Implemented `platformio serialports `_ command * Allowed to put special build flags only for ``src`` files via - `src_build_flags `_ + `src_build_flags `_ environment option * Allowed to override some of settings via system environment variables such as: ``PLATFORMIO_SRC_BUILD_FLAGS`` and ``PLATFORMIO_ENVS_DIR`` -* Added ``--upload-port`` option for `platformio run `__ command +* Added ``--upload-port`` option for `platformio run `__ command * Implemented (especially for `SmartAnthill `_) - `platformio run -t uploadlazy `_ + `platformio run -t uploadlazy `_ target (no dependencies to framework libs, ELF and etc.) -* Allowed to skip default packages via `platformio install --skip-default-package `_ +* Allowed to skip default packages via `platformio install --skip-default-package `_ option * Added tools for *Raspberry Pi* platform * Added support for *Microduino* and *Raspduino* boards in - `atmelavr `_ platform + `atmelavr `_ platform 0.3.1 (2014-06-21) diff --git a/docs b/docs index fad663db..b75c7008 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit fad663db0c599d6e5ef42d90263cfdbf686eca4e +Subproject commit b75c70080557136fd6a65b61c9fcc14b9cc0f9a3 diff --git a/platformio/__init__.py b/platformio/__init__.py index b15e769a..7959277b 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 2, 1) +VERSION = (3, 2, "2a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 3dc454be..c668355b 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -57,6 +57,7 @@ def validate_boards(ctx, param, value): # pylint: disable=W0613 "--ide", type=click.Choice(ProjectGenerator.get_supported_ides())) @click.option("-O", "--project-option", multiple=True) @click.option("--env-prefix", default="") +@click.option("-s", "--silent", is_flag=True) @click.pass_context def cli( ctx, # pylint: disable=R0913 @@ -64,28 +65,31 @@ def cli( board, ide, project_option, - env_prefix): + env_prefix, + silent): - if project_dir == getcwd(): - click.secho("\nThe current working directory", fg="yellow", nl=False) - click.secho(" %s " % project_dir, fg="cyan", nl=False) - click.secho( - "will be used for project.\n" - "You can specify another project directory via\n" - "`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.", - fg="yellow") - click.echo("") + if not silent: + if project_dir == getcwd(): + click.secho( + "\nThe current working directory", fg="yellow", nl=False) + click.secho(" %s " % project_dir, fg="cyan", nl=False) + click.secho( + "will be used for project.\n" + "You can specify another project directory via\n" + "`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.", + fg="yellow") + click.echo("") - click.echo("The next files/directories have been created in %s" % - click.style( - project_dir, fg="cyan")) - click.echo("%s - Project Configuration File" % click.style( - "platformio.ini", fg="cyan")) - click.echo("%s - Put your source files here" % click.style( - "src", fg="cyan")) - click.echo("%s - Put here project specific (private) libraries" % - click.style( - "lib", fg="cyan")) + click.echo("The next files/directories have been created in %s" % + click.style( + project_dir, fg="cyan")) + click.echo("%s - Project Configuration File" % click.style( + "platformio.ini", fg="cyan")) + click.echo("%s - Put your source files here" % click.style( + "src", fg="cyan")) + click.echo("%s - Put here project specific (private) libraries" % + click.style( + "lib", fg="cyan")) init_base_project(project_dir) @@ -111,16 +115,17 @@ def cli( pg = ProjectGenerator(project_dir, ide, board[0]) pg.generate() - click.secho( - "\nProject has been successfully initialized!\nUseful commands:\n" - "`platformio run` - process/build project from the current " - "directory\n" - "`platformio run --target upload` or `platformio run -t upload` " - "- upload firmware to embedded board\n" - "`platformio run --target clean` - clean project (remove compiled " - "files)\n" - "`platformio run --help` - additional information", - fg="green") + if not silent: + click.secho( + "\nProject has been successfully initialized!\nUseful commands:\n" + "`platformio run` - process/build project from the current " + "directory\n" + "`platformio run --target upload` or `platformio run -t upload` " + "- upload firmware to embedded board\n" + "`platformio run --target clean` - clean project (remove compiled " + "files)\n" + "`platformio run --help` - additional information", + fg="green") def get_first_board(project_dir): diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 1ed50edf..f270b437 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -95,7 +95,7 @@ def cli(ctx, environment, target, upload_port, project_dir, silent, verbose, results.append((envname, None)) continue - if results: + if not silent and results: click.echo() options = {} @@ -108,11 +108,13 @@ def cli(ctx, environment, target, upload_port, project_dir, silent, verbose, upload_port, silent, verbose) results.append((envname, ep.process())) - if len(results) > 1: + found_error = any([status is False for (_, status) in results]) + + if (found_error or not silent) and len(results) > 1: click.echo() print_summary(results, start_time) - if any([status is False for (_, status) in results]): + if found_error: raise exception.ReturnErrorCode(1) return True @@ -160,18 +162,20 @@ class EnvironmentProcessor(object): if "\n" in v: self.options[k] = self.options[k].strip().replace("\n", ", ") - click.echo("[%s] Processing %s (%s)" % ( - datetime.now().strftime("%c"), click.style( - self.name, fg="cyan", bold=True), - ", ".join(["%s: %s" % (k, v) for k, v in self.options.items()]))) - click.secho("-" * terminal_width, bold=True) - if self.silent: - click.echo("Please wait...") + if not self.silent: + click.echo("[%s] Processing %s (%s)" % ( + datetime.now().strftime("%c"), click.style( + self.name, fg="cyan", bold=True), ", ".join( + ["%s: %s" % (k, v) for k, v in self.options.items()]))) + click.secho("-" * terminal_width, bold=True) self.options = self._validate_options(self.options) result = self._run() - is_error = result['returncode'] != 0 + + if self.silent and not is_error: + return True + if is_error or "piotest_processor" not in self.cmd_ctx.meta: print_header( "[%s] Took %.2f seconds" % ((click.style(