Merge branch 'release/v2.8.4'

This commit is contained in:
Ivan Kravets
2016-02-17 22:53:08 +02:00
25 changed files with 603 additions and 100 deletions

View File

@ -4,6 +4,33 @@ Release Notes
PlatformIO 2.0
--------------
2.8.4 (2016-02-17)
~~~~~~~~~~~~~~~~~~
* 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 <http://docs.platformio.org/en/latest/platforms/espressif.html>`__
development platform
* Added ``board_f_flash`` option to `Project Configuration File platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`__
which allows to specify `custom flash chip frequency <http://docs.platformio.org/en/latest/platforms/espressif.html#custom-flash-frequency>`_
for Espressif development platform
(`issue #501 <https://github.com/platformio/platformio/issues/501>`_)
* Added ``board_flash_mode`` option to `Project Configuration File platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`__
which allows to specify `custom flash chip mode <http://docs.platformio.org/en/latest/platforms/espressif.html#custom-flash-mode>`_
for Espressif development platform
* Handle new environment variables
`PLATFORMIO_UPLOAD_PORT <http://docs.platformio.org/en/latest/envvars.html#platformio-upload-port>`_
and `PLATFORMIO_UPLOAD_FLAGS <http://docs.platformio.org/en/latest/envvars.html#platformio-upload-flags>`_
(`IDE issue #518 <https://github.com/platformio/platformio/issues/518>`_)
* Fixed issue with ``CPPDEFINES`` which contain space and break PlatformIO
IDE Linter
(`IDE issue #34 <https://github.com/platformio/platformio-atom-ide/issues/34>`_)
* Fixed unable to link C++ standard library to Espressif platform build
(`issue #503 <https://github.com/platformio/platformio/issues/503>`_)
* Fixed issue with pointer (``char* myfunc()``) while converting from ``*.ino``
to ``*.cpp``
(`issue #506 <https://github.com/platformio/platformio/issues/506>`_)
2.8.3 (2016-02-02)
~~~~~~~~~~~~~~~~~~
@ -37,7 +64,7 @@ PlatformIO 2.0
* Added SPL-Framework support for Nucleo F401RE board
(`issue #453 <https://github.com/platformio/platformio/issues/453>`_)
* Added ``upload_resetmethod`` option to `Project Configuration File platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`__
and allowed to `change default upload reset method <http://docs.platformio.org/en/latest/platforms/espressif.html#custom-reset-method>`_
which allows to specify `custom upload reset method <http://docs.platformio.org/en/latest/platforms/espressif.html#custom-reset-method>`_
for Espressif development platform
(`issue #444 <https://github.com/platformio/platformio/issues/444>`_)
* Allowed to force output of color ANSI-codes or to disable progress bar even

View File

