Skip to content

Commit c97b377

Browse files
committed
Add compatibility with PIO Core 6.0
1 parent 6caac4d commit c97b377

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

Diff for: .github/workflows/examples.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,22 @@ 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-blink"
1413
- "examples/arduino-external-libs"
1514
runs-on: ${{ matrix.os }}
1615
steps:
17-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1817
with:
1918
submodules: "recursive"
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v1
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
2221
with:
23-
python-version: ${{ matrix.python-version }}
22+
python-version: "3.9"
2423
- name: Install dependencies
2524
run: |
26-
python -m pip install --upgrade pip
2725
pip install -U https://github.com/platformio/platformio/archive/develop.zip
2826
pio pkg install --global --platform symlink://.
2927
- name: Build examples
3028
run: |
31-
platformio run -d ${{ matrix.example }}
29+
pio run -d ${{ matrix.example }}

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RP2040 is a low-cost, high-performance microcontroller device with a large on-ch
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

Diff for: builder/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from os import makedirs
1818
from os.path import isdir, join
1919

20-
from platformio.util import get_serial_ports
20+
from platformio.public import list_serial_ports
2121

2222
from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild,
2323
Builder, Default, DefaultEnvironment)
@@ -29,7 +29,7 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
2929
upload_options = env.BoardConfig().get("upload", {})
3030

3131
env.AutodetectUploadPort()
32-
before_ports = get_serial_ports()
32+
before_ports = list_serial_ports()
3333

3434
if upload_options.get("use_1200bps_touch", False):
3535
env.TouchSerialPort("$UPLOAD_PORT", 1200)

Diff for: platform.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"RP2040"
1313
],
1414
"engines": {
15-
"platformio": "^5"
15+
"platformio": "^6"
1616
},
1717
"repository": {
1818
"type": "git",

Diff for: platform.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import platform
1616

17-
from platformio.managers.platform import PlatformBase
17+
from platformio.public import PlatformBase
1818

1919

2020
class RaspberrypiPlatform(PlatformBase):
@@ -38,16 +38,16 @@ def configure_default_packages(self, variables, targets):
3838
if not any(jlink_conds) and jlink_pkgname in self.packages:
3939
del self.packages[jlink_pkgname]
4040

41-
return PlatformBase.configure_default_packages(self, variables, targets)
41+
return super().configure_default_packages(variables, targets)
4242

4343
def get_boards(self, id_=None):
44-
result = PlatformBase.get_boards(self, id_)
44+
result = super().get_boards(id_)
4545
if not result:
4646
return result
4747
if id_:
4848
return self._add_default_debug_tools(result)
4949
else:
50-
for key, value in result.items():
50+
for key in result:
5151
result[key] = self._add_default_debug_tools(result[key])
5252
return result
5353

@@ -101,7 +101,6 @@ def _add_default_debug_tools(self, board):
101101

102102
def configure_debug_session(self, debug_config):
103103
adapter_speed = debug_config.speed or "5000"
104-
105104
server_options = debug_config.server or {}
106105
server_arguments = server_options.get("arguments", [])
107106
if "interface/cmsis-dap.cfg" in server_arguments:

0 commit comments

Comments
 (0)