Skip to content

Commit 7e92498

Browse files
committed
Merge branch 'release/v8.2.0'
2 parents 0d63e99 + 2c0496e commit 7e92498

File tree

6 files changed

+27
-124
lines changed

6 files changed

+27
-124
lines changed

.github/workflows/examples.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ jobs:
2121
- "examples/zephyr-blink"
2222
- "examples/zephyr-custom-board"
2323
- "examples/zephyr-synchronization"
24-
exclude:
25-
- {python-version: 2.7, example: "examples/zephyr-blink"}
26-
- {python-version: 2.7, example: "examples/zephyr-custom-board"}
27-
- {python-version: 2.7, example: "examples/zephyr-synchronization"}
2824
runs-on: ${{ matrix.os }}
2925
steps:
3026
- uses: actions/checkout@v2

boards/lpcxpresso55s16.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
"build": {
33
"cpu": "cortex-m33",
44
"f_cpu": "150000000L",
5-
"mcu": "lpc55s16",
6-
"zephyr": {
7-
"variant": "lpcxpresso55s16_ns"
8-
}
5+
"mcu": "lpc55s16"
96
},
107
"connectivity": [
118
"ethernet"

builder/main.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,30 @@
1515
import sys
1616
from platform import system
1717
from os import makedirs
18-
from os.path import isdir, join
18+
from os.path import isdir, isfile, join
19+
from struct import unpack, pack
1920

2021
from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild,
2122
Builder, Default, DefaultEnvironment)
2223

24+
25+
def add_image_checksum(source, target, env):
26+
# According to https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/LPC-Image-Checksums/m-p/471035
27+
# NXP LPC parts use a word in the vector table of the processor to store a checksum
28+
# that is examined by the bootloader to identify a valid image.
29+
bin_path = target[0].path
30+
if isfile(bin_path):
31+
# From https://github.com/ARMmbed/mbed-os/blob/master/tools/targets/LPC.py
32+
with open(bin_path, "r+b") as fp:
33+
# Read entries 0 through 6 (Little Endian 32bits words)
34+
vector = [unpack("<I", fp.read(4))[0] for _ in range(7)]
35+
36+
# location 7 (offset 0x1C in the vector table) should contain the 2"s
37+
# complement of the check-sum of table entries 0 through 6
38+
fp.seek(0x1C)
39+
fp.write(pack("<I", (~sum(vector) + 1) & 0xFFFFFFFF))
40+
41+
2342
env = DefaultEnvironment()
2443
env.SConscript("compat.py", exports="env")
2544
platform = env.PioPlatform()
@@ -97,6 +116,8 @@
97116
else:
98117
target_elf = env.BuildProgram()
99118
target_firm = env.ElfToBin(join("$BUILD_DIR", "${PROGNAME}"), target_elf)
119+
env.AddPostAction(target_firm, env.VerboseAction(
120+
add_image_checksum, "Adding checksum to $TARGET"))
100121
env.Depends(target_firm, "checkprogsize")
101122

102123
AlwaysBuild(env.Alias("nobuild", target_firm))