@ -30,18 +30,18 @@ PlatformIO
:target: https://gitter.im/platformio/platformio
.. image:: https://img.shields.io/donate/PlatformIO.png?color=yellow
:alt: Donate for PlatformIO.Org
:target: https://www.liqpay.com/api/3/checkout?data=eyJ2ZXJzaW9uIjozLCJhY3Rpb24iOiJwYXlkb25hdGUiLCJwdWJsaWNfa2V5IjoiaTc0NzkxMDA2NjIxIiwiYW1vdW50IjoiMSIsImN1cnJlbmN5IjoiVVNEIiwiZGVzY3JpcHRpb24iOiJEb25hdGlvbiBmb3IgUGxhdGZvcm1JTy5PcmciLCJ0eXBlIjoiZG9uYXRlIiwibGFuZ3VhZ2UiOiJlbiJ9&signature=XYvETjqlpoFhoFtxUJlF6hQyS7Y%3D
:target: http://platformio.org/#!/donate
`Home & Demo <http://platformio.org>`_ |
`PlatformIO IDE <http://platformio.org/#!/platformio-ide>`_ |
`Project Examples <https://github.com/platformio/platformio/tree/develop/examples>`_ |
`Source Code <https://github.com/platformio>`_ |
`Documentation <http://docs.platformio.org>`_ |
`Blog <http://www.ikravets.com/category/computer-life/platformio>`_ |
`Docs <http://docs.platformio.org>`_ |
`Twitter <https://twitter.com/PlatformIO_Org>`_ |
`Hackaday <https://hackaday.io/project/7980-platformio>`_ |
`Facebook <https://www.facebook.com/platformio>`_ |
`Reddit <http://www.reddit.com/r/platformio/>`_
`Hackaday <https://hackaday.io/project/7980-platformio>`_ |
`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
@ -50,6 +50,11 @@ PlatformIO
development. Cross-platform code builder and library manager. Continuous and
IDE integration. Arduino and MBED compatible. Ready for Cloud compiling.
* **PlatformIO IDE** - The next generation integrated development environment for IoT.
C/C++ Intelligent Code Completion and Smart Code Linter for the super-fast coding.
Multi-projects workflow with Multiple Panes. Themes Support with dark and light colors.
Built-in Terminal with PlatformIO CLI tool and support for the powerful Serial Port Monitor.
All advanced instruments without leaving your favourite development environment.
* **Development Platforms** - Embedded and Desktop development platforms with
pre-built toolchains, debuggers, uploaders and frameworks which work under
popular host OS: Mac, Windows, Linux (+ARM)
@ -59,7 +64,7 @@ IDE integration. Arduino and MBED compatible. Ready for Cloud compiling.
* **Library Manager** - Hundreds Popular Libraries are organized into single
Web 2.0 platform: list by categories, keywords, authors, compatible
platforms and frameworks; learn via examples; be up-to-date with the latest
version
version.
*Atmel AVR & SAM, Espressif, Freescale Kinetis, Nordic nRF51, NXP LPC,
Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed,
@ -68,6 +73,7 @@ libOpenCM3, etc.*
.. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-demo-wiring.gif
:target: http://platformio.org
* `PlatformIO IDE <http://platformio.org/#!/platformio-ide>`_
* `Get Started <http://platformio.org/#!/get-started>`_
* `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
* `Development Platforms <http://platformio.org/#!/platforms>`_

View File

@ -70,8 +70,8 @@ Allows to override :ref:`projectconf` option :ref:`projectconf_pio_envs_dir`.
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_data_dir`.
Builder
-------
Building
--------
.. envvar:: PLATFORMIO_BUILD_FLAGS
@ -90,6 +90,18 @@ Allows to set :ref:`projectconf` option :ref:`projectconf_src_filter`.
Allows to set :ref:`projectconf` option :ref:`projectconf_extra_script`.
Uploading
---------
.. envvar:: PLATFORMIO_UPLOAD_PORT
Allows to set :ref:`projectconf` option :ref:`projectconf_upload_port`.
.. envvar:: PLATFORMIO_UPLOAD_FLAGS
Allows to set :ref:`projectconf` option :ref:`projectconf_upload_flags`.
Settings
--------

View File

@ -482,6 +482,26 @@ Digistump
- 512 Kb
- 28 Kb
Doit
~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``espduino``
- `ESPDuino (ESP-13 Module) <https://www.tindie.com/products/doit/espduinowifi-uno-r3/>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
ESPino
~~~~~~
@ -570,6 +590,27 @@ Espressif
- 4096 Kb
- 80 Kb
* - ``esp_wroom_02``
- `ESP-WROOM-02 <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 50 Kb
* - ``espresso_lite_v1``
- `ESPresso Lite 1.0 <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``espresso_lite_v2``
- `ESPresso Lite 2.0 <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
LightUp
~~~~~~~
@ -707,7 +748,14 @@ NodeMCU
- RAM
* - ``nodemcu``
- `NodeMCU 0.9 / 1.0 <http://www.nodemcu.com/>`_
- `NodeMCU 0.9 (ESP-12 Module) <http://www.nodemcu.com/>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``nodemcuv2``
- `NodeMCU 1.0 (ESP-12E Module) <http://www.nodemcu.com/>`_
- ESP8266
- 80 MHz
- 4096 Kb
@ -1025,6 +1073,13 @@ SparkFun
- 512 Kb
- 80 Kb
* - ``thingdev``
- `SparkFun ESP8266 Thing Dev <https://www.sparkfun.com/products/13231>`_
- ESP8266
- 80 MHz
- 512 Kb
- 80 Kb
* - ``uview``
- `SparkFun MicroView <https://www.sparkfun.com/products/12923>`_
- ATMEGA328P
@ -1100,6 +1155,26 @@ Teensy
- 64 Kb
- 8 Kb
ThaiEasyElec
~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``espinotee``
- `ThaiEasyElec ESPino <http://www.thaieasyelec.com/products/wireless-modules/wifi-modules/espino-wifi-development-board-detail.html>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
TinyCircuits
~~~~~~~~~~~~
@ -1141,14 +1216,14 @@ WeMos
- RAM
* - ``d1``
- `WeMos D1 <http://www.wemos.cc/wiki/doku.php?id=en:d1>`_
- `WeMos D1(Retired) <http://www.wemos.cc/wiki/doku.php?id=en:d1>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``d1_mini``
- `WeMos D1 mini <http://www.wemos.cc/wiki/doku.php?id=en:d1_mini>`_
- `WeMos D1 R2 & mini <http://www.wemos.cc/wiki/doku.php?id=en:d1_mini>`_
- ESP8266
- 80 MHz
- 4096 Kb

