From be6ad1ce10e4c21f7b4641c33318ee0011232b61 Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Mon, 25 Nov 2024 12:18:35 +0000 Subject: [PATCH] Add supported examples for Pico 2 W --- data/0.17.0/examples.json | 380 +++++++++++++++++++++++++++----------- scripts/genExamples.py | 20 +- 2 files changed, 289 insertions(+), 111 deletions(-) diff --git a/data/0.17.0/examples.json b/data/0.17.0/examples.json index 090517b..f70bfb2 100644 --- a/data/0.17.0/examples.json +++ b/data/0.17.0/examples.json @@ -1,4 +1,30 @@ { + "hello_anything": { + "path": "binary_info/hello_anything", + "name": "hello_anything", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2", + "pico2_w" + ], + "supportRiscV": true + }, + "blink_any": { + "path": "binary_info/blink_any", + "name": "blink_any", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2", + "pico2_w" + ], + "supportRiscV": true + }, "hello_usb": { "path": "hello_world/usb", "name": "hello_usb", @@ -7,7 +33,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -19,7 +46,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -42,7 +70,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -54,7 +83,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -66,7 +96,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -78,7 +109,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -90,7 +122,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -102,7 +135,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -114,7 +148,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -126,7 +161,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -138,7 +174,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -150,7 +187,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -162,7 +200,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -174,7 +213,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -186,7 +226,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -198,7 +239,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -210,7 +252,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -222,7 +265,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -245,7 +289,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -257,7 +302,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -269,7 +315,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -281,7 +328,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -293,7 +341,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -305,7 +354,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -317,7 +367,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -329,7 +380,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -341,7 +393,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -353,7 +406,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -365,7 +419,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -377,7 +432,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -389,7 +445,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -401,7 +458,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -419,7 +477,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -431,7 +490,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -443,7 +503,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -455,7 +516,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -467,7 +529,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -479,7 +542,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -491,7 +555,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -536,7 +601,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -548,7 +614,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -560,7 +627,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -572,7 +640,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -584,7 +653,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -596,7 +666,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -608,7 +679,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -631,7 +703,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -654,7 +727,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -666,7 +740,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -678,7 +753,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -690,7 +766,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -702,7 +779,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -714,7 +792,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -770,7 +849,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -782,7 +862,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -794,7 +875,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -806,7 +888,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -818,7 +901,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -830,7 +914,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -842,7 +927,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -854,7 +940,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -866,7 +953,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -878,7 +966,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -890,7 +979,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -902,7 +992,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -914,7 +1005,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -926,7 +1018,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -938,7 +1031,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -950,7 +1044,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -962,7 +1057,21 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" + ], + "supportRiscV": true + }, + "slave_mem_i2c_burst": { + "path": "i2c/slave_mem_i2c", + "name": "slave_mem_i2c_burst", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -974,7 +1083,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -986,7 +1096,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -998,7 +1109,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1010,7 +1122,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1022,7 +1135,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1034,7 +1148,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1046,7 +1161,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1058,7 +1174,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1070,7 +1187,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1082,7 +1200,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1094,7 +1213,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1117,7 +1237,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1129,7 +1250,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1141,7 +1263,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1153,7 +1276,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1165,7 +1289,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1177,7 +1302,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1189,7 +1315,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1201,7 +1328,8 @@ "boards": [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1211,9 +1339,21 @@ "libPaths": [], "libNames": [], "boards": [ - "pico_w" + "pico_w", + "pico2_w" ], - "supportRiscV": false + "supportRiscV": true + }, + "picow_blink_fast_clock": { + "path": "pico_w/wifi/blink", + "name": "picow_blink_fast_clock", + "libPaths": [], + "libNames": [], + "boards": [ + "pico_w", + "pico2_w" + ], + "supportRiscV": true }, "picow_blink_slow_clock": { "path": "pico_w/wifi/blink", @@ -1221,9 +1361,10 @@ "libPaths": [], "libNames": [], "boards": [ - "pico_w" + "pico_w", + "pico2_w" ], - "supportRiscV": false + "supportRiscV": true }, "picow_ble_temp_reader": { "path": "pico_w/bt/standalone", @@ -1231,9 +1372,10 @@ "libPaths": [], "libNames": [], "boards": [ - "pico_w" + "pico_w", + "pico2_w" ], - "supportRiscV": false + "supportRiscV": true }, "picow_ble_temp_sensor": { "path": "pico_w/bt/standalone", @@ -1241,9 +1383,10 @@ "libPaths": [], "libNames": [], "boards": [ - "pico_w" + "pico_w", + "pico2_w" ], - "supportRiscV": false + "supportRiscV": true }, "hello_sha256": { "path": "sha/sha256", @@ -1251,7 +1394,8 @@ "libPaths": [], "libNames": [], "boards": [ - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1261,17 +1405,41 @@ "libPaths": [], "libNames": [], "boards": [ - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, + "enc_bootloader": { + "path": "bootloaders/encrypted", + "name": "enc_bootloader", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2", + "pico2_w" + ], + "supportRiscV": false + }, + "hello_serial_enc": { + "path": "bootloaders/encrypted", + "name": "hello_serial_enc", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2", + "pico2_w" + ], + "supportRiscV": false + }, "boot_info": { "path": "system/boot_info", "name": "boot_info", "libPaths": [], "libNames": [], "boards": [ - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1281,7 +1449,8 @@ "libPaths": [], "libNames": [], "boards": [ - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1291,7 +1460,8 @@ "libPaths": [], "libNames": [], "boards": [ - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true }, @@ -1301,7 +1471,8 @@ "libPaths": [], "libNames": [], "boards": [ - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": false }, @@ -1311,7 +1482,8 @@ "libPaths": [], "libNames": [], "boards": [ - "pico2" + "pico2", + "pico2_w" ], "supportRiscV": true } diff --git a/scripts/genExamples.py b/scripts/genExamples.py index 105d51c..cd06781 100644 --- a/scripts/genExamples.py +++ b/scripts/genExamples.py @@ -10,7 +10,8 @@ boards = [ "pico", "pico_w", - "pico2" + "pico2", + "pico2_w" ] platforms = { @@ -19,6 +20,10 @@ "pico2": [ "rp2350-arm-s", "rp2350-riscv" + ], + "pico2_w": [ + "rp2350-arm-s", + "rp2350-riscv" ] } @@ -46,8 +51,8 @@ shutil.rmtree(path) except FileNotFoundError: pass -os.system("git -c advice.detachedHead=false clone https://github.com/raspberrypi/pico-examples.git --depth=1 --branch sdk-2.0.0") -os.environ["PICO_SDK_PATH"] = "~/.pico-sdk/sdk/2.0.0" +os.system("git -c advice.detachedHead=false clone https://github.com/raspberrypi/pico-examples.git --depth=1 --branch sdk-2.1.0") +os.environ["PICO_SDK_PATH"] = "~/.pico-sdk/sdk/2.1.0" for board in boards: for platform in platforms[board]: @@ -55,9 +60,10 @@ shutil.rmtree("build") except FileNotFoundError: pass - toolchainVersion = "RISCV_COREV_MAY_24" if "riscv" in platform else "13_2_Rel1" + toolchainVersion = "RISCV_RPI_2_0_0_5" if "riscv" in platform else "13_3_Rel1" toolchainPath = f"~/.pico-sdk/toolchain/{toolchainVersion}" - os.system(f"cmake -S pico-examples -B build -DPICO_BOARD={board} -DPICO_PLATFORM={platform} -DPICO_TOOLCHAIN_PATH={toolchainPath}") + picotoolDir = "~/.pico-sdk/picotool/2.1.0/picotool" + os.system(f"cmake -S pico-examples -B build -DPICO_BOARD={board} -DPICO_PLATFORM={platform} -DPICO_TOOLCHAIN_PATH={toolchainPath} -Dpicotool_DIR={picotoolDir}") os.system("cmake --build build --target help > targets.txt") @@ -149,9 +155,9 @@ 'wantThreadsafeBackground' : False, 'wantPoll' : False, 'boardtype' : board, - 'sdkVersion' : "2.0.0", + 'sdkVersion' : "2.1.0", 'toolchainVersion': toolchainVersion, - 'picotoolVersion': "2.0.0", + 'picotoolVersion': "2.1.0", 'exampleLibs' : v["libs"] } GenerateCMake("tmp", params)