Skip to content

Commit c518847

Browse files
committed
Add support for SDK 2.1.0 and Pico 2 W
1 parent c489e3c commit c518847

File tree

9 files changed

+227
-15
lines changed

9 files changed

+227
-15
lines changed

data/0.17.0/github-cache.json

Lines changed: 193 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"githubApiCache-0-0": [
33
"1.5.1",
4-
"2.0.0"
4+
"2.0.0",
5+
"2.1.0"
56
],
67
"githubApiCache-0-1-1.5.1": {
78
"assets": [
@@ -23,9 +24,20 @@
2324
],
2425
"assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk/releases/169292056/assets"
2526
},
27+
"githubApiCache-0-1-2.1.0": {
28+
"assets": [
29+
{
30+
"id": 208867614,
31+
"name": "pico-sdk-2.1.0.tar.gz",
32+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk/releases/download/2.1.0/pico-sdk-2.1.0.tar.gz"
33+
}
34+
],
35+
"assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk/releases/187177527/assets"
36+
},
2637
"githubApiCache-1-0": [
2738
"v3.28.6",
28-
"v3.29.6"
39+
"v3.29.6",
40+
"v3.29.9"
2941
],
3042
"githubApiCache-1-1-v3.28.6": {
3143
"assets": [
@@ -227,6 +239,106 @@
227239
],
228240
"assetsUrl": "https://api.github.com/repos/Kitware/CMake/releases/160931478/assets"
229241
},
242+
"githubApiCache-1-1-v3.29.9": {
243+
"assets": [
244+
{
245+
"id": 208104321,
246+
"name": "cmake-3.29.9-files-v1.json",
247+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-files-v1.json"
248+
},
249+
{
250+
"id": 208104322,
251+
"name": "cmake-3.29.9-linux-aarch64.sh",
252+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-linux-aarch64.sh"
253+
},
254+
{
255+
"id": 208104324,
256+
"name": "cmake-3.29.9-linux-aarch64.tar.gz",
257+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-linux-aarch64.tar.gz"
258+
},
259+
{
260+
"id": 208104336,
261+
"name": "cmake-3.29.9-linux-x86_64.sh",
262+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-linux-x86_64.sh"
263+
},
264+
{
265+
"id": 208104342,
266+
"name": "cmake-3.29.9-linux-x86_64.tar.gz",
267+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-linux-x86_64.tar.gz"
268+
},
269+
{
270+
"id": 208104354,
271+
"name": "cmake-3.29.9-macos-universal.dmg",
272+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-macos-universal.dmg"
273+
},
274+
{
275+
"id": 208104365,
276+
"name": "cmake-3.29.9-macos-universal.tar.gz",
277+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-macos-universal.tar.gz"
278+
},
279+
{
280+
"id": 208104384,
281+
"name": "cmake-3.29.9-macos10.10-universal.dmg",
282+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-macos10.10-universal.dmg"
283+
},
284+
{
285+
"id": 208104392,
286+
"name": "cmake-3.29.9-macos10.10-universal.tar.gz",
287+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-macos10.10-universal.tar.gz"
288+
},
289+
{
290+
"id": 208104400,
291+
"name": "cmake-3.29.9-SHA-256.txt",
292+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-SHA-256.txt"
293+
},
294+
{
295+
"id": 208104401,
296+
"name": "cmake-3.29.9-SHA-256.txt.asc",
297+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-SHA-256.txt.asc"
298+
},
299+
{
300+
"id": 208104403,
301+
"name": "cmake-3.29.9-windows-arm64.msi",
302+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-windows-arm64.msi"
303+
},
304+
{
305+
"id": 208104417,
306+
"name": "cmake-3.29.9-windows-arm64.zip",
307+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-windows-arm64.zip"
308+
},
309+
{
310+
"id": 208104420,
311+
"name": "cmake-3.29.9-windows-i386.msi",
312+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-windows-i386.msi"
313+
},
314+
{
315+
"id": 208104423,
316+
"name": "cmake-3.29.9-windows-i386.zip",
317+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-windows-i386.zip"
318+
},
319+
{
320+
"id": 208104428,
321+
"name": "cmake-3.29.9-windows-x86_64.msi",
322+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-windows-x86_64.msi"
323+
},
324+
{
325+
"id": 208104437,
326+
"name": "cmake-3.29.9-windows-x86_64.zip",
327+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9-windows-x86_64.zip"
328+
},
329+
{
330+
"id": 208104442,
331+
"name": "cmake-3.29.9.tar.gz",
332+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9.tar.gz"
333+
},
334+
{
335+
"id": 208104444,
336+
"name": "cmake-3.29.9.zip",
337+
"browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.9/cmake-3.29.9.zip"
338+
}
339+
],
340+
"assetsUrl": "https://api.github.com/repos/Kitware/CMake/releases/186670936/assets"
341+
},
230342
"githubApiCache-2-0": [
231343
"v1.12.1"
232344
],
@@ -267,7 +379,8 @@
267379
"v2.0.0-2",
268380
"v2.0.0-3",
269381
"v2.0.0-4",
270-
"v2.0.0-5"
382+
"v2.0.0-5",
383+
"v2.1.0-0"
271384
],
272385
"githubApiCache-3-1-v1.5.1-0": {
273386
"assets": [
@@ -774,8 +887,74 @@
774887
],
775888
"assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/177327402/assets"
776889
},
890+
"githubApiCache-3-1-v2.1.0-0": {
891+
"assets": [
892+
{
893+
"id": 208907841,
894+
"name": "openocd-0.12.0+dev-aarch64-lin.tar.gz",
895+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/openocd-0.12.0%2Bdev-aarch64-lin.tar.gz"
896+
},
897+
{
898+
"id": 208909295,
899+
"name": "openocd-0.12.0+dev-arm64-mac.zip",
900+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/openocd-0.12.0%2Bdev-arm64-mac.zip"
901+
},
902+
{
903+
"id": 208909148,
904+
"name": "openocd-0.12.0+dev-x64-win.zip",
905+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/openocd-0.12.0%2Bdev-x64-win.zip"
906+
},
907+
{
908+
"id": 208907708,
909+
"name": "openocd-0.12.0+dev-x86_64-lin.tar.gz",
910+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/openocd-0.12.0%2Bdev-x86_64-lin.tar.gz"
911+
},
912+
{
913+
"id": 208907840,
914+
"name": "pico-sdk-tools-2.1.0-aarch64-lin.tar.gz",
915+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/pico-sdk-tools-2.1.0-aarch64-lin.tar.gz"
916+
},
917+
{
918+
"id": 208909294,
919+
"name": "pico-sdk-tools-2.1.0-mac.zip",
920+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/pico-sdk-tools-2.1.0-mac.zip"
921+
},
922+
{
923+
"id": 208909147,
924+
"name": "pico-sdk-tools-2.1.0-x64-win.zip",
925+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/pico-sdk-tools-2.1.0-x64-win.zip"
926+
},
927+
{
928+
"id": 208907707,
929+
"name": "pico-sdk-tools-2.1.0-x86_64-lin.tar.gz",
930+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/pico-sdk-tools-2.1.0-x86_64-lin.tar.gz"
931+
},
932+
{
933+
"id": 208907842,
934+
"name": "picotool-2.1.0-aarch64-lin.tar.gz",
935+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/picotool-2.1.0-aarch64-lin.tar.gz"
936+
},
937+
{
938+
"id": 208909293,
939+
"name": "picotool-2.1.0-mac.zip",
940+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/picotool-2.1.0-mac.zip"
941+
},
942+
{
943+
"id": 208909149,
944+
"name": "picotool-2.1.0-x64-win.zip",
945+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/picotool-2.1.0-x64-win.zip"
946+
},
947+
{
948+
"id": 208907706,
949+
"name": "picotool-2.1.0-x86_64-lin.tar.gz",
950+
"browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.1.0-0/picotool-2.1.0-x86_64-lin.tar.gz"
951+
}
952+
],
953+
"assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/187251265/assets"
954+
},
777955
"githubApiCache-4-0": [
778-
"2.0.0"
956+
"2.0.0",
957+
"2.1.0"
779958
],
780959
"githubApiCache-4-1-2.0.0": {
781960
"assets": [
@@ -786,5 +965,15 @@
786965
}
787966
],
788967
"assetsUrl": "https://api.github.com/repos/raspberrypi/picotool/releases/169321961/assets"
968+
},
969+
"githubApiCache-4-1-2.1.0": {
970+
"assets": [
971+
{
972+
"id": 208873404,
973+
"name": "picotool-2.1.0.tar.gz",
974+
"browser_download_url": "https://github.com/raspberrypi/picotool/releases/download/2.1.0/picotool-2.1.0.tar.gz"
975+
}
976+
],
977+
"assetsUrl": "https://api.github.com/repos/raspberrypi/picotool/releases/187217595/assets"
789978
}
790979
}