View File

@ -27,6 +27,9 @@ Platforms
* - Name
- Description
* - :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_freescalekinetis`
- Freescale Kinetis Microcontrollers is family of multiple hardware- and software-compatible ARM Cortex-M0+, Cortex-M4 and Cortex-M7-based MCU series. Kinetis MCUs offer exceptional low-power performance, scalability and feature integration.
@ -295,7 +298,7 @@ NXP
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
- 64 Kb
Nordic
~~~~~~
@ -605,7 +608,7 @@ SeeedStudio
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
- 64 Kb
Silicon Labs
~~~~~~~~~~~~
@ -740,6 +743,6 @@ u-blox
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
- 64 Kb
.. include:: mbed_extra.rst

View File

@ -43,7 +43,7 @@ config file.
Installation
------------
1. Download and install Atom source code editor
1. Download and install Atom text editor
- `Download for Mac <https://atom.io/download/mac>`_
- `Download for Windows <https://atom.io/download/windows>`_

View File

@ -59,7 +59,7 @@ a) Python Package Manager
~~~~~~~~~~~~~~~~~~~~~~~~~
The latest stable version of PlatformIO may be installed or upgraded via
`pip <https://pip.pypa.io>`_ as follows:
Python Package Manager (`pip <https://pip.pypa.io>`_) as follows:
.. code-block:: bash

View File

@ -28,17 +28,20 @@ Packages
* - Name
- Contents
* - ``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>`_
* - ``tool-openocd``
- `OpenOCD <http://openocd.org>`_
* - ``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>`_
* - ``ldscripts``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
* - ``tool-bossac``
- `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_
@ -63,6 +66,9 @@ Frameworks
* - :ref:`framework_arduino`
- Arduino 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.
Boards
------

View File

@ -95,6 +95,26 @@ Adafruit
- 4096 Kb
- 80 Kb
Doit
~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``espduino``
- `ESPDuino (ESP-13 Module) <https://www.tindie.com/products/doit/espduinowifi-uno-r3/>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
ESPino
~~~~~~
@ -149,6 +169,27 @@ Espressif
- 4096 Kb
- 80 Kb
* - ``esp_wroom_02``
- `ESP-WROOM-02 <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 50 Kb
* - ``espresso_lite_v1``
- `ESPresso Lite 1.0 <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``espresso_lite_v2``
- `ESPresso Lite 2.0 <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
NodeMCU
~~~~~~~
@ -163,7 +204,14 @@ NodeMCU
- RAM
* - ``nodemcu``
- `NodeMCU 0.9 / 1.0 <http://www.nodemcu.com/>`_
- `NodeMCU 0.9 (ESP-12 Module) <http://www.nodemcu.com/>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``nodemcuv2``
- `NodeMCU 1.0 (ESP-12E Module) <http://www.nodemcu.com/>`_
- ESP8266
- 80 MHz
- 4096 Kb
@ -209,6 +257,13 @@ SparkFun
- 512 Kb
- 80 Kb
* - ``thingdev``
- `SparkFun ESP8266 Thing Dev <https://www.sparkfun.com/products/13231>`_
- ESP8266
- 80 MHz
- 512 Kb
- 80 Kb
SweetPea
~~~~~~~~
@ -229,6 +284,26 @@ SweetPea
- 4096 Kb
- 80 Kb
ThaiEasyElec
~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``espinotee``
- `ThaiEasyElec ESPino <http://www.thaieasyelec.com/products/wireless-modules/wifi-modules/espino-wifi-development-board-detail.html>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
WeMos
~~~~~
@ -243,14 +318,14 @@ WeMos
- RAM
* - ``d1``
- `WeMos D1 <http://www.wemos.cc/wiki/doku.php?id=en:d1>`_
- `WeMos D1(Retired) <http://www.wemos.cc/wiki/doku.php?id=en:d1>`_
- ESP8266
- 80 MHz
- 4096 Kb
- 80 Kb
* - ``d1_mini``
- `WeMos D1 mini <http://www.wemos.cc/wiki/doku.php?id=en:d1_mini>`_
- `WeMos D1 R2 & mini <http://www.wemos.cc/wiki/doku.php?id=en:d1_mini>`_
- ESP8266
- 80 MHz
- 4096 Kb

