diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 41de2ea1..d53926b3 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -33,7 +33,7 @@ Platforms * - :ref:`platform_atmelsam` - Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix. - * - :ref:`platform_espressif` + * - :ref:`platform_espressif8266` - Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. * - :ref:`platform_intel_arc32` diff --git a/docs/frameworks/simba.rst b/docs/frameworks/simba.rst index 93512001..99c80e16 100644 --- a/docs/frameworks/simba.rst +++ b/docs/frameworks/simba.rst @@ -33,7 +33,7 @@ Platforms * - :ref:`platform_atmelsam` - Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix. - * - :ref:`platform_espressif` + * - :ref:`platform_espressif8266` - Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. Boards diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 29ceec6f..44fe48f0 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.rst @@ -56,7 +56,7 @@ Packages * - ``framework-arduinoavr`` - `Arduino Wiring-based Framework (AVR Core, 1.6) `_ - * - ``framework-arduinoespressif`` + * - ``framework-arduinoespressif8266`` - `Arduino Wiring-based Framework (ESP8266 Core) `_ * - ``framework-arduinointel`` diff --git a/docs/platforms/espressif.rst b/docs/platforms/espressif8266.rst similarity index 98% rename from docs/platforms/espressif.rst rename to docs/platforms/espressif8266.rst index 0bbe1ba1..8530ea18 100644 --- a/docs/platforms/espressif.rst +++ b/docs/platforms/espressif8266.rst @@ -9,10 +9,10 @@ See the License for the specific language governing permissions and limitations under the License. -.. _platform_espressif: +.. _platform_espressif8266: -Platform ``espressif`` -====================== +Platform ``espressif8266`` +========================== Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. For more detailed information please visit `vendor site `_. @@ -28,7 +28,7 @@ Packages * - Name - Contents - * - ``framework-arduinoespressif`` + * - ``framework-arduinoespressif8266`` - `Arduino Wiring-based Framework (ESP8266 Core) `_ * - ``framework-simba`` @@ -386,4 +386,4 @@ WeMos - 4096 Kb - 80 Kb -.. include:: espressif_extra.rst +.. include:: espressif8266_extra.rst diff --git a/docs/platforms/espressif_extra.rst b/docs/platforms/espressif8266_extra.rst similarity index 94% rename from docs/platforms/espressif_extra.rst rename to docs/platforms/espressif8266_extra.rst index 19967507..02db956f 100644 --- a/docs/platforms/espressif_extra.rst +++ b/docs/platforms/espressif8266_extra.rst @@ -181,7 +181,7 @@ For the full list with available options please run .. code-block:: bash - ~/.platformio/packages/framework-arduinoespressif/tools/espota.py -h + ~/.platformio/packages/framework-arduinoespressif8266/tools/espota.py -h Usage: espota.py [options] @@ -221,9 +221,20 @@ Using Arduino Framework with Staging version -------------------------------------------- 1. Clone/Copy `main repository `_ to - :ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif`` - and create new file ``packages/framework-arduinoespressif/version.txt`` - with the new version (for example, ``2.2.0``). + :ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif8266`` + and create new file ``packages/framework-arduinoespressif8266/package.json`` + with the next contents (you can specify own version if you want) + + .. code-block:: json + + { + "description":"Arduino Wiring-based Framework (ESP8266 Core)", + "name":"framework-arduinoespressif8266", + "system":"all", + "url":"https://github.com/esp8266/Arduino", + "version":"1.20300.0" + } + 2. Try to build project 3. If you see build errors, then try to build this project using the same ``stage`` on Arduino IDE diff --git a/docs/platforms/index.rst b/docs/platforms/index.rst index cdfa1003..99261396 100644 --- a/docs/platforms/index.rst +++ b/docs/platforms/index.rst @@ -30,7 +30,7 @@ Embedded atmelavr atmelsam - espressif + espressif8266 freescalekinetis intel_arc32 lattice_ice40 diff --git a/docs/projectconf.rst b/docs/projectconf.rst index 30f82968..9cf240fe 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -208,7 +208,7 @@ Multiple environments are allowed if they are separated with ", " board = uno [env:nodemcu] - platform = espressif + platform = espressif8266 framework = arduino board = nodemcu @@ -342,7 +342,7 @@ format of this option is ``C-like long integer`` value with ``L`` suffix. The 1 Hertz is equal to ``1L``, then 40 Mhz (Mega Hertz) is equal to ``40000000L``. This option isn't available for the all development platforms. The only -:ref:`platform_espressif` supports it. +:ref:`platform_espressif8266` supports it. .. _projectconf_board_flash_mode: @@ -350,7 +350,7 @@ This option isn't available for the all development platforms. The only ^^^^^^^^^^^^^^^^^^^^ Flash chip interface mode. This option isn't available for the all development -platforms. The only :ref:`platform_espressif` supports it. +platforms. The only :ref:`platform_espressif8266` supports it. Build options ~~~~~~~~~~~~~ @@ -682,7 +682,7 @@ This option can be set by global environment variable ^^^^^^^^^^^^^^^^^^^^^^ Specify reset method for "uploader" tool. This option isn't available for all -development platforms. The only :ref:`platform_espressif` supports it. +development platforms. The only :ref:`platform_espressif8266` supports it. Library options ~~~~~~~~~~~~~~~ diff --git a/docs/quickstart.rst b/docs/quickstart.rst index c3e61cfa..83442cb9 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -160,7 +160,7 @@ The result of just generated ``platformio.ini``: board = uno [env:nodemcuv2] - platform = espressif + platform = espressif8266 framework = arduino board = nodemcuv2 diff --git a/docs/unit_testing.rst b/docs/unit_testing.rst index 1ea3e74c..204e0670 100644 --- a/docs/unit_testing.rst +++ b/docs/unit_testing.rst @@ -90,7 +90,7 @@ Workflow board = uno [env:nodemcu] - platform = espressif + platform = espressif8266 framework = arduino board = nodemcuv2 @@ -278,7 +278,7 @@ Source files board = uno [env:nodemcu] - platform = espressif + platform = espressif8266 framework = arduino board = nodemcu diff --git a/docs/userguide/cmd_run.rst b/docs/userguide/cmd_run.rst index b785a7a5..a3b71939 100644 --- a/docs/userguide/cmd_run.rst +++ b/docs/userguide/cmd_run.rst @@ -131,21 +131,21 @@ Examples .. code-block:: bash $ platformio run -e arduino_pro5v -e launchpad_lm4f120 - [Sun Jul 17 00:10:14 2016] Processing nodemcu (platform: espressif, board: nodemcu, framework: arduino) + [Sun Jul 17 00:10:14 2016] Processing nodemcu (platform: espressif8266, board: nodemcu, framework: arduino) -------------------------------------------------------------------------------------------------------- Looking for dependencies... Collecting 29 compatible libraries Processing src/main.cpp Processing .pioenvs/nodemcu/libFrameworkArduinoVariant.a - Processing .platformio/packages/framework-arduinoespressif/cores/esp8266/Esp.cpp + Processing .platformio/packages/framework-arduinoespressif8266/cores/esp8266/Esp.cpp ... - Processing .platformio/packages/framework-arduinoespressif/cores/esp8266/pgmspace.cpp - Processing .platformio/packages/framework-arduinoespressif/cores/esp8266/setjmp.S + Processing .platformio/packages/framework-arduinoespressif8266/cores/esp8266/pgmspace.cpp + Processing .platformio/packages/framework-arduinoespressif8266/cores/esp8266/setjmp.S Processing .pioenvs/nodemcu/libFrameworkArduino.a - Processing .platformio/packages/framework-arduinoespressif/tools/sdk/lib/libmesh.a + Processing .platformio/packages/framework-arduinoespressif8266/tools/sdk/lib/libmesh.a ... - Processing .platformio/packages/framework-arduinoespressif/tools/sdk/lib/libaxtls.a - Processing .platformio/packages/framework-arduinoespressif/tools/sdk/lib/libstdc++.a + Processing .platformio/packages/framework-arduinoespressif8266/tools/sdk/lib/libaxtls.a + Processing .platformio/packages/framework-arduinoespressif8266/tools/sdk/lib/libstdc++.a Processing .pioenvs/nodemcu/firmware.elf Processing .platformio/packages/tool-esptool/esptool Processing .pioenvs/nodemcu/firmware.bin @@ -154,7 +154,7 @@ Examples 221456 884 29496 251836 3d7bc .pioenvs/nodemcu/firmware.elf -3. Process specific target +3. Process specific target (clean project) .. code-block:: bash diff --git a/docs/userguide/cmd_update.rst b/docs/userguide/cmd_update.rst index 137b8172..da5d9327 100644 --- a/docs/userguide/cmd_update.rst +++ b/docs/userguide/cmd_update.rst @@ -93,14 +93,14 @@ Examples Updating toolchain-atmelavr @ 1.40801.0: [Up-to-date] Updating tool-scons @ 2.4.1: [Up-to-date] - Platform espressif + Platform espressif8266 -------- - Updating espressif @ 0.0.0: [Up-to-date] + Updating espressif8266 @ 0.0.0: [Up-to-date] Updating tool-scons @ 2.4.1: [Up-to-date] Updating toolchain-xtensa @ 1.40802.0: [Up-to-date] Updating tool-esptool @ 1.409.0: [Up-to-date] Updating tool-mkspiffs @ 1.102.0: [Up-to-date] - Updating framework-arduinoespressif @ 1.20300.0: [Up-to-date] + Updating framework-arduinoespressif8266 @ 1.20300.0: [Up-to-date] Updating sdk-esp8266 @ 1.10502.0: [Up-to-date] Platform linux_x86_64 diff --git a/docs/userguide/lib/cmd_list.rst b/docs/userguide/lib/cmd_list.rst index db521e2b..b0274fc7 100644 --- a/docs/userguide/lib/cmd_list.rst +++ b/docs/userguide/lib/cmd_list.rst @@ -67,5 +67,5 @@ Examples [ ID ] Name Compatibility "Authors": Description ----------------------------------------------------------------------------------------------------------- [ 4 ] IRremote arduino, atmelavr "Rafi Khan, Ken Shirriff": Send and receive infrared signals with multiple protocols | @2.2.1 - [ 64 ] Json arduino, atmelavr, atmelsam, timsp430, titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc, espressif, siliconlabsefm32, linux_arm, native, intel_arc32 "Benoit Blanchon": An elegant and efficient JSON library for embedded systems | @5.4.0 + [ 64 ] Json arduino, atmelavr, atmelsam, timsp430, titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc, espressif8266, siliconlabsefm32, linux_arm, native, intel_arc32 "Benoit Blanchon": An elegant and efficient JSON library for embedded systems | @5.4.0 [ VCS ] TextLCD - "Unknown": hg+https://developer.mbed.org/users/simon/code/TextLCD/ | @308d188a2d3a diff --git a/docs/userguide/lib/cmd_show.rst b/docs/userguide/lib/cmd_show.rst index b1f09e95..b0befe1d 100644 --- a/docs/userguide/lib/cmd_show.rst +++ b/docs/userguide/lib/cmd_show.rst @@ -81,5 +81,5 @@ Examples Authors: Benoit Blanchon http://blog.benoitblanchon.fr Keywords: json, rest, http, web Frameworks: arduino - Platforms: atmelavr, atmelsam, timsp430, titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc, espressif, siliconlabsefm32, linux_arm, native, intel_arc32 + Platforms: atmelavr, atmelsam, timsp430, titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc, espressif8266, siliconlabsefm32, linux_arm, native, intel_arc32 Version: 5.4.0 diff --git a/docs/userguide/platforms/cmd_list.rst b/docs/userguide/platforms/cmd_list.rst index 9aacba4c..2ae465c8 100644 --- a/docs/userguide/platforms/cmd_list.rst +++ b/docs/userguide/platforms/cmd_list.rst @@ -62,11 +62,11 @@ Examples Packages: framework-arduinosam, framework-mbed, framework-simba, toolchain-gccarmnoneeabi, tool-bossac Version: 0.0.0 - espressif ~ Espressif - ===================== + espressif8266 ~ Espressif 8266 + ============================== Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. - Home: http://platformio.org/platforms/espressif - Packages: framework-simba, tool-esptool, framework-arduinoespressif, sdk-esp8266, toolchain-xtensa + Home: http://platformio.org/platforms/espressif8266 + Packages: framework-simba, tool-esptool, framework-arduinoespressif8266, sdk-esp8266, toolchain-xtensa Version: 0.0.0 ... diff --git a/docs/userguide/platforms/cmd_search.rst b/docs/userguide/platforms/cmd_search.rst index 00a3f63a..9f0dc648 100644 --- a/docs/userguide/platforms/cmd_search.rst +++ b/docs/userguide/platforms/cmd_search.rst @@ -65,12 +65,12 @@ Examples Packages: framework-arduinosam, framework-mbed, framework-simba, toolchain-gccarmnoneeabi, tool-bossac Version: 0.0.0 - espressif ~ Espressif - ===================== + espressif8266 ~ Espressif 8266 + ============================== Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. Home: http://platformio.org/platforms/espressif - Packages: framework-simba, tool-esptool, framework-arduinoespressif, sdk-esp8266, toolchain-xtensa + Packages: framework-simba, tool-esptool, framework-arduinoespressif8266, sdk-esp8266, toolchain-xtensa Version: 0.0.0 ... diff --git a/docs/userguide/platforms/cmd_update.rst b/docs/userguide/platforms/cmd_update.rst index 581c2c35..79612b0d 100644 --- a/docs/userguide/platforms/cmd_update.rst +++ b/docs/userguide/platforms/cmd_update.rst @@ -63,14 +63,14 @@ Examples Updating toolchain-atmelavr @ 1.40801.0: [Up-to-date] Updating tool-scons @ 2.4.1: [Up-to-date] - Platform espressif + Platform espressif8266 -------- Updating espressif @ 0.0.0: [Up-to-date] Updating tool-scons @ 2.4.1: [Up-to-date] Updating toolchain-xtensa @ 1.40802.0: [Up-to-date] Updating tool-esptool @ 1.409.0: [Up-to-date] Updating tool-mkspiffs @ 1.102.0: [Up-to-date] - Updating framework-arduinoespressif @ 1.20300.0: [Up-to-date] + Updating framework-arduinoespressif8266 @ 1.20300.0: [Up-to-date] Updating sdk-esp8266 @ 1.10502.0: [Up-to-date] Platform teensy diff --git a/examples b/examples index 5cafb1f7..72b3153a 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 5cafb1f792a240d719036a9b36fb21e6fd746d05 +Subproject commit 72b3153af021232552eafccb247186e5563ed533 diff --git a/platformio/__init__.py b/platformio/__init__.py index 0ba9b049..d1a55985 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 0, "0b10") +VERSION = (3, 0, "0b11") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 2bac6643..1b4899da 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -130,6 +130,8 @@ class EnvironmentProcessor(object): RENAMED_OPTIONS = {"lib_use": "lib_force"} + RENAMED_PLATFORMS = {"espressif": "espressif8266"} + def __init__(self, # pylint: disable=R0913 cmd_ctx, name, @@ -191,6 +193,15 @@ class EnvironmentProcessor(object): "`%s` instead." % (k, self.RENAMED_OPTIONS[k]), fg="yellow") k = self.RENAMED_OPTIONS[k] + # process renamed platforms + if k == "platform" and v in self.RENAMED_PLATFORMS: + click.secho( + "Warning! Platform `%s` is deprecated and will be " + "removed in the next release! Please use " + "`%s` instead." % (v, self.RENAMED_PLATFORMS[v]), + fg="yellow") + v = self.RENAMED_PLATFORMS[v] + # warn about unknown options if k not in self.KNOWN_OPTIONS: click.secho( diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 2d2605c4..cb169092 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -25,6 +25,8 @@ from platformio import __version__, app, exception, telemetry, util from platformio.commands.lib import lib_update as cmd_lib_update from platformio.commands.platform import \ platform_install as cmd_platform_install +from platformio.commands.platform import \ + platform_uninstall as cmd_platform_uninstall from platformio.commands.platform import platform_update as cmd_platform_update from platformio.commands.upgrade import get_latest_version from platformio.managers.lib import LibraryManager @@ -82,7 +84,8 @@ class Upgrader(object): util.pepver_to_semver(to_version)) self._upgraders = [ - (semantic_version.Version("3.0.0-a1"), self._upgrade_to_3_0_0) + (semantic_version.Version("3.0.0-a1"), self._upgrade_to_3_0_0), + (semantic_version.Version("3.0.0-b11"), self._upgrade_to_3_0_0) ] def run(self, ctx): @@ -97,7 +100,8 @@ class Upgrader(object): return all(result) - def _upgrade_to_3_0_0(self, ctx): # pylint: disable=R0201 + @staticmethod + def _upgrade_to_3_0_0(ctx): # convert custom board configuration boards_dir = join(util.get_home_dir(), "boards") if isdir(boards_dir): @@ -115,10 +119,22 @@ class Upgrader(object): # re-install PlatformIO 2.0 development platforms installed_platforms = app.get_state_item("installed_platforms", []) if installed_platforms: + if "espressif" in installed_platforms: + installed_platforms[installed_platforms.index( + "espressif")] = "espressif8266" ctx.invoke(cmd_platform_install, platforms=installed_platforms) return True + @staticmethod + def _upgrade_to_3_0_0b11(ctx): + current_platforms = [m['name'] + for m in PlatformManager().get_installed()] + if "espressif" not in current_platforms: + return + ctx.invoke(cmd_platform_install, platforms=["espressif8266"]) + ctx.invoke(cmd_platform_uninstall, platforms=["espressif"]) + def after_upgrade(ctx): last_version = app.get_state_item("last_version", "0.0.0")