Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Jun 10, 2020
2 parents a12dcb5 + 525c61c commit a017c4c
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 79 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Examples

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, windows-latest, macos-latest]
python-version: [2.7, 3.7]
example:
- "examples/arduino-asyncudp"
- "examples/arduino-blink"
- "examples/arduino-webserver"
- "examples/arduino-wifiscan"
- "examples/esp8266-nonos-sdk-blink"
- "examples/esp8266-rtos-sdk-blink"
- "examples/simba-blink"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install file://.
- name: Build examples
run: |
platformio run -d ${{ matrix.example }}
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Espressif 8266: development platform for [PlatformIO](http://platformio.org)
[![Build Status](https://travis-ci.org/platformio/platform-espressif8266.svg?branch=develop)](https://travis-ci.org/platformio/platform-espressif8266)
[![Build status](https://ci.appveyor.com/api/projects/status/aob49qatio84iygj/branch/develop?svg=true)](https://ci.appveyor.com/project/ivankravets/platform-espressif8266/branch/develop)

![alt text](https://github.com/platformio/platform-espressif8266/workflows/Examples/badge.svg "Espressif 8266 development platform")

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.

Expand Down
27 changes: 0 additions & 27 deletions appveyor.yml

This file was deleted.

38 changes: 38 additions & 0 deletions builder/compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2014-present PlatformIO <[email protected]>
#
# 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.

from SCons.Script import AlwaysBuild, Import


Import("env")


# Added in PIO Core 4.4.0
if not hasattr(env, "AddPlatformTarget"):

def AddPlatformTarget(
env,
name,
dependencies,
actions,
title=None,
description=None,
always_build=True,
):
target = env.Alias(name, dependencies, actions)
if always_build:
AlwaysBuild(target)
return target

env.AddMethod(AddPlatformTarget)
36 changes: 23 additions & 13 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def get_esptoolpy_reset_flags(resetmethod):
########################################################

env = DefaultEnvironment()
env.SConscript("compat.py", exports="env")
platform = env.PioPlatform()

env.Replace(
Expand Down Expand Up @@ -213,7 +214,7 @@ def get_esptoolpy_reset_flags(resetmethod):
# Target: Build executable and linkable firmware or SPIFFS image
#

target_elf = env.BuildProgram()
target_elf = None
if "nobuild" in COMMAND_LINE_TARGETS:
target_elf = join("$BUILD_DIR", "${PROGNAME}.elf")
if set(["uploadfs", "uploadfsota"]) & set(COMMAND_LINE_TARGETS):
Expand All @@ -222,15 +223,16 @@ def get_esptoolpy_reset_flags(resetmethod):
else:
target_firm = join("$BUILD_DIR", "${PROGNAME}.bin")
else:
target_elf = env.BuildProgram()
if set(["buildfs", "uploadfs", "uploadfsota"]) & set(COMMAND_LINE_TARGETS):
target_firm = env.DataToBin(
join("$BUILD_DIR", env.get("SPIFFSNAME", "spiffs")), "$PROJECTDATA_DIR")
AlwaysBuild(target_firm)
AlwaysBuild(env.Alias("buildfs", target_firm))
else:
target_firm = env.ElfToBin(
join("$BUILD_DIR", "${PROGNAME}"), target_elf)

env.AddPlatformTarget("buildfs", target_firm, None, "Build Filesystem Image")
AlwaysBuild(env.Alias("nobuild", target_firm))
target_buildprog = env.Alias("buildprog", target_firm, target_firm)

Expand All @@ -249,10 +251,13 @@ def get_esptoolpy_reset_flags(resetmethod):
# Target: Print binary size
#

target_size = env.Alias(
"size", target_elf,
env.VerboseAction("$SIZEPRINTCMD", "Calculating size $SOURCE"))
AlwaysBuild(target_size)
target_size = env.AddPlatformTarget(
"size",
target_elf,
env.VerboseAction("$SIZEPRINTCMD", "Calculating size $SOURCE"),
"Program Size",
"Calculate program size",
)

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

env.AlwaysBuild(env.Alias(["upload", "uploadfs"], target_firm, upload_actions))
env.AddPlatformTarget("upload", target_firm, upload_actions, "Upload")
env.AddPlatformTarget("uploadfs", target_firm, upload_actions, "Upload Filesystem Image")
env.AddPlatformTarget(
"uploadfsota", target_firm, upload_actions, "Upload Filesystem Image OTA")

#
# Target: Erase Flash
#

AlwaysBuild(
env.Alias("erase", None, [
env.VerboseAction(env.AutodetectUploadPort,
"Looking for serial port..."),
env.AddPlatformTarget(
"erase",
None,
[
env.VerboseAction(env.AutodetectUploadPort, "Looking for serial port..."),
env.VerboseAction("$ERASECMD", "Erasing...")
]))

],
"Erase Flash",
)

#
# Information about obsolete method of specifying linker scripts
Expand Down
15 changes: 8 additions & 7 deletions monitor/filter_exception_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class Esp8266ExceptionDecoder(
ADDR_MAX = 0x40300000

STATE_DEFAULT = 0
STATE_READ_EXCEPTION = 1
STATE_IN_STACK = 2
STATE_IN_STACK = 1

EXCEPTION_MARKER = "Exception ("

Expand Down Expand Up @@ -157,6 +156,9 @@ def rx(self, text):
self.buffer = ""
last = idx + 1

if line and line[-1] == "\r":
line = line[:-1]

extra = self.process_line(line)
self.previous_line = line
if extra is not None:
Expand All @@ -177,19 +179,18 @@ def is_addr_ok(self, hex_addr):

def process_line(self, line): # pylint: disable=too-many-return-statements
if self.state == self.STATE_DEFAULT:
extra = None
if self.previous_line.startswith(self.EXCEPTION_MARKER):
two_lines = (
self.previous_line[len(self.EXCEPTION_MARKER) :] + "\n" + line
)
match = self.exception_re.match(two_lines)
if match is not None:
self.advance_state()
return self.process_exception_match(match)
return None
elif self.state == self.STATE_READ_EXCEPTION:
extra = self.process_exception_match(match)

if line == ">>>stack>>>":
self.advance_state()
return None
return extra
elif self.state == self.STATE_IN_STACK:
if line == "<<<stack<<<":
self.state = self.STATE_DEFAULT
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-espressif8266.git"
},
"version": "2.5.1",
"version": "2.5.2",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json",
Expand Down

0 comments on commit a017c4c

Please sign in to comment.