diff --git a/HISTORY.rst b/HISTORY.rst index f62c654e..18e141c3 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,30 @@ Release History PlatformIO 2.0 -------------- +2.6.1 (2015-12-18) +~~~~~~~~~~~~~~~~~~ + +* 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 `__ + 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 `__ + development platform: OTA update, custom Flash Size, Upload Speed and CPU + frequency +* Fixed reset method for Espressif NodeMCU (ESP-12E Module) + (`issue #380 `_) +* Fixed issue with code builder when build path contains spaces + (`issue #387 `_) +* Fixed project generator for Eclipse IDE and "duplicate path entries found + in project path" + (`issue #383 `_) + + 2.6.0 (2015-12-15) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/articles.rst b/docs/articles.rst index 104462a8..b8d6db9d 100644 --- a/docs/articles.rst +++ b/docs/articles.rst @@ -23,6 +23,7 @@ Here are recent articles about PlatformIO: 2015 ^^^^ +* Dec 01, 2015 - **JetBrains CLion Blog** - `C++ Annotated: Fall 2015. Arduino Support in CLion using PlatformIO `_ * Dec 01, 2015 - **Tateno Yuichi** - `ESP8266 を CUI で開発する (Develop a ESP8266 in CUI, Japanese) `_ * Nov 29, 2015 - **Keith Hughes** - `Using PlatformIO for Embedded Projects `_ * Nov 22, 2015 - **Michał Seroczyński** - `Using PlatformIO to get started with Arduino in CLion IDE `_ diff --git a/docs/conf.py b/docs/conf.py index f73c94ea..ca57fece 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -69,7 +69,7 @@ release = platformio.__version__ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build'] +exclude_patterns = ['_build', '**/*_extra.rst'] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/docs/faq.rst b/docs/faq.rst index d00f89c6..dc3663a7 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -245,3 +245,8 @@ Archlinux: libncurses.so.5: cannot open shared object file '''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Answered in `issue #291 `_. + +Monitoring a serial port breaks upload +'''''''''''''''''''''''''''''''''''''' + +Answered in `issue #384 `_. diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 78d26895..7835d441 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -363,7 +363,7 @@ BQ - RAM * - ``zumbt328`` - - `BQ ZUM BT-328 board `_ + - `BQ ZUM BT-328 `_ - ATMEGA328P - 16 MHz - 32 Kb @@ -484,26 +484,75 @@ Espressif - Flash - RAM - * - ``esp01`` - - `Espressif ESP8266 ESP-01 board `_ - - ESP8266 - - 80 MHz - - 512 Kb - - 32 Kb - - * - ``esp01_1m`` - - `Espressif ESP8266 ESP-01-1MB board `_ + * - ``d1`` + - `WeMos D1 `_ - ESP8266 - 80 MHz - 1024 Kb - - 32 Kb + - 80 Kb - * - ``esp12e`` - - `Espressif ESP8266 ESP-12E board (NodeMCU) `_ + * - ``d1_mini`` + - `WeMos D1 mini `_ - ESP8266 - 80 MHz - - 4096 Kb - - 32 Kb + - 1024 Kb + - 80 Kb + + * - ``esp01`` + - `Espressif Generic ESP8266 ESP-01 `_ + - ESP8266 + - 80 MHz + - 512 Kb + - 80 Kb + + * - ``esp12e`` + - `Espressif ESP8266 ESP-12E `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``esp210`` + - `SweetPea ESP-210 `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``espino`` + - `ESPino `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``huzzah`` + - `Adafruit HUZZAH ESP8266 `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``modwifi`` + - `Olimex MOD-WIFI-ESP8266(-DEV) `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``nodemcu`` + - `NodeMCU 0.9 & 1.0 `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``thing`` + - `SparkFun ESP8266 Thing `_ + - ESP8266 + - 80 MHz + - 512 Kb + - 80 Kb LightUp ~~~~~~~ diff --git a/docs/index.rst b/docs/index.rst index b912dd51..b8e05a5a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -71,7 +71,8 @@ The Missing Library Manager. *It's here!* * Automatic library updating * It runs on Windows, Mac OS X, and Linux (+ARM). -For further details, please refer to :ref:`faq_what_is_platformio` +For further details, please refer to +:ref:`What is PlatformIO? How does it work? ` Contents -------- @@ -94,7 +95,7 @@ Contents .. toctree:: :caption: Instruments - :maxdepth: 2 + :maxdepth: 3 Platforms & Boards frameworks/index diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 72f0e342..5e750445 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -368,7 +368,7 @@ BQ - RAM * - ``zumbt328`` - - `BQ ZUM BT-328 board `_ + - `BQ ZUM BT-328 `_ - ATMEGA328P - 16 MHz - 32 Kb diff --git a/docs/platforms/espressif.rst b/docs/platforms/espressif.rst index 0f1ee9af..f03a4970 100644 --- a/docs/platforms/espressif.rst +++ b/docs/platforms/espressif.rst @@ -85,23 +85,74 @@ Espressif - Flash - RAM - * - ``esp01`` - - `Espressif ESP8266 ESP-01 board `_ - - ESP8266 - - 80 MHz - - 512 Kb - - 32 Kb - - * - ``esp01_1m`` - - `Espressif ESP8266 ESP-01-1MB board `_ + * - ``d1`` + - `WeMos D1 `_ - ESP8266 - 80 MHz - 1024 Kb - - 32 Kb + - 80 Kb - * - ``esp12e`` - - `Espressif ESP8266 ESP-12E board (NodeMCU) `_ + * - ``d1_mini`` + - `WeMos D1 mini `_ - ESP8266 - 80 MHz - - 4096 Kb - - 32 Kb + - 1024 Kb + - 80 Kb + + * - ``esp01`` + - `Espressif Generic ESP8266 ESP-01 `_ + - ESP8266 + - 80 MHz + - 512 Kb + - 80 Kb + + * - ``esp12e`` + - `Espressif ESP8266 ESP-12E `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``esp210`` + - `SweetPea ESP-210 `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``espino`` + - `ESPino `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``huzzah`` + - `Adafruit HUZZAH ESP8266 `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``modwifi`` + - `Olimex MOD-WIFI-ESP8266(-DEV) `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``nodemcu`` + - `NodeMCU 0.9 & 1.0 `_ + - ESP8266 + - 80 MHz + - 1024 Kb + - 80 Kb + + * - ``thing`` + - `SparkFun ESP8266 Thing `_ + - ESP8266 + - 80 MHz + - 512 Kb + - 80 Kb + +.. include:: espressif_extra.rst diff --git a/docs/platforms/espressif_extra.rst b/docs/platforms/espressif_extra.rst new file mode 100644 index 00000000..d089886f --- /dev/null +++ b/docs/platforms/espressif_extra.rst @@ -0,0 +1,131 @@ +.. Copyright 2014-2015 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + 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. + +OTA update +---------- + +There are 2 options: + +* Directly specify :option:`platformio run --upload-port` in command line + +.. code-block:: bash + + platformio run --target upload --upload-port IP_ADDRESS_HERE + +* Specify ``upload_port`` option in :ref:`projectconf` + +.. code-block:: ini + + [env:myenv] + ... + upload_port = IP_ADDRESS_HERE + +Authentication and upload options +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can pass additional options/flags to OTA uploader using +``upload_flags`` option in :ref:`projectconf` + +.. code-block:: ini + + [env:myenv] + upload_flags = --port=8266 + +Available flags + +* ``--port=ESP_PORT`` ESP8266 ota Port. Default 8266 +* ``--auth=AUTH`` Set authentication password +* ``--spiffs`` Use this option to transmit a SPIFFS image and do not flash + the module + +For the full list with available options please run + +.. code-block:: bash + + ~/.platformio/packages/framework-arduinoespressif/tools/espota.py -h + + Usage: espota.py [options] + + Transmit image over the air to the esp8266 module with OTA support. + + Options: + -h, --help show this help message and exit + + Destination: + -i ESP_IP, --ip=ESP_IP + ESP8266 IP Address. + -p ESP_PORT, --port=ESP_PORT + ESP8266 ota Port. Default 8266 + + Authentication: + -a AUTH, --auth=AUTH + Set authentication password. + + Image: + -f FILE, --file=FILE + Image file. + -s, --spiffs Use this option to transmit a SPIFFS image and do not + flash the module. + + Output: + -d, --debug Show debug output. And override loglevel with debug. + -r, --progress Show progress output. Does not work for ArduinoIDE + +Custom CPU Frequency and Upload Speed +------------------------------------- + +See :ref:`projectconf_board_f_cpu` and :ref:`projectconf_upload_speed` options +from :ref:`projectconf` + +.. code-block:: ini + + [env:myenv] + # set frequency to 40MHz + board_f_cpu = 40000000L + + upload_speed = 9600 + + +Custom Flash Size +----------------- + +The list with preconfigured LD scripts is located in public repository +`platformio-pkg-ldscripts `_. + +* ``esp8266.flash.512k0.ld`` 512K (no SPIFFS) +* ``esp8266.flash.512k64.ld`` 512K (64K SPIFFS) +* ``esp8266.flash.1m64.ld`` 1M (64K SPIFFS) +* ``esp8266.flash.1m128.ld`` 1M (128K SPIFFS) +* ``esp8266.flash.1m256.ld`` 1M (256K SPIFFS) +* ``esp8266.flash.1m512.ld`` 1M (512K SPIFFS) +* ``esp8266.flash.2m.ld`` 2M (1M SPIFFS) +* ``esp8266.flash.4m1.ld`` 4M (1M SPIFFS) +* ``esp8266.flash.4m.ld`` 4M (3M SPIFFS) +* ``esp8266.flash.8m.ld`` 8M (7M SPIFFS) +* ``esp8266.flash.16m.ld`` 16M (15M SPIFFS) + +To override default LD script please use :ref:`projectconf_build_flags` from +:ref:`projectconf`. + +.. code-block:: ini + + [env:myenv] + build_flags = -Wl,-Tesp8266.flash.4m.ld + +Examples +-------- + +All project examples are located in PlatformIO repository +`Examples for Espressif platform `_. + +* `Native SDK `_ +* `WebServer `_ +* `WiFiScan `_ diff --git a/docs/projectconf.rst b/docs/projectconf.rst index da086d04..23571f79 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -176,6 +176,7 @@ is described `here `_. The full list of ``board_mcu`` for the popular embedded platforms you can find in *Boards* section of :ref:`platforms`. See "Microcontroller" column. +.. _projectconf_board_f_cpu: ``board_f_cpu`` ^^^^^^^^^^^^^^^ @@ -209,6 +210,7 @@ To print all available serial ports use :ref:`cmd_serialports` command. A protocol that "uploader" tool uses to talk to the board. +.. _projectconf_upload_speed: ``upload_speed`` ^^^^^^^^^^^^^^^^ diff --git a/docs/quickstart.rst b/docs/quickstart.rst index f66ba358..baa5e1fa 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -30,9 +30,6 @@ Quickstart $ platformio init --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - Would you like to enable firmware auto-uploading when project is successfully built using `platformio run` command? - Don't forget that you can upload firmware manually using `platformio run --target upload` command. [y/N]: y - The current working directory *** will be used for the new project. You can specify another project directory via `platformio init -d %PATH_TO_THE_PROJECT_DIR%` command. @@ -66,10 +63,9 @@ Change working directory to the project's root where is located # clean project $ platformio run --target clean -If you don't have installed required platforms, then *PlatformIO* will propose -you to install them automatically. -Further examples can be found in `PlatformIO Repository `_. +Useful links: -Also, for more detailed information as for commands please go to -:ref:`userguide` sections. +* `Project examples `_ +* :ref:`userguide` for PlatformIO commands +* `Quickstart for Espressif ESP8266 `_ diff --git a/docs/userguide/cmd_serialports.rst b/docs/userguide/cmd_serialports.rst index 8cea3be5..2c985ff3 100644 --- a/docs/userguide/cmd_serialports.rst +++ b/docs/userguide/cmd_serialports.rst @@ -191,13 +191,13 @@ Do not apply any encodings/transformations --exit-char ASCII code of special character that is used to exit the application, -default ``0x1d`` +default ``29`` (DEC) .. option:: --menu-char ASCII code of special character that is used to control miniterm (menu), -default ``0x14`` +default ``20`` (DEC) .. option:: ---quiet diff --git a/examples/espressif/esp8266-webserver/platformio.ini b/examples/espressif/esp8266-webserver/platformio.ini index e79ce81c..e25bd946 100644 --- a/examples/espressif/esp8266-webserver/platformio.ini +++ b/examples/espressif/esp8266-webserver/platformio.ini @@ -17,7 +17,22 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:esp01_8266] +[env:esp01] platform = espressif framework = arduino board = esp01 + +[env:nodemcu] +platform = espressif +framework = arduino +board = nodemcu + +[env:huzzah] +platform = espressif +framework = arduino +board = huzzah + +[env:thing] +platform = espressif +framework = arduino +board = thing diff --git a/platformio/__init__.py b/platformio/__init__.py index 784f1715..dfffbd25 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (2, 6, 0) +VERSION = (2, 6, 1) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/__main__.py b/platformio/__main__.py index 813558bb..cafaec6c 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -109,7 +109,11 @@ def main(): An unexpected error occurred. Further steps: * Verify that you have the latest version of PlatformIO using - `platformio upgrade` command + `pip install -U platformio` command + +* Try to find answer in FAQ Troubleshooting section + http://docs.platformio.org/en/latest/faq.html + * Report this problem to the developers https://github.com/platformio/platformio/issues diff --git a/platformio/boards/espressif.json b/platformio/boards/espressif.json index ea97a27b..b11e7c34 100644 --- a/platformio/boards/espressif.json +++ b/platformio/boards/espressif.json @@ -2,67 +2,230 @@ "esp01": { "build": { "core": "esp8266", - "extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP01", "f_cpu": "80000000L", - "ldscript": "esp8266.flash.512k.ld", + "ldscript": "esp8266.flash.512k64.ld", "mcu": "esp8266", "variant": "generic" }, "frameworks": ["arduino"], - "name": "Espressif ESP8266 ESP-01 board", + "name": "Espressif Generic ESP8266 ESP-01", "platform": "espressif", "upload": { - "maximum_ram_size": 32768, + "maximum_ram_size": 81920, "maximum_size": 524288, - "protocol": "arduino", - "require_upload_port" : true, - "speed": 115200 - }, - "url": "https://nurdspace.nl/ESP8266", - "vendor": "Espressif" - }, - "esp01_1m": { - "build": { - "core": "esp8266", - "extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266", - "f_cpu": "80000000L", - "ldscript": "esp8266.flash.1m128.ld", - "mcu": "esp8266", - "variant": "generic" - }, - "frameworks": ["arduino"], - "name": "Espressif ESP8266 ESP-01-1MB board", - "platform": "espressif", - "upload": { - "maximum_ram_size": 32768, - "maximum_size": 1048576, - "protocol": "arduino", + "resetmethod": "ck", "require_upload_port" : true, "speed": 115200 }, "url": "https://nurdspace.nl/ESP8266", "vendor": "Espressif" }, + "esp12e": { "build": { "core": "esp8266", - "extra_flags": "-DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12", "f_cpu": "80000000L", "ldscript": "esp8266.flash.4m.ld", "mcu": "esp8266", "variant": "nodemcu" }, "frameworks": ["arduino"], - "name": "Espressif ESP8266 ESP-12E board (NodeMCU)", + "name": "Espressif ESP8266 ESP-12E", "platform": "espressif", "upload": { - "maximum_ram_size": 32768, - "maximum_size": 4194304, - "protocol": "arduino", + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "nodemcu", "require_upload_port" : true, "speed": 115200 }, "url": "https://nurdspace.nl/ESP8266", "vendor": "Espressif" + }, + + "nodemcu": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.4m.ld", + "mcu": "esp8266", + "variant": "nodemcu" + }, + "frameworks": ["arduino"], + "name": "NodeMCU 0.9 & 1.0", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "nodemcu", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "http://www.nodemcu.com/", + "vendor": "Espressif" + }, + + "huzzah": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.4m.ld", + "mcu": "esp8266", + "variant": "adafruit" + }, + "frameworks": ["arduino"], + "name": "Adafruit HUZZAH ESP8266", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "nodemcu", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.adafruit.com/products/2471", + "vendor": "Espressif" + }, + + "modwifi": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_MOD_WIFI_ESP8266", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.2m.ld", + "mcu": "esp8266", + "variant": "generic" + }, + "frameworks": ["arduino"], + "name": "Olimex MOD-WIFI-ESP8266(-DEV)", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "ck", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.olimex.com/Products/IoT/MOD-WIFI-ESP8266-DEV/open-source-hardware", + "vendor": "Espressif" + }, + + "thing": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_THING", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.512k64.ld", + "mcu": "esp8266", + "variant": "thing" + }, + "frameworks": ["arduino"], + "name": "SparkFun ESP8266 Thing", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 524288, + "resetmethod": "nodemcu", + "require_upload_port" : true, + "speed": 921600 + }, + "url": "https://www.sparkfun.com/products/13231", + "vendor": "Espressif" + }, + + "esp210": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP210", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.4m.ld", + "mcu": "esp8266", + "variant": "generic" + }, + "frameworks": ["arduino"], + "name": "SweetPea ESP-210", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "ck", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "http://wiki.sweetpeas.se/index.php?title=ESP-210", + "vendor": "Espressif" + }, + + "d1": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.4m.ld", + "mcu": "esp8266", + "variant": "d1" + }, + "frameworks": ["arduino"], + "name": "WeMos D1", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "nodemcu", + "require_upload_port" : true, + "speed": 460800 + }, + "url": "http://www.wemos.cc/wiki/doku.php?id=en:d1", + "vendor": "Espressif" + }, + + "d1_mini": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.4m.ld", + "mcu": "esp8266", + "variant": "d1_mini" + }, + "frameworks": ["arduino"], + "name": "WeMos D1 mini", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "nodemcu", + "require_upload_port" : true, + "speed": 460800 + }, + "url": "http://www.wemos.cc/wiki/doku.php?id=en:d1_mini", + "vendor": "Espressif" + }, + + "espino": { + "build": { + "core": "esp8266", + "extra_flags": "-DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12", + "f_cpu": "80000000L", + "ldscript": "esp8266.flash.4m1m.ld", + "mcu": "esp8266", + "variant": "espino" + }, + "frameworks": ["arduino"], + "name": "ESPino", + "platform": "espressif", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 1048576, + "resetmethod": "ck", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "http://www.espino.io", + "vendor": "Espressif" } } diff --git a/platformio/boards/misc.json b/platformio/boards/misc.json index a5080010..fa028efc 100644 --- a/platformio/boards/misc.json +++ b/platformio/boards/misc.json @@ -459,7 +459,7 @@ "variant": "eightanaloginputs" }, "frameworks": ["arduino"], - "name": "BQ ZUM BT-328 board", + "name": "BQ ZUM BT-328", "platform": "atmelavr", "upload": { "disable_flushing": true, diff --git a/platformio/boards/raspberrypi.json b/platformio/boards/raspberrypi.json index ec4b7878..25c3485a 100644 --- a/platformio/boards/raspberrypi.json +++ b/platformio/boards/raspberrypi.json @@ -18,7 +18,6 @@ "raspberrypi_2b": { "build": { - "core": "esp8266", "extra_flags": "-DRASPBERRYPI -DRASPBERRYPI2", "f_cpu": "900000000L", "mcu": "bcm2836" diff --git a/platformio/builder/main.py b/platformio/builder/main.py index 26bc853f..1f5debdd 100644 --- a/platformio/builder/main.py +++ b/platformio/builder/main.py @@ -114,6 +114,7 @@ DefaultEnvironment( ) env = DefaultEnvironment() +env.Prepend(LIBPATH=[join("$PIOPACKAGES_DIR", "ldscripts")]) if "BOARD" in env: try: diff --git a/platformio/builder/scripts/espressif.py b/platformio/builder/scripts/espressif.py index 0980c605..6ffa0fb0 100644 --- a/platformio/builder/scripts/espressif.py +++ b/platformio/builder/scripts/espressif.py @@ -87,13 +87,12 @@ env.Replace( UPLOADER=join("$PIOPACKAGES_DIR", "tool-esptool", "esptool"), UPLOADERFLAGS=[ "-vv", - "-cd", "ck", + "-cd", "${BOARD_OPTIONS['upload']['resetmethod']}", "-cb", "$UPLOAD_SPEED", "-cp", "$UPLOAD_PORT", - "-ca", "0x00000", "-cf", "$SOURCE" ], - UPLOADCMD='$UPLOADER $UPLOADERFLAGS', + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS', PROGNAME="firmware", PROGSUFFIX=".elf" @@ -105,9 +104,10 @@ env.Append( BUILDERS=dict( ElfToBin=Builder( action=" ".join([ - "$UPLOADER", - "-eo", join("$PLATFORMFW_DIR", "bootloaders", - "eboot", "eboot.elf"), + '"$UPLOADER"', + "-eo", + '"%s"' % join("$PLATFORMFW_DIR", "bootloaders", + "eboot", "eboot.elf"), "-bo", "$TARGET", "-bm", "dio", "-bf", "${BOARD_OPTIONS['build']['f_cpu'][:2]}", @@ -148,7 +148,7 @@ if "FRAMEWORK" in env: "-i", "$UPLOAD_PORT", "-f", "$SOURCE" ], - UPLOADCMD='$UPLOADEROTA $UPLOADERFLAGS' + UPLOADCMD='"$UPLOADEROTA" $UPLOADERFLAGS' ) except socket.error: pass @@ -164,7 +164,7 @@ else: BUILDERS=dict( ElfToBin=Builder( action=" ".join([ - "$UPLOADER", + '"$UPLOADER"', "-eo", "$SOURCES", "-bo", "${TARGETS[0]}", "-bm", "qio", diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index c83ab478..f3d7a7ff 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -61,7 +61,7 @@ if not isfile(join(env.subst("$PIOPACKAGES_DIR"), "ldscripts", ldscript)): if "mbed" in env.get("BOARD_OPTIONS", {}).get("frameworks", {}): env.Append( LINKFLAGS=[ - "-Wl,-T", + '-Wl,-T"%s"' % join( "$PIOPACKAGES_DIR", "framework-mbed", "variant", env.subst("$BOARD").upper(), "mbed", diff --git a/platformio/builder/scripts/ststm32.py b/platformio/builder/scripts/ststm32.py index 276192bc..1b35cb5d 100644 --- a/platformio/builder/scripts/ststm32.py +++ b/platformio/builder/scripts/ststm32.py @@ -41,10 +41,11 @@ if env.subst("$UPLOAD_PROTOCOL") == "gdb": UPLOADERFLAGS=[ join("$BUILD_DIR", "firmware.elf"), "-batch", - "-x", join("$PROJECT_DIR", "upload.gdb") + "-x", + '"%s"' % join("$PROJECT_DIR", "upload.gdb") ], - UPLOADCMD="$UPLOADER $UPLOADERFLAGS" + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS' ) else: env.Replace( @@ -55,7 +56,7 @@ else: "0x08000000" # flash start adress ], - UPLOADCMD="$UPLOADER $UPLOADERFLAGS" + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS' ) diff --git a/platformio/builder/scripts/timsp430.py b/platformio/builder/scripts/timsp430.py index 7fc10303..b4e2498e 100644 --- a/platformio/builder/scripts/timsp430.py +++ b/platformio/builder/scripts/timsp430.py @@ -68,7 +68,7 @@ env.Replace( "$UPLOAD_PROTOCOL" if system() != "Windows" else "tilib", "--force-reset" ], - UPLOADCMD='$UPLOADER $UPLOADERFLAGS "prog $SOURCES"', + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS "prog $SOURCES"', PROGNAME="firmware", PROGSUFFIX=".elf" diff --git a/platformio/builder/scripts/titiva.py b/platformio/builder/scripts/titiva.py index 800f9a76..8dbaaf3f 100644 --- a/platformio/builder/scripts/titiva.py +++ b/platformio/builder/scripts/titiva.py @@ -28,7 +28,7 @@ SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) env.Replace( UPLOADER=join("$PIOPACKAGES_DIR", "tool-lm4flash", "lm4flash"), - UPLOADCMD="$UPLOADER $SOURCES" + UPLOADCMD='"$UPLOADER" $SOURCES' ) env.Append( diff --git a/platformio/builder/tools/pioar.py b/platformio/builder/tools/pioar.py index cd3b9be0..624ff6fc 100644 --- a/platformio/builder/tools/pioar.py +++ b/platformio/builder/tools/pioar.py @@ -26,9 +26,13 @@ def _huge_sources_hook(sources): tmp_file = join(gettempdir(), "pioarargs-%s" % md5(_sources).hexdigest()) with open(tmp_file, "w") as f: - f.write(_sources) + # fix space in paths + for line in _sources.split(".o "): + if not line.endswith(".o"): + line += ".o" + f.write('"%s" ' % line) - return "@%s" % tmp_file + return '@"%s"' % tmp_file def exists(_): diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 6db8acfe..ad5dfb0b 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -58,7 +58,7 @@ def BuildProgram(env): if ("LDSCRIPT_PATH" in env and not any(["-Wl,-T" in f for f in env['LINKFLAGS']])): env.Append( - LINKFLAGS=["-Wl,-T", "$LDSCRIPT_PATH"] + LINKFLAGS=['-Wl,-T"$LDSCRIPT_PATH"'] ) # enable "cyclic reference" for linker @@ -78,7 +78,9 @@ def BuildProgram(env): env.Append( CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format( - *pioversion_to_intstr())] + *pioversion_to_intstr())], + LIBS=deplibs, + LIBPATH=["$BUILD_DIR"] ) return env.Program( @@ -86,9 +88,7 @@ def BuildProgram(env): env.LookupSources( "$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False, src_filter=getenv("PLATFORMIO_SRC_FILTER", - env.get("SRC_FILTER"))), - LIBS=env.get("LIBS", []) + deplibs, - LIBPATH=env.get("LIBPATH", []) + ["$BUILD_DIR"] + env.get("SRC_FILTER"))) ) diff --git a/platformio/ide/tpls/eclipse/.cproject.tpl b/platformio/ide/tpls/eclipse/.cproject.tpl index 08b8a369..28d12111 100644 --- a/platformio/ide/tpls/eclipse/.cproject.tpl +++ b/platformio/ide/tpls/eclipse/.cproject.tpl @@ -24,6 +24,9 @@