View File

@ -9,19 +9,54 @@
See the License for the specific language governing permissions and
limitations under the License.
Custom CPU Frequency or Upload Speed
------------------------------------
Custom CPU Frequency
--------------------
See :ref:`projectconf_board_f_cpu` and :ref:`projectconf_upload_speed` options
from :ref:`projectconf`
See :ref:`projectconf_board_f_cpu` option from :ref:`projectconf`
.. code-block:: ini
[env:myenv]
# set frequency to 40MHz
board_f_cpu = 40000000L
# set frequency to 160MHz
board_f_cpu = 160000000L
upload_speed = 9600
Custom FLASH Frequency
----------------------
See :ref:`projectconf_board_f_flash` option from :ref:`projectconf`. Possible
values:
* ``20000000L``
* ``26000000L``
* ``40000000L``
* ``80000000L``
.. code-block:: ini
[env:myenv]
# set frequency to 80MHz
board_f_flash = 80000000L
Custom FLASH Mode
-----------------
Flash chip interface mode. This parameter is stored in the binary image
header, along with the flash size and flash frequency. The ROM bootloader
in the ESP chip uses the value of these parameters in order to know how to
talk to the flash chip.
See :ref:`projectconf_board_flash_mode` option from :ref:`projectconf`. Possible
values:
* ``qio``
* ``qout``
* ``dio``
* ``dout``
.. code-block:: ini
[env:myenv]
board_flash_mode = qio
Custom Reset Method
-------------------
@ -30,10 +65,7 @@ See :ref:`projectconf_upload_resetmethod` option from :ref:`projectconf`
.. code-block:: ini
[env:esp12e]
platform = espressif
framework = arduino
board = esp12e
[env:myenv]
upload_resetmethod = ck
.. _platform_espressif_customflash:
@ -66,6 +98,16 @@ To override default LD script please use :ref:`projectconf_build_flags` from
[env:myenv]
build_flags = -Wl,-Tesp8266.flash.4m.ld
Custom Upload Speed
-------------------
See :ref:`projectconf_upload_speed` option from :ref:`projectconf`
.. code-block:: ini
[env:myenv]
upload_speed = 9600
.. _platform_espressif_uploadfs:
Uploading files to file system SPIFFS

View File

@ -169,7 +169,7 @@ NXP
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
- 64 Kb
Outrageous Circuits
~~~~~~~~~~~~~~~~~~~
@ -209,7 +209,7 @@ SeeedStudio
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
- 64 Kb
Solder Splash Labs
~~~~~~~~~~~~~~~~~~
@ -269,4 +269,4 @@ u-blox
- LPC1768
- 96 MHz
- 512 Kb
- 32 Kb
- 64 Kb

View File

@ -208,6 +208,25 @@ The full list of ``board_f_cpu`` for the popular embedded platforms you can
find in *Boards* section of :ref:`platforms`. See "Frequency" column. You can
overclock a board by specifying a ``board_f_cpu`` value other than the default.
.. _projectconf_board_f_flash:
``board_f_flash``
^^^^^^^^^^^^^^^^^
An option ``board_f_flash`` is used to define FLASH chip frequency (Hertz, Clock). A
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.
.. _projectconf_board_flash_mode:
``board_flash_mode``
^^^^^^^^^^^^^^^^^^^^
Flash chip interface mode. This option isn't available for the all development
platforms. The only :ref:`platform_espressif` supports it.
Building options
~~~~~~~~~~~~~~~~
@ -414,6 +433,8 @@ When no targets are defined, *PlatformIO* will build only sources by default.
Uploading options
~~~~~~~~~~~~~~~~~
.. _projectconf_upload_port:
``upload_port``
^^^^^^^^^^^^^^^
@ -429,6 +450,9 @@ automatically.
To print all available serial ports use :ref:`cmd_serialports` command.
This option can be set by global environment variable
:envvar:`PLATFORMIO_UPLOAD_PORT`.
``upload_protocol``
^^^^^^^^^^^^^^^^^^^
@ -442,12 +466,17 @@ A protocol that "uploader" tool uses to talk to the board.
A connection speed (`baud rate <http://en.wikipedia.org/wiki/Baud>`_)
which "uploader" tool uses when sending firmware to board.
.. _projectconf_upload_flags:
``upload_flags``
^^^^^^^^^^^^^^^^
Extra flags for uploader. Will be added to the end of uploader command. If you
need to override uploader command or base flags please use :ref:`projectconf_extra_script`.
This option can be set by global environment variable
:envvar:`PLATFORMIO_UPLOAD_FLAGS`.
.. _projectconf_upload_resetmethod:
``upload_resetmethod``

