Skip to content

Commit 7915ba5

Browse files
committed
Add compatibility with PIO Core 6.0
1 parent ac22923 commit 7915ba5

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

.github/workflows/examples.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ jobs:
88
fail-fast: false
99
matrix:
1010
os: [ubuntu-latest, windows-latest, macos-latest]
11-
python-version: [3.7]
1211
example:
1312
- "examples/arduino-asyncudp"
1413
- "examples/arduino-blink"
@@ -18,18 +17,17 @@ jobs:
1817
- "examples/esp8266-rtos-sdk-blink"
1918
runs-on: ${{ matrix.os }}
2019
steps:
21-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2221
with:
2322
submodules: "recursive"
24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v1
23+
- name: Set up Python
24+
uses: actions/setup-python@v3
2625
with:
27-
python-version: ${{ matrix.python-version }}
26+
python-version: "3.9"
2827
- name: Install dependencies
2928
run: |
30-
python -m pip install --upgrade pip
3129
pip install -U https://github.com/platformio/platformio/archive/develop.zip
3230
pio pkg install --global --platform symlink://.
3331
- name: Build examples
3432
run: |
35-
platformio run -d ${{ matrix.example }}
33+
pio run -d ${{ matrix.example }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Espressif 8266: development platform for [PlatformIO](http://platformio.org)
1+
# Espressif 8266: development platform for [PlatformIO](https://platformio.org)
22

33
[![Build Status](https://github.com/platformio/platform-espressif8266/workflows/Examples/badge.svg)](https://github.com/platformio/platform-espressif8266/actions)
44

@@ -9,7 +9,7 @@ Espressif Systems is a privately held fabless semiconductor company. They provid
99

1010
# Usage
1111

12-
1. [Install PlatformIO](http://platformio.org)
12+
1. [Install PlatformIO](https://platformio.org)
1313
2. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:
1414

1515
## Stable version

builder/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
# pylint: disable=redefined-outer-name
1616

17+
import functools
1718
import re
1819
import sys
1920
from os.path import join
2021

2122

2223
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild,
2324
Builder, Default, DefaultEnvironment)
24-
from platformio import util
2525

2626
#
2727
# Helpers
@@ -47,7 +47,7 @@ def _parse_size(value):
4747
return value
4848

4949

50-
@util.memoized()
50+
@functools.lru_cache
5151
def _parse_ld_sizes(ldscript_path):
5252
assert ldscript_path
5353
result = {}

monitor/filter_exception_decoder.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@
1717
import subprocess
1818
import sys
1919

20-
from platformio.commands.device import DeviceMonitorFilter
21-
from platformio.compat import path_to_unicode, WINDOWS
2220
from platformio.project.exception import PlatformioException
23-
from platformio.project.helpers import load_project_ide_data
21+
from platformio.public import (
22+
DeviceMonitorFilterBase,
23+
load_build_metadata,
24+
)
2425

2526

2627
# By design, __init__ is called inside miniterm and we can't pass context to it.
2728
# pylint: disable=attribute-defined-outside-init
2829

30+
IS_WINDOWS = sys.platform.startswith("win")
31+
2932

3033
class Esp8266ExceptionDecoder(
31-
DeviceMonitorFilter
34+
DeviceMonitorFilterBase
3235
): # pylint: disable=too-many-instance-attributes
3336
NAME = "esp8266_exception_decoder"
3437

@@ -110,9 +113,9 @@ def __call__(self):
110113
return self
111114

112115
def setup_paths(self):
113-
self.project_dir = path_to_unicode(os.path.abspath(self.project_dir))
116+
self.project_dir = os.path.abspath(self.project_dir)
114117
try:
115-
data = load_project_ide_data(self.project_dir, self.environment)
118+
data = load_build_metadata(self.project_dir, self.environment)
116119
self.firmware_path = data["prog_path"]
117120
if not os.path.isfile(self.firmware_path):
118121
sys.stderr.write(
@@ -253,7 +256,7 @@ def take_stack_lines(self):
253256
def get_lines(self, addresses):
254257
result = []
255258

256-
enc = "mbcs" if WINDOWS else "utf-8"
259+
enc = "mbcs" if IS_WINDOWS else "utf-8"
257260
args = [self.addr2line_path, u"-fipC", u"-e", self.firmware_path]
258261

259262
for addr in addresses:

platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"106Micro"
1212
],
1313
"engines": {
14-
"platformio": "^5"
14+
"platformio": "^6"
1515
},
1616
"repository": {
1717
"type": "git",

platform.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from platformio.managers.platform import PlatformBase
15+
from platformio.public import PlatformBase
1616

1717

1818
class Espressif8266Platform(PlatformBase):
@@ -24,11 +24,10 @@ def configure_default_packages(self, variables, targets):
2424
if "buildfs" in targets:
2525
self.packages['tool-mkspiffs']['optional'] = False
2626
self.packages['tool-mklittlefs']['optional'] = False
27-
return PlatformBase.configure_default_packages(
28-
self, variables, targets)
27+
return super().configure_default_packages(variables, targets)
2928

3029
def get_boards(self, id_=None):
31-
result = PlatformBase.get_boards(self, id_)
30+
result = super().get_boards(id_)
3231
if not result:
3332
return result
3433
if id_:

0 commit comments

Comments
 (0)