mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Implemented Over The Air (OTA) upgrades for Espressif development platform // Resolve #365
This commit is contained in:
@ -7,7 +7,11 @@ PlatformIO 2.0
|
||||
2.5.1 (2015-12-??)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Handle ``upload_flags`` option in `platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`_
|
||||
* Implemented Over The Air (OTA) upgrades for `Espressif <http://docs.platformio.org/en/latest/platforms/espressif.html>`__
|
||||
development platform.
|
||||
(`issue #365 <https://github.com/platformio/platformio/issues/365>`_)
|
||||
* Added support for Espressif ESP8266 ESP-01-1MB board (ready for OTA)
|
||||
* Handle ``upload_flags`` option in `platformio.ini <http://docs.platformio.org/en/latest/projectconf.html>`__
|
||||
(`issue #368 <https://github.com/platformio/platformio/issues/368>`_)
|
||||
|
||||
2.5.0 (2015-12-08)
|
||||
|
@ -476,15 +476,22 @@ Espressif
|
||||
* - ``esp01``
|
||||
- `Espressif ESP8266 ESP-01 board <https://nurdspace.nl/ESP8266>`_
|
||||
- ESP8266
|
||||
- 40 MHz
|
||||
- 80 MHz
|
||||
- 512 Kb
|
||||
- 32 Kb
|
||||
|
||||
* - ``esp01_1m``
|
||||
- `Espressif ESP8266 ESP-01-1MB board <https://nurdspace.nl/ESP8266>`_
|
||||
- ESP8266
|
||||
- 80 MHz
|
||||
- 1024 Kb
|
||||
- 32 Kb
|
||||
|
||||
* - ``esp12e``
|
||||
- `Espressif ESP8266 ESP-12E board (NodeMCU) <https://nurdspace.nl/ESP8266>`_
|
||||
- ESP8266
|
||||
- 80 MHz
|
||||
- 512 Kb
|
||||
- 4096 Kb
|
||||
- 32 Kb
|
||||
|
||||
LightUp
|
||||
|
@ -88,13 +88,20 @@ Espressif
|
||||
* - ``esp01``
|
||||
- `Espressif ESP8266 ESP-01 board <https://nurdspace.nl/ESP8266>`_
|
||||
- ESP8266
|
||||
- 40 MHz
|
||||
- 80 MHz
|
||||
- 512 Kb
|
||||
- 32 Kb
|
||||
|
||||
* - ``esp01_1m``
|
||||
- `Espressif ESP8266 ESP-01-1MB board <https://nurdspace.nl/ESP8266>`_
|
||||
- ESP8266
|
||||
- 80 MHz
|
||||
- 1024 Kb
|
||||
- 32 Kb
|
||||
|
||||
* - ``esp12e``
|
||||
- `Espressif ESP8266 ESP-12E board (NodeMCU) <https://nurdspace.nl/ESP8266>`_
|
||||
- ESP8266
|
||||
- 80 MHz
|
||||
- 512 Kb
|
||||
- 4096 Kb
|
||||
- 32 Kb
|
||||
|
@ -21,6 +21,28 @@
|
||||
"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",
|
||||
"require_upload_port" : true,
|
||||
"speed": 115200
|
||||
},
|
||||
"url": "https://nurdspace.nl/ESP8266",
|
||||
"vendor": "Espressif"
|
||||
},
|
||||
"esp12e": {
|
||||
"build": {
|
||||
"core": "esp8266",
|
||||
|
@ -16,6 +16,7 @@
|
||||
Builder for Espressif MCUs
|
||||
"""
|
||||
|
||||
import socket
|
||||
from os.path import join
|
||||
|
||||
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
|
||||
@ -98,14 +99,6 @@ env.Replace(
|
||||
PROGSUFFIX=".elf"
|
||||
)
|
||||
|
||||
if "FRAMEWORK" in env:
|
||||
env.Append(
|
||||
LINKFLAGS=[
|
||||
"-Wl,-wrap,system_restart_local",
|
||||
"-Wl,-wrap,register_chipv6_phy"
|
||||
]
|
||||
)
|
||||
|
||||
_board_max_rom = int(
|
||||
env.get("BOARD_OPTIONS", {}).get("upload", {}).get("maximum_size", 0))
|
||||
env.Append(
|
||||
@ -136,11 +129,32 @@ env.Append(
|
||||
)
|
||||
)
|
||||
|
||||
#
|
||||
# Configure SDK
|
||||
#
|
||||
if "FRAMEWORK" in env:
|
||||
env.Append(
|
||||
LINKFLAGS=[
|
||||
"-Wl,-wrap,system_restart_local",
|
||||
"-Wl,-wrap,register_chipv6_phy"
|
||||
]
|
||||
)
|
||||
|
||||
if "FRAMEWORK" not in env:
|
||||
# Handle uploading via OTA
|
||||
try:
|
||||
if env.get("UPLOAD_PORT") and socket.inet_aton(env.get("UPLOAD_PORT")):
|
||||
env.Replace(
|
||||
UPLOADEROTA=join("$PLATFORMFW_DIR", "tools", "espota.py"),
|
||||
UPLOADERFLAGS=[
|
||||
"--debug",
|
||||
"--progress",
|
||||
"-i", "$UPLOAD_PORT",
|
||||
"-f", "$SOURCE"
|
||||
],
|
||||
UPLOADCMD='$UPLOADEROTA $UPLOADERFLAGS'
|
||||
)
|
||||
except socket.error:
|
||||
pass
|
||||
|
||||
# Configure native SDK
|
||||
else:
|
||||
env.Append(
|
||||
CPPPATH=[
|
||||
join("$PIOPACKAGES_DIR", "sdk-esp8266", "include"),
|
||||
|
Reference in New Issue
Block a user