View File

@ -10,7 +10,6 @@ board = uno
platform = espressif
framework = arduino
board = nodemcu
build_flags = -D LED_BUILTIN=BUILTIN_LED
[env:teensy31]
platform = teensy

View File

@ -14,7 +14,7 @@
import sys
VERSION = (2, 8, 3)
VERSION = (2, 8, 4)
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -4,6 +4,8 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.512k64.ld",
"mcu": "esp8266",
"variant": "generic"
@ -27,6 +29,8 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.1m256.ld",
"mcu": "esp8266",
"variant": "generic"
@ -50,6 +54,8 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "nodemcu"
@ -68,17 +74,69 @@
"vendor": "Espressif"
},
"espduino": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP13",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "ESPDuino"
},
"frameworks": ["arduino"],
"name": "ESPDuino (ESP-13 Module)",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://www.tindie.com/products/doit/espduinowifi-uno-r3/",
"vendor": "Doit"
},
"nodemcu": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "nodemcu"
},
"frameworks": ["arduino"],
"name": "NodeMCU 0.9 / 1.0",
"name": "NodeMCU 0.9 (ESP-12 Module)",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://www.nodemcu.com/",
"vendor": "NodeMCU"
},
"nodemcuv2": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "nodemcu"
},
"frameworks": ["arduino"],
"name": "NodeMCU 1.0 (ESP-12E Module)",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
@ -96,6 +154,8 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "adafruit"
@ -114,11 +174,63 @@
"vendor": "Adafruit"
},
"espresso_lite_v1": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESPRESSO_LITE_V1",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "espresso_lite_v1"
},
"frameworks": ["arduino"],
"name": "ESPresso Lite 1.0",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
"vendor": "Espressif"
},
"espresso_lite_v2": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESPRESSO_LITE_V2",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "espresso_lite_v2"
},
"frameworks": ["arduino"],
"name": "ESPresso Lite 2.0",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
"vendor": "Espressif"
},
"modwifi": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_MOD_WIFI_ESP8266",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.2m.ld",
"mcu": "esp8266",
"variant": "generic"
@ -142,6 +254,8 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_THING",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.512k64.ld",
"mcu": "esp8266",
"variant": "thing"
@ -149,6 +263,31 @@
"frameworks": ["arduino"],
"name": "SparkFun ESP8266 Thing",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 524288,
"resetmethod": "ck",
"require_upload_port" : true,
"speed": 921600
},
"url": "https://www.sparkfun.com/products/13231",
"vendor": "SparkFun"
},
"thingdev": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_THING",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.512k64.ld",
"mcu": "esp8266",
"variant": "thing"
},
"frameworks": ["arduino"],
"name": "SparkFun ESP8266 Thing Dev",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 524288,
@ -165,6 +304,8 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP210",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "generic"
@ -188,12 +329,14 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "d1"
},
"frameworks": ["arduino"],
"name": "WeMos D1",
"name": "WeMos D1(Retired)",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
@ -211,12 +354,14 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "d1_mini"
},
"frameworks": ["arduino"],
"name": "WeMos D1 mini",
"name": "WeMos D1 R2 & mini",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
@ -234,6 +379,8 @@
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "espino"
@ -250,5 +397,55 @@
},
"url": "http://www.espino.io",
"vendor": "ESPino"
},
"espinotee": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP13",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "espinotee"
},
"frameworks": ["arduino"],
"name": "ThaiEasyElec ESPino",
"platform": "espressif",
"upload": {
"maximum_ram_size": 81920,
"maximum_size": 4194304,
"resetmethod": "ck",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://www.thaieasyelec.com/products/wireless-modules/wifi-modules/espino-wifi-development-board-detail.html",
"vendor": "ThaiEasyElec"
},
"esp_wroom_02": {
"build": {
"core": "esp8266",
"extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP_WROOM_02",
"f_cpu": "80000000L",
"f_flash": "40000000L",
"flash_mode": "qio",
"ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266",
"variant": "nodemcu"
},
"frameworks": ["arduino"],
"name": "ESP-WROOM-02",
"platform": "espressif",
"upload": {
"maximum_ram_size": 51200,
"maximum_size": 4194304,
"resetmethod": "nodemcu",
"require_upload_port" : true,
"speed": 115200
},
"url": "http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family",
"vendor": "Espressif"
}
}