data/0.17.0/versionBundles.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,12 @@
1919
"picotool": "2.0.0",
2020
"toolchain": "13_2_Rel1",
2121
"riscvToolchain": "RISCV_RPI_2_0_0_5"
22+
},
23+
"2.1.0": {
24+
"ninja": "v1.12.1",
25+
"cmake": "v3.29.9",
26+
"picotool": "2.1.0",
27+
"toolchain": "13_3_Rel1",
28+
"riscvToolchain": "RISCV_RPI_2_0_0_5"
2229
}
2330
}

scripts/genCache.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747

4848
# Only provide data for these versions
4949
versions = [
50-
["1.5.1", "2.0.0"],
51-
["v3.28.6", "v3.29.6"],
50+
["1.5.1", "2.0.0", "2.1.0"],
51+
["v3.28.6", "v3.29.6", "v3.29.9"],
5252
["v1.12.1"],
53-
["v1.5.1-0", "v2.0.0-0", "v2.0.0-1", "v2.0.0-2", "v2.0.0-3", "v2.0.0-4", "v2.0.0-5"],
54-
["2.0.0"]
53+
["v1.5.1-0", "v2.0.0-0", "v2.0.0-1", "v2.0.0-2", "v2.0.0-3", "v2.0.0-4", "v2.0.0-5", "v2.1.0-0"],
54+
["2.0.0", "2.1.0"]
5555
]
5656