examples/zephyr-custom-board/boards/my_custom_board.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"f_cpu": "150000000L",
55
"mcu": "lpc55s16",
66
"zephyr": {
7-
"variant": "lpcxpresso55s16_ns"
7+
"variant": "lpcxpresso55s16"
88
}
99
},
1010
"connectivity": [

platform.json

Lines changed: 2 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"type": "git",
1919
"url": "https://github.com/platformio/platform-nxplpc.git"
2020
},
21-
"version": "8.1.0",
21+
"version": "8.2.0",
2222
"frameworks": {
2323
"mbed": {
2424
"package": "framework-mbed",
@@ -51,117 +51,7 @@
5151
"type": "framework",
5252
"optional": true,
5353
"owner": "platformio",
54-
"version": "~2.20500.0"
55-
},
56-
"framework-zephyr-cmsis": {
57-
"optional": true,
58-
"owner": "platformio",
59-
"version": "0.0.0-alpha+sha.c3bd2094f9"
60-
},
61-
"framework-zephyr-canopennode": {
62-
"optional": true,
63-
"owner": "platformio",
64-
"version": "0.0.0-alpha+sha.468d350028"
65-
},
66-
"framework-zephyr-civetweb": {
67-
"optional": true,
68-
"owner": "platformio",
69-
"version": "0.0.0-alpha+sha.e6903b80c0"
70-
},
71-
"framework-zephyr-fatfs": {
72-
"optional": true,
73-
"owner": "platformio",
74-
"version": "0.0.0-alpha+sha.1d1fcc725a"
75-
},
76-
"framework-zephyr-hal-st": {
77-
"optional": true,
78-
"owner": "platformio",
79-
"version": "0.0.0-alpha+sha.b52fdbf4b6"
80-
},
81-
"framework-zephyr-hal-nxp": {
82-
"optional": true,
83-
"owner": "platformio",
84-
"version": "0.0.0-alpha+sha.b916bca1d5"
85-
},
86-
"framework-zephyr-libmetal": {
87-
"optional": true,
88-
"owner": "platformio",
89-
"version": "0.0.0-alpha+sha.9d4ee2c3cf"
90-
},
91-
"framework-zephyr-lvgl": {
92-
"optional": true,
93-
"owner": "platformio",
94-
"version": "0.0.0-alpha+sha.31acbaa36e"
95-
},
96-
"framework-zephyr-mbedtls": {
97-
"optional": true,
98-
"owner": "platformio",
99-
"version": "0.0.0-alpha+sha.24d84ecff1"
100-
},
101-
"framework-zephyr-mcuboot": {
102-
"optional": true,
103-
"owner": "platformio",
104-
"version": "0.0.0-alpha+sha.3fc59410b6"
105-
},
106-
"framework-zephyr-mcumgr": {
107-
"optional": true,
108-
"owner": "platformio",
109-
"version": "0.0.0-alpha+sha.43845e883f"
110-
},
111-
"framework-zephyr-open-amp": {
112-
"optional": true,
113-
"owner": "platformio",
114-
"version": "0.0.0-alpha+sha.de1b85a130"
115-
},
116-
"framework-zephyr-loramac-node": {
117-
"optional": true,
118-
"owner": "platformio",
119-
"version": "0.0.0-alpha+sha.3f545d76a2"
120-
},
121-
"framework-zephyr-openthread": {
122-
"optional": true,
123-
"owner": "platformio",
124-
"version": "0.0.0-alpha+sha.1d668284a0"
125-
},
126-
"framework-zephyr-segger": {
127-
"optional": true,
128-
"owner": "platformio",
129-
"version": "0.0.0-alpha+sha.38c79a447e"
130-
},
131-
"framework-zephyr-sof": {
132-
"optional": true,
133-
"owner": "platformio",
134-
"version": "0.0.0-alpha+sha.b5b772dd61"
135-
},
136-
"framework-zephyr-tinycbor": {
137-
"optional": true,
138-
"owner": "platformio",
139-
"version": "0.0.0-alpha+sha.40daca97b4"
140-
},
141-
"framework-zephyr-tinycrypt": {
142-
"optional": true,
143-
"owner": "platformio",
144-
"version": "0.0.0-alpha+sha.3e9a49d267"
145-
},
146-
"framework-zephyr-littlefs": {
147-
"optional": true,
148-
"owner": "platformio",
149-
"version": "0.0.0-alpha+sha.9e4498d1c7"
150-
},
151-
"framework-zephyr-mipi-sys-t": {
152-
"optional": true,
153-
"owner": "platformio",
154-
"version": "0.0.0-alpha+sha.75e671550a"
155-
},
156-
"framework-zephyr-tfm-mcuboot": {
157-
"optional": true,
158-
"owner": "platformio",
159-
"version": "1.7.0-rc1"
160-
},
161-
"framework-zephyr-trusted-firmware-m": {
162-
"optional": true,
163-
"owner": "platformio",
164-
"version": "0.0.0-alpha+sha.96340fb6c0"
54+
"version": "~2.20600.0"
16555
},
16656
"tool-openocd": {
16757
"type": "debugger",

platform.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ def configure_default_packages(self, variables, targets):
4545

4646
if "zephyr" in variables.get("pioframework", []):
4747
for p in self.packages:
48-
if p.startswith("framework-zephyr-") or p in (
49-
"tool-cmake", "tool-dtc", "tool-ninja"):
48+
if p in ("tool-cmake", "tool-dtc", "tool-ninja"):
5049
self.packages[p]["optional"] = False
5150
if "windows" not in get_systype():
5251
self.packages["tool-gperf"]["optional"] = False

0 commit comments

Comments
 (0)