Rename "espressif" platform to "espressif8266"

This commit is contained in:
Ivan Kravets
2016-09-03 19:35:40 +03:00
parent 6036c54b05
commit fda7392b84
20 changed files with 84 additions and 46 deletions

View File

@ -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`

View File

@ -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

View File

@ -56,7 +56,7 @@ Packages
* - ``framework-arduinoavr``
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``framework-arduinoespressif``
* - ``framework-arduinoespressif8266``
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
* - ``framework-arduinointel``

View File

@ -9,10 +9,10 @@
See the License for the specific language governing permissions and
limitations under the License.
.. _platform_espressif:
.. _platform_espressif8266:
Platform ``espressif``
======================
Platform ``espressif8266``
==========================
Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.
For more detailed information please visit `vendor site <https://espressif.com/>`_.
@ -28,7 +28,7 @@ Packages
* - Name
- Contents
* - ``framework-arduinoespressif``
* - ``framework-arduinoespressif8266``
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
* - ``framework-simba``
@ -386,4 +386,4 @@ WeMos
- 4096 Kb
- 80 Kb
.. include:: espressif_extra.rst
.. include:: espressif8266_extra.rst

View File

@ -181,7 +181,7 @@ For the full list with available options please run
.. code-block:: bash
~/.platformio/packages/framework-arduinoespressif/tools/espota.py -h
~/.platformio/packages/framework-arduinoespressif8266/tools/espota.py -h
Usage: espota.py [options]
@ -221,9 +221,20 @@ Using Arduino Framework with Staging version
--------------------------------------------
1. Clone/Copy `main repository <https://github.com/esp8266/Arduino>`_ to
:ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif``
and create new file ``packages/framework-arduinoespressif/version.txt``
with the new version (for example, ``2.2.0``).
:ref:`projectconf_pio_home_dir` + ``packages/framework-arduinoespressif8266``
and create new file ``packages/framework-arduinoespressif8266/package.json``
with the next contents (you can specify own version if you want)
.. code-block:: json
{
"description":"Arduino Wiring-based Framework (ESP8266 Core)",
"name":"framework-arduinoespressif8266",
"system":"all",
"url":"https://github.com/esp8266/Arduino",
"version":"1.20300.0"
}
2. Try to build project
3. If you see build errors, then try to build this project using the same
``stage`` on Arduino IDE

View File

@ -30,7 +30,7 @@ Embedded
atmelavr
atmelsam
espressif
espressif8266
freescalekinetis
intel_arc32
lattice_ice40

View File

@ -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
~~~~~~~~~~~~~~~

View File

@ -160,7 +160,7 @@ The result of just generated ``platformio.ini``:
board = uno
[env:nodemcuv2]
platform = espressif
platform = espressif8266
framework = arduino
board = nodemcuv2

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
...

View File

@ -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
...

View File

@ -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

View File

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

View File

@ -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(

View File

@ -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")