View File

@ -51,6 +51,8 @@ commonvars.AddVariables(
("BOARD",),
("BOARD_MCU",),
("BOARD_F_CPU",),
("BOARD_F_FLASH",),
("BOARD_FLASH_MODE",),
# upload options
("UPLOAD_PORT",),
@ -137,6 +139,13 @@ if env.subst("$PIOPACKAGE_TOOLCHAIN"):
env.subst(join("$PIOPACKAGES_DIR", "$PIOPACKAGE_TOOLCHAIN", "bin"))
)
# handle custom variable from system environment
for var in ("BUILD_FLAGS", "SRC_BUILD_FLAGS", "SRC_FILTER", "EXTRA_SCRIPT",
"UPLOAD_PORT", "UPLOAD_FLAGS"):
k = "PLATFORMIO_%s" % var
if environ.get(k):
env[var] = environ.get(k)
env.SConscriptChdir(0)
env.SConsignFile(join("$PIOENVS_DIR", ".sconsign.dblite"))
env.SConscript("$BUILD_SCRIPT")
@ -144,9 +153,8 @@ env.SConscript("$BUILD_SCRIPT")
if "UPLOAD_FLAGS" in env:
env.Append(UPLOADERFLAGS=["$UPLOAD_FLAGS"])
if environ.get("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT")):
env.SConscript(
environ.get("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT")))
if env.get("EXTRA_SCRIPT"):
env.SConscript(env.get("EXTRA_SCRIPT"))
if "envdump" in COMMAND_LINE_TARGETS:
print env.Dump()

View File

