Skip to content

Commit e088821

Browse files
committed
Add compatibility with PIO Core 6.0
1 parent 9ef89be commit e088821

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
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/mbed-rtos-blink-baremetal"
1413
- "examples/mbed-rtos-blockdevice"
@@ -23,18 +22,17 @@ jobs:
2322
- "examples/zephyr-synchronization"
2423
runs-on: ${{ matrix.os }}
2524
steps:
26-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2726
with:
2827
submodules: "recursive"
29-
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v1
28+
- name: Set up Python
29+
uses: actions/setup-python@v3
3130
with:
32-
python-version: ${{ matrix.python-version }}
31+
python-version: "3.9"
3332
- name: Install dependencies
3433
run: |
35-
python -m pip install --upgrade pip
3634
pip install -U https://github.com/platformio/platformio/archive/develop.zip
3735
pio pkg install --global --platform symlink://.
3836
- name: Build examples
3937
run: |
40-
platformio run -d ${{ matrix.example }}
38+
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-
# NXP LPC: development platform for [PlatformIO](http://platformio.org)
1+
# NXP LPC: development platform for [PlatformIO](https://platformio.org)
22

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

@@ -9,7 +9,7 @@ The NXP LPC is a family of 32-bit microcontroller integrated circuits by NXP Sem
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

platform.json

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

platform.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
import copy
1616
import json
1717
import os
18+
import sys
1819

19-
from platformio.managers.platform import PlatformBase
20-
from platformio.util import get_systype
20+
from platformio.public import PlatformBase
21+
22+
IS_WINDOWS = sys.platform.startswith("win")
2123

2224
class NxplpcPlatform(PlatformBase):
2325

@@ -47,7 +49,7 @@ def configure_default_packages(self, variables, targets):
4749
for p in self.packages:
4850
if p in ("tool-cmake", "tool-dtc", "tool-ninja"):
4951
self.packages[p]["optional"] = False
50-
if "windows" not in get_systype():
52+
if not IS_WINDOWS:
5153
self.packages["tool-gperf"]["optional"] = False
5254

5355
# configure J-LINK tool
@@ -65,11 +67,10 @@ def configure_default_packages(self, variables, targets):
6567
if not any(jlink_conds) and jlink_pkgname in self.packages:
6668
del self.packages[jlink_pkgname]
6769

68-
return PlatformBase.configure_default_packages(self, variables,
69-
targets)
70+
return super().configure_default_packages(variables, targets)
7071

7172
def get_boards(self, id_=None):
72-
result = PlatformBase.get_boards(self, id_)
73+
result = super().get_boards(id_)
7374
if not result:
7475
return result
7576
if id_:
@@ -145,7 +146,7 @@ def _add_default_debug_tools(self, board):
145146
"-port", "2331"
146147
],
147148
"executable": ("JLinkGDBServerCL.exe"
148-
if "windows" in get_systype() else
149+
if IS_WINDOWS else
149150
"JLinkGDBServer")
150151
},
151152
"onboard": link in debug.get("onboard_tools", [])

0 commit comments

Comments
 (0)