5757
headers = {

src/commands/switchBoard.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export default class SwitchBoardCommand extends Command {
3737
quickPickItems.push("pico2");
3838
}
3939

40+
if (!compareLtMajor(sdkVersion, "2.1.0")) {
41+
quickPickItems.push("pico2_w");
42+
}
43+
4044
const sdkPath = buildSDKPath(sdkVersion);
4145

4246
readdirSync(join(sdkPath, "src", "boards", "include", "boards")).forEach(

src/commands/switchSDK.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ export default class SwitchSDKCommand extends Command {
668668
workspaceFolder.uri,
669669
selectedSDK.sdk,
670670
selectedToolchain.toolchain.version,
671-
selectedPicotool ?? "2.0.0"
671+
selectedPicotool ?? "2.1.0"
672672
);
673673

674674
progress.report({

src/utils/cmakeUtil.mts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,13 @@ export async function cmakeUpdateSDK(
365365

366366
const picoBoard = content.match(picoBoardRegex);
367367
// update the PICO_BOARD variable if it's a pico2 board and the new sdk
368-
// version is less than 2.0.0
368+
// version is less than 2.0.0, or pico2_w and new version <2.1.0
369369
if (
370370
picoBoard !== null &&
371-
picoBoard[1].includes("pico2") &&
372-
compareLtMajor(newSDKVersion, "2.0.0")
371+
((picoBoard[1].includes("pico2") &&
372+
compareLtMajor(newSDKVersion, "2.0.0")) ||
373+
(picoBoard[1].includes('pico2_w') &&
374+
compareLtMajor(newSDKVersion, "2.1.0")))
373375
) {
374376
const result = await window.showQuickPick(["pico", "pico_w"], {
375377
placeHolder: "The new SDK version does not support your current board",

src/utils/download.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@ const TOOLS_RELEASES: { [key: string]: string } = {
6767
"1.5.1": "v1.5.1-0",
6868
// eslint-disable-next-line @typescript-eslint/naming-convention
6969
"2.0.0": "v2.0.0-5",
70+
// eslint-disable-next-line @typescript-eslint/naming-convention
71+
"2.1.0": "v2.1.0-0",
7072
};
7173

7274
/// Release tags for picotool
7375
const PICOTOOL_RELEASES: { [key: string]: string } = {
7476
// eslint-disable-next-line @typescript-eslint/naming-convention
7577
"2.0.0": "v2.0.0-5",
78+
// eslint-disable-next-line @typescript-eslint/naming-convention
79+
"2.1.0": "v2.1.0-0",
7680
};
7781

7882
/// Release tags for openocd

src/utils/examplesUtil.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const EXAMPLES_REPOSITORY_URL =
2121
const EXAMPLES_JSON_URL =
2222
"https://raspberrypi.github.io/pico-vscode/" +
2323
`${CURRENT_DATA_VERSION}/examples.json`;
24-
const EXAMPLES_GITREF = "7fe60d6b4027771e45d97f207532c41b1d8c5418";
25-
const EXAMPLES_TAG = "sdk-2.0.0";
24+
const EXAMPLES_GITREF = "b6ac07f1946271de2817f94d8ffc0425ecb7c2a9";
25+
const EXAMPLES_TAG = "sdk-2.1.0";
2626

2727
export interface Example {
2828
path: string;

src/webview/newProjectPanel.mts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ enum BoardType {
127127
pico = "pico",
128128
picoW = "pico_w",
129129
pico2 = "pico2",
130+
pico2W = "pico2_w",
130131
other = "other",
131132
}
132133

@@ -177,6 +178,8 @@ async function enumToBoard(e: BoardType, sdkPath: string): Promise<string> {
177178
return "-board pico_w";
178179
case BoardType.pico2:
179180
return "-board pico2";
181+
case BoardType.pico2W:
182+
return "-board pico2_w";
180183
case BoardType.other:
181184
readdirSync(`${sdkPath}/src/boards/include/boards`).forEach(file => {
182185
quickPickItems.push(file.split(".")[0]);
@@ -1229,7 +1232,7 @@ export class NewProjectPanel {
12291232
theData.hwtimerFeature ? Library.timer : null,
12301233
theData.hwwatchdogFeature ? Library.watch : null,
12311234
theData.hwclocksFeature ? Library.clocks : null,
1232-
theData.boardType === "pico_w"
1235+
["pico_w", "pico2_w"].includes(theData.boardType)
12331236
? Object.values(PicoWirelessOption)[theData.picoWireless]
12341237
: null,
12351238
].filter(option => option !== null) as Library[],
@@ -1749,6 +1752,9 @@ export class NewProjectPanel {
17491752
<option id="option-board-type-${
17501753
BoardType.picoW
17511754
}" value="${BoardType.picoW}">Pico W</option>
1755+
<option id="option-board-type-${
1756+
BoardType.pico2W
1757+
}" value="${BoardType.pico2W}">Pico 2 W</option>
17521758
<option id="option-board-type-${
17531759
BoardType.other
17541760
}" value="${BoardType.other}">Other</option>

0 commit comments

Comments
 (0)