From a671a4a83e7d3531c219c36da85cbab3d7c9d966 Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Fri, 6 Sep 2024 19:44:41 +0100 Subject: [PATCH 1/3] Fix #62, OpenOCD missing adapter Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- scripts/pico_project.py | 10 ++++++---- scripts/raspberrypi-swd.cfg | 26 +++----------------------- src/webview/newProjectPanel.mts | 2 +- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/scripts/pico_project.py b/scripts/pico_project.py index cb120a6a..eb2ddbf4 100644 --- a/scripts/pico_project.py +++ b/scripts/pico_project.py @@ -762,8 +762,10 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger, file.close() debugger = debugger_config_list[debugger] + debugger_supports_configurable_speed = True if debugger == "raspberrypi-swd.cfg": + debugger_supports_configurable_speed = False shutil.copyfile(sourcefolder + "/" + "raspberrypi-swd.cfg", projectPath / "raspberrypi-swd.cfg") # Need to escape windows files paths backslashes @@ -807,10 +809,10 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger, "overrideLaunchCommands": [ "monitor reset init", "load \\"${{command:raspberry-pi-pico.launchTargetPath}}\\"" - ], + ]{''', "openOCDLaunchCommands": [ "adapter speed 5000" - ] + ]''' if debugger_supports_configurable_speed else ""} }}, {{ "name": "Pico Debug (Cortex-Debug with external OpenOCD)", @@ -840,7 +842,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger, "miDebuggerPath": "${{command:raspberry-pi-pico.getGDBPath}}", "miDebuggerServerAddress": "localhost:3333", "debugServerPath": "{openocd_path if openocd_path else "openocd"}", - "debugServerArgs": "-f {debugger} -f target/${{command:raspberry-pi-pico.getTarget}}.cfg -c \\"adapter speed 5000\\"", + "debugServerArgs": "-f {debugger} -f target/${{command:raspberry-pi-pico.getTarget}}.cfg{' -c \\"adapter speed 5000\\"' if debugger_supports_configurable_speed else ""}", "serverStarted": "Listening on port .* for gdb connections", "filterStderr": true, "hardwareBreakpoints": {{ @@ -1020,7 +1022,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger, "-f", "target/${{command:raspberry-pi-pico.getTarget}}.cfg", "-c", - "adapter speed 5000; program \\"${{command:raspberry-pi-pico.launchTargetPath}}\\" verify reset exit" + "{"adapter speed 5000; " if debugger_supports_configurable_speed else ""}program \\"${{command:raspberry-pi-pico.launchTargetPath}}\\" verify reset exit" ], "problemMatcher": [], "windows": {{ diff --git a/scripts/raspberrypi-swd.cfg b/scripts/raspberrypi-swd.cfg index 88d49d12..e8705e1e 100644 --- a/scripts/raspberrypi-swd.cfg +++ b/scripts/raspberrypi-swd.cfg @@ -1,24 +1,4 @@ -proc read_file { name } { - if {[catch {open $name r} fd]} { - return "" - } - set result [read $fd] - close $fd - return $result -} +adapter driver linuxgpiod -set compat [read_file /proc/device-tree/compatible] - -if {[string match *bcm2712* $compat]} { - adapter driver linuxgpiod - - adapter gpio swdio -chip 4 24 - adapter gpio swclk -chip 4 25 -} else { - source [find interface/raspberrypi-native.cfg] - - adapter gpio swdio -chip 0 24 - adapter gpio swclk -chip 0 25 - - adapter speed 5000 -} +adapter gpio swdio -chip 0 24 +adapter gpio swclk -chip 0 25 diff --git a/src/webview/newProjectPanel.mts b/src/webview/newProjectPanel.mts index 350ea2ca..003542d0 100644 --- a/src/webview/newProjectPanel.mts +++ b/src/webview/newProjectPanel.mts @@ -1964,7 +1964,7 @@ export class NewProjectPanel {
- +
From e9a898529e7b28ac7a6adcfd6f2b59e6f788ec95 Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:54:30 +0100 Subject: [PATCH 2/3] Update to pico-sdk-tools v2.0.0-3 - Update RISC-V toolchain build revision Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- data/0.16.0/supportedToolchains.ini | 12 ++++++------ data/0.16.0/versionBundles.json | 2 +- src/utils/download.mts | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/0.16.0/supportedToolchains.ini b/data/0.16.0/supportedToolchains.ini index 2d0d153f..86c7a42f 100644 --- a/data/0.16.0/supportedToolchains.ini +++ b/data/0.16.0/supportedToolchains.ini @@ -10,12 +10,12 @@ darwin_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/g darwin_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz linux_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz linux_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz -[RISCV_RPI_2_0_0_1] -win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-win.zip -darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-arm64-mac.zip -darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-mac.zip -linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x86_64-lin.tar.gz -linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-aarch64-lin.tar.gz +[RISCV_RPI_2_0_0_3] +win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-x64-win.zip +darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-arm64-mac.zip +darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-x64-mac.zip +linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-x86_64-lin.tar.gz +linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-aarch64-lin.tar.gz [RISCV_13_3] win32_x64 = https://buildbot.embecosm.com/job/riscv32-gcc-win64-release/24/artifact/riscv32-embecosm-win64-gcc13.2.0.zip darwin_arm64 = https://buildbot.embecosm.com/job/riscv32-gcc-macos-arm64-release/10/artifact/riscv32-embecosm-macos-gcc13.3.0.zip diff --git a/data/0.16.0/versionBundles.json b/data/0.16.0/versionBundles.json index 4c84f474..4152b1dd 100644 --- a/data/0.16.0/versionBundles.json +++ b/data/0.16.0/versionBundles.json @@ -33,6 +33,6 @@ "cmake": "v3.28.6", "picotool": "2.0.0", "toolchain": "13_2_Rel1", - "riscvToolchain": "RISCV_RPI_2_0_0_1" + "riscvToolchain": "RISCV_RPI_2_0_0_3" } } diff --git a/src/utils/download.mts b/src/utils/download.mts index 4b1c73a5..82882810 100644 --- a/src/utils/download.mts +++ b/src/utils/download.mts @@ -61,19 +61,19 @@ const TOOLS_RELEASES: { [key: string]: string } = { // eslint-disable-next-line @typescript-eslint/naming-convention "1.5.1": "v1.5.1-0", // eslint-disable-next-line @typescript-eslint/naming-convention - "2.0.0": "v2.0.0-0", + "2.0.0": "v2.0.0-3", }; /// Release tags for picotool const PICOTOOL_RELEASES: { [key: string]: string } = { // eslint-disable-next-line @typescript-eslint/naming-convention - "2.0.0": "v2.0.0-0", + "2.0.0": "v2.0.0-3", }; /// Release tags for openocd const OPENOCD_RELEASES: { [key: string]: string } = { // eslint-disable-next-line @typescript-eslint/naming-convention - "0.12.0+dev": "v2.0.0-0", + "0.12.0+dev": "v2.0.0-3", }; /// Translate nodejs platform names to cmake platform names From 0370b64befcb1a84b29344890d0f7faac919c108 Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:31:24 +0100 Subject: [PATCH 3/3] Revert to v2.0.0-2 for RISC-V toolchain Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- data/0.16.0/supportedToolchains.ini | 18 ++++++++++++------ data/0.16.0/versionBundles.json | 2 +- scripts/genCache.py | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/data/0.16.0/supportedToolchains.ini b/data/0.16.0/supportedToolchains.ini index 86c7a42f..65bf2fe4 100644 --- a/data/0.16.0/supportedToolchains.ini +++ b/data/0.16.0/supportedToolchains.ini @@ -10,12 +10,18 @@ darwin_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/g darwin_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz linux_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz linux_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz -[RISCV_RPI_2_0_0_3] -win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-x64-win.zip -darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-arm64-mac.zip -darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-x64-mac.zip -linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-x86_64-lin.tar.gz -linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/riscv-toolchain-14-aarch64-lin.tar.gz +[RISCV_RPI_2_0_0_2] +win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-win.zip +darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-arm64-mac.zip +darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-mac.zip +linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x86_64-lin.tar.gz +linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-aarch64-lin.tar.gz +[RISCV_RPI_2_0_0_1] +win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-win.zip +darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-arm64-mac.zip +darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-mac.zip +linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x86_64-lin.tar.gz +linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-aarch64-lin.tar.gz [RISCV_13_3] win32_x64 = https://buildbot.embecosm.com/job/riscv32-gcc-win64-release/24/artifact/riscv32-embecosm-win64-gcc13.2.0.zip darwin_arm64 = https://buildbot.embecosm.com/job/riscv32-gcc-macos-arm64-release/10/artifact/riscv32-embecosm-macos-gcc13.3.0.zip diff --git a/data/0.16.0/versionBundles.json b/data/0.16.0/versionBundles.json index 4152b1dd..6b8287eb 100644 --- a/data/0.16.0/versionBundles.json +++ b/data/0.16.0/versionBundles.json @@ -33,6 +33,6 @@ "cmake": "v3.28.6", "picotool": "2.0.0", "toolchain": "13_2_Rel1", - "riscvToolchain": "RISCV_RPI_2_0_0_3" + "riscvToolchain": "RISCV_RPI_2_0_0_2" } } diff --git a/scripts/genCache.py b/scripts/genCache.py index a341e157..2baca02b 100644 --- a/scripts/genCache.py +++ b/scripts/genCache.py @@ -50,7 +50,7 @@ ["1.5.1", "2.0.0"], ["v3.28.6", "v3.29.6"], ["v1.12.1"], - ["v1.5.1-0", "v2.0.0-0"], + ["v1.5.1-0", "v2.0.0-0", "v2.0.0-1", "v2.0.0-2"], ["2.0.0"] ]