@ -42,17 +42,17 @@ def _get_flash_size(env):
else "%dM" % (board_max_size / 1048576))
def _get_board_f_cpu(env):
f_cpu = env.subst("$BOARD_F_CPU")
f_cpu = str(f_cpu).replace("L", "")
return int(int(f_cpu) / 1000000)
def _get_board_f_flash(env):
frequency = env.subst("$BOARD_F_FLASH")
frequency = str(frequency).replace("L", "")
return int(int(frequency) / 1000000)
env = DefaultEnvironment()
env.Replace(
__get_flash_size=_get_flash_size,
__get_board_f_cpu=_get_board_f_cpu,
__get_board_f_flash=_get_board_f_flash,
AR="xtensa-lx106-elf-ar",
AS="xtensa-lx106-elf-as",
@ -149,8 +149,8 @@ env.Append(
'"%s"' % join("$PLATFORMFW_DIR", "bootloaders",
"eboot", "eboot.elf"),
"-bo", "$TARGET",
"-bm", "dio",
"-bf", "${__get_board_f_cpu(__env__)}",
"-bm", "$BOARD_FLASH_MODE",
"-bf", "${__get_board_f_flash(__env__)}",
"-bz", "${__get_flash_size(__env__)}",
"-bs", ".text",
"-bp", "4096",

View File

@ -281,4 +281,4 @@ if "due" in env.subst("$BOARD"):
)
libs.append("sam_sam3x8e_gcc_rel")
env.Append(LIBS=libs)
env.Prepend(LIBS=libs)

View File

@ -32,7 +32,7 @@ import re
import sys
import xml.etree.ElementTree as ElementTree
from binascii import crc32
from os import getenv, walk
from os import walk
from os.path import basename, isfile, join, normpath
from SCons.Script import DefaultEnvironment
@ -233,8 +233,7 @@ env.Replace(
# restore external build flags
env.ProcessFlags([
env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags"),
env.get("BUILD_FLAGS"),
getenv("PLATFORMIO_BUILD_FLAGS"),
env.get("BUILD_FLAGS")
])
# Hook for K64F and K22F

View File

@ -27,7 +27,7 @@ class InoToCPPConverter(object):
PROTOTYPE_RE = re.compile(
r"""^(
(\s*[a-z_\d]+){1,2} # return type
(\s*[a-z_\d]+\*?){1,2} # return type
(\s+[a-z_\d]+\s*) # name of prototype
\([a-z_,\.\*\&\[\]\s\d]*\) # arguments
)\s*\{ # must end with {
@ -141,27 +141,27 @@ def DumpIDEData(env):
BOARD_CORE = env.get("BOARD_OPTIONS", {}).get("build", {}).get("core")
def get_includes():
def get_includes(env_):
includes = []
# includes from used framework and libs
for item in env.get("VARIANT_DIRS", []):
for item in env_.get("VARIANT_DIRS", []):
if "$BUILDSRC_DIR" in item[0]:
continue
includes.append(env.subst(item[1]))
includes.append(env_.subst(item[1]))
# custom includes
for item in env.get("CPPPATH", []):
for item in env_.get("CPPPATH", []):
if item.startswith("$BUILD_DIR"):
continue
includes.append(env.subst(item))
includes.append(env_.subst(item))
# installed libs
for d in env.get("LIBSOURCE_DIRS", []):
lsd_dir = env.subst(d)
_append_lib_includes(lsd_dir, includes)
for d in env_.get("LIBSOURCE_DIRS", []):
lsd_dir = env_.subst(d)
_append_lib_includes(env_, lsd_dir, includes)
# includes from toolchain
toolchain_dir = env.subst(
toolchain_dir = env_.subst(
join("$PIOPACKAGES_DIR", "$PIOPACKAGE_TOOLCHAIN"))
toolchain_incglobs = [
join(toolchain_dir, "*", "include*"),
@ -172,19 +172,19 @@ def DumpIDEData(env):
return includes
def _append_lib_includes(libs_dir, includes):
def _append_lib_includes(env_, libs_dir, includes):
if not isdir(libs_dir):
return
for name in env.get("LIB_USE", []) + sorted(listdir(libs_dir)):
for name in env_.get("LIB_USE", []) + sorted(listdir(libs_dir)):
if not isdir(join(libs_dir, name)):
continue
# ignore user's specified libs
if name in env.get("LIB_IGNORE", []):
if name in env_.get("LIB_IGNORE", []):
continue
if name == "__cores__":
if isdir(join(libs_dir, name, BOARD_CORE)):
_append_lib_includes(
join(libs_dir, name, BOARD_CORE), includes)
env_, join(libs_dir, name, BOARD_CORE), includes)
return
include = (
@ -195,16 +195,16 @@ def DumpIDEData(env):
if include not in includes:
includes.append(include)
def get_defines():
def get_defines(env_):
defines = []
# global symbols
for item in env.get("CPPDEFINES", []):
for item in env_.get("CPPDEFINES", []):
if isinstance(item, list):
item = "=".join(item)
defines.append(env.subst(item).replace('\\"', '"'))
defines.append(env_.subst(item).replace('\\"', '"'))
# special symbol for Atmel AVR MCU
board = env.get("BOARD_OPTIONS", {})
board = env_.get("BOARD_OPTIONS", {})
if board and board['platform'] == "atmelavr":
defines.append(
"__AVR_%s__" % board['build']['mcu'].upper()
@ -213,16 +213,36 @@ def DumpIDEData(env):
)
return defines
return {
"defines": get_defines(),
"includes": get_includes(),
"cc_flags": env.subst("$SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS"),
"cxx_flags": env.subst(
env_ = env.Clone()
data = {
"defines": get_defines(env_),
"includes": get_includes(env_),
"cc_flags": env_.subst("$SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS"),
"cxx_flags": env_.subst(
"$SHCXXFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS"),
"cxx_path": where_is_program(
env.subst("$CXX"), env.subst("${ENV['PATH']}"))
env_.subst("$CXX"), env_.subst("${ENV['PATH']}"))
}
# https://github.com/platformio/platformio-atom-ide/issues/34
_new_defines = []
for item in env_.get("CPPDEFINES", []):
item = item.replace('\\"', '"')
if " " in item:
_new_defines.append(item.replace(" ", "\\\\ "))
else:
_new_defines.append(item)
env_.Replace(CPPDEFINES=_new_defines)
data.update({
"cc_flags": env_.subst("$SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS"),
"cxx_flags": env_.subst(
"$SHCXXFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS")
})
return data
def GetCompilerType(env):
try:

View File

@ -16,7 +16,7 @@ from __future__ import absolute_import
import re
from glob import glob
from os import getenv, listdir, sep, walk
from os import listdir, sep, walk
from os.path import basename, dirname, isdir, isfile, join, normpath, realpath
from SCons.Script import COMMAND_LINE_TARGETS, DefaultEnvironment, SConscript
@ -44,8 +44,7 @@ def BuildProgram(env):
env.ProcessFlags([
env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags"),
env.get("BUILD_FLAGS"),
getenv("PLATFORMIO_BUILD_FLAGS"),
env.get("BUILD_FLAGS")
])
if env.get("FRAMEWORK"):
@ -72,10 +71,7 @@ def BuildProgram(env):
)
# Handle SRC_BUILD_FLAGS
env.ProcessFlags([
env.get("SRC_BUILD_FLAGS", None),
getenv("PLATFORMIO_SRC_BUILD_FLAGS"),
])
env.ProcessFlags([env.get("SRC_BUILD_FLAGS", None)])
env.Append(
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
@ -86,7 +82,7 @@ def BuildProgram(env):
sources = env.LookupSources(
"$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False,
src_filter=getenv("PLATFORMIO_SRC_FILTER", env.get("SRC_FILTER")))
src_filter=env.get("SRC_FILTER"))
if not sources and not COMMAND_LINE_TARGETS:
env.Exit(

View File

@ -2,5 +2,5 @@
-I{{include}}
% end
% for define in defines:
-D{{define}}
-D{{!define}}
% end

View File

@ -1,7 +1,7 @@
{
"execPath": "{{ cxx_path.replace("\\", "/") }}",
"gccDefaultCFlags": "-fsyntax-only {{ cc_flags.replace(' -MMD ', ' ') }}",
"gccDefaultCppFlags": "-fsyntax-only {{ cxx_flags.replace(' -MMD ', ' ') }}",
"gccDefaultCFlags": "-fsyntax-only {{! cc_flags.replace(' -MMD ', ' ').replace('"', '\\"') }}",
"gccDefaultCppFlags": "-fsyntax-only {{! cxx_flags.replace(' -MMD ', ' ').replace('"', '\\"') }}",
"gccErrorLimit": 15,
"gccIncludePaths": "{{ ','.join(includes).replace("\\", "/") }}",
"gccSuppressWarnings": false

View File

@ -2,5 +2,5 @@
-I{{include}}
% end
% for define in defines:
-D{{define}}
-D{{!define}}
% end

View File

@ -146,12 +146,15 @@ def after_upgrade(ctx):
click.style("star", fg="cyan"),
click.style("https://github.com/platformio/platformio", fg="cyan")
))
if not getenv("PLATFORMIO_IDE"):
click.echo("- %s PlatformIO IDE for IoT development > %s" % (
click.style("try", fg="cyan"),
click.style("http://platformio.org/", fg="cyan")
))
click.echo("- %s to keep PlatformIO alive! > %s" % (
click.style("donate", fg="cyan"),
click.style("http://platformio.org/donate/", fg="cyan")
))
click.echo("*" * terminal_width)
click.echo("")
@ -200,10 +203,16 @@ def check_platformio_upgrade():
click.secho("There is a new version %s of PlatformIO available.\n"
"Please upgrade it via `" % latest_version,
fg="yellow", nl=False)
click.secho("platformio upgrade", fg="cyan", nl=False)
click.secho("` or `", fg="yellow", nl=False)
click.secho("pip install -U platformio", fg="cyan", nl=False)
click.secho("` command.\nChanges: ", fg="yellow", nl=False)
if getenv("PLATFORMIO_IDE"):
click.secho("PlatformIO IDE Menu: Upgrade PlatformIO",
fg="cyan", nl=False)
click.secho("`.", fg="yellow")
else:
click.secho("platformio upgrade", fg="cyan", nl=False)
click.secho("` or `", fg="yellow", nl=False)
click.secho("pip install -U platformio", fg="cyan", nl=False)
click.secho("` command.", fg="yellow")
click.secho("Changes: ", fg="yellow", nl=False)
click.secho("http://docs.platformio.org/en/latest/history.html",
fg="cyan")
click.echo("*" * terminal_width)