Skip to content

Commit a017c4c

Browse files
committed
Merge branch 'hotfix/v2.5.2'
2 parents a12dcb5 + 525c61c commit a017c4c

File tree

8 files changed

+108
-79
lines changed

8 files changed

+108
-79
lines changed

.github/workflows/examples.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Examples
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ubuntu-16.04, windows-latest, macos-latest]
11+
python-version: [2.7, 3.7]
12+
example:
13+
- "examples/arduino-asyncudp"
14+
- "examples/arduino-blink"
15+
- "examples/arduino-webserver"
16+
- "examples/arduino-wifiscan"
17+
- "examples/esp8266-nonos-sdk-blink"
18+
- "examples/esp8266-rtos-sdk-blink"
19+
- "examples/simba-blink"
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
submodules: "recursive"
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v1
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -U https://github.com/platformio/platformio/archive/develop.zip
33+
platformio platform install file://.
34+
- name: Build examples
35+
run: |
36+
platformio run -d ${{ matrix.example }}

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Espressif 8266: development platform for [PlatformIO](http://platformio.org)
2-
[![Build Status](https://travis-ci.org/platformio/platform-espressif8266.svg?branch=develop)](https://travis-ci.org/platformio/platform-espressif8266)
3-
[![Build status](https://ci.appveyor.com/api/projects/status/aob49qatio84iygj/branch/develop?svg=true)](https://ci.appveyor.com/project/ivankravets/platform-espressif8266/branch/develop)
2+
3+
![alt text](https://github.com/platformio/platform-espressif8266/workflows/Examples/badge.svg "Espressif 8266 development platform")
44

55
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.
66

appveyor.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

builder/compat.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Copyright 2014-present PlatformIO <[email protected]>
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from SCons.Script import AlwaysBuild, Import
16+
17+
18+
Import("env")
19+
20+
21+
# Added in PIO Core 4.4.0
22+
if not hasattr(env, "AddPlatformTarget"):
23+
24+
def AddPlatformTarget(
25+
env,
26+
name,
27+
dependencies,
28+
actions,
29+
title=None,
30+
description=None,
31+
always_build=True,
32+
):
33+
target = env.Alias(name, dependencies, actions)
34+
if always_build:
35+
AlwaysBuild(target)
36+
return target
37+
38+
env.AddMethod(AddPlatformTarget)

builder/main.py

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def get_esptoolpy_reset_flags(resetmethod):
138138
########################################################
139139

140140
env = DefaultEnvironment()
141+
env.SConscript("compat.py", exports="env")
141142
platform = env.PioPlatform()
142143

143144
env.Replace(
@@ -213,7 +214,7 @@ def get_esptoolpy_reset_flags(resetmethod):
213214
# Target: Build executable and linkable firmware or SPIFFS image
214215
#
215216

216-
target_elf = env.BuildProgram()
217+
target_elf = None
217218
if "nobuild" in COMMAND_LINE_TARGETS:
218219
target_elf = join("$BUILD_DIR", "${PROGNAME}.elf")
219220
if set(["uploadfs", "uploadfsota"]) & set(COMMAND_LINE_TARGETS):
@@ -222,15 +223,16 @@ def get_esptoolpy_reset_flags(resetmethod):
222223
else:
223224
target_firm = join("$BUILD_DIR", "${PROGNAME}.bin")
224225
else:
226+
target_elf = env.BuildProgram()
225227
if set(["buildfs", "uploadfs", "uploadfsota"]) & set(COMMAND_LINE_TARGETS):
226228
target_firm = env.DataToBin(
227229
join("$BUILD_DIR", env.get("SPIFFSNAME", "spiffs")), "$PROJECTDATA_DIR")
228230
AlwaysBuild(target_firm)
229-
AlwaysBuild(env.Alias("buildfs", target_firm))
230231
else:
231232
target_firm = env.ElfToBin(
232233
join("$BUILD_DIR", "${PROGNAME}"), target_elf)
233234

235+
env.AddPlatformTarget("buildfs", target_firm, None, "Build Filesystem Image")
234236
AlwaysBuild(env.Alias("nobuild", target_firm))
235237
target_buildprog = env.Alias("buildprog", target_firm, target_firm)
236238

@@ -249,10 +251,13 @@ def get_esptoolpy_reset_flags(resetmethod):
249251
# Target: Print binary size
250252
#
251253

252-
target_size = env.Alias(
253-
"size", target_elf,
254-
env.VerboseAction("$SIZEPRINTCMD", "Calculating size $SOURCE"))
255-
AlwaysBuild(target_size)
254+
target_size = env.AddPlatformTarget(
255+
"size",
256+
target_elf,
257+
env.VerboseAction("$SIZEPRINTCMD", "Calculating size $SOURCE"),
258+
"Program Size",
259+
"Calculate program size",
260+
)
256261

257262
#
258263
# Target: Upload firmware or SPIFFS image
@@ -335,19 +340,24 @@ def get_esptoolpy_reset_flags(resetmethod):
335340
else:
336341
sys.stderr.write("Warning! Unknown upload protocol %s\n" % upload_protocol)
337342

338-
env.AlwaysBuild(env.Alias(["upload", "uploadfs"], target_firm, upload_actions))
343+
env.AddPlatformTarget("upload", target_firm, upload_actions, "Upload")
344+
env.AddPlatformTarget("uploadfs", target_firm, upload_actions, "Upload Filesystem Image")
345+
env.AddPlatformTarget(
346+
"uploadfsota", target_firm, upload_actions, "Upload Filesystem Image OTA")
339347

340348
#
341349
# Target: Erase Flash
342350
#
343351

344-
AlwaysBuild(
345-
env.Alias("erase", None, [
346-
env.VerboseAction(env.AutodetectUploadPort,
347-
"Looking for serial port..."),
352+
env.AddPlatformTarget(
353+
"erase",
354+
None,
355+
[
356+
env.VerboseAction(env.AutodetectUploadPort, "Looking for serial port..."),
348357
env.VerboseAction("$ERASECMD", "Erasing...")
349-
]))
350-
358+
],
359+
"Erase Flash",
360+
)
351361

352362
#
353363
# Information about obsolete method of specifying linker scripts

monitor/filter_exception_decoder.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ class Esp8266ExceptionDecoder(
3737
ADDR_MAX = 0x40300000
3838

3939
STATE_DEFAULT = 0
40-
STATE_READ_EXCEPTION = 1
41-
STATE_IN_STACK = 2
40+
STATE_IN_STACK = 1
4241

4342
EXCEPTION_MARKER = "Exception ("
4443

@@ -157,6 +156,9 @@ def rx(self, text):
157156
self.buffer = ""
158157
last = idx + 1
159158

159+
if line and line[-1] == "\r":
160+
line = line[:-1]
161+
160162
extra = self.process_line(line)
161163
self.previous_line = line
162164
if extra is not None:
@@ -177,19 +179,18 @@ def is_addr_ok(self, hex_addr):
177179

178180
def process_line(self, line): # pylint: disable=too-many-return-statements
179181
if self.state == self.STATE_DEFAULT:
182+
extra = None
180183
if self.previous_line.startswith(self.EXCEPTION_MARKER):
181184
two_lines = (
182185
self.previous_line[len(self.EXCEPTION_MARKER) :] + "\n" + line
183186
)
184187
match = self.exception_re.match(two_lines)
185188
if match is not None:
186-
self.advance_state()
187-
return self.process_exception_match(match)
188-
return None
189-
elif self.state == self.STATE_READ_EXCEPTION:
189+
extra = self.process_exception_match(match)
190+
190191
if line == ">>>stack>>>":
191192
self.advance_state()
192-
return None
193+
return extra
193194
elif self.state == self.STATE_IN_STACK:
194195
if line == "<<<stack<<<":
195196
self.state = self.STATE_DEFAULT

platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"type": "git",
1313
"url": "https://github.com/platformio/platform-espressif8266.git"
1414
},
15-
"version": "2.5.1",
15+
"version": "2.5.2",
1616
"packageRepositories": [
1717
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1818
"http://dl.platformio.org/packages/manifest.json",

0 commit comments

Comments
 (0)