From 0b84add21fa5cd9fc80ccc3add5213fc2980cbf3 Mon Sep 17 00:00:00 2001 From: wxyyy0117 Date: Fri, 19 Sep 2025 17:21:07 +0200 Subject: [PATCH 1/9] tools: Integrate cortex debugger. Signed-off-by: wxyyy0117 --- tools/gen_launch.sh | 79 ++++++++++++++++++++++++ tools/vscode_profile/tasks.json | 106 ++++++++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 tools/gen_launch.sh create mode 100644 tools/vscode_profile/tasks.json diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh new file mode 100644 index 00000000..ffac3035 --- /dev/null +++ b/tools/gen_launch.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# gen_launch.sh: Compile and generate launch.json for XMC boards +# Usage: ./gen_launch.sh +# Example: ./gen_launch.sh kit_xmc47_relax ~/output ~/build/build.ino + +set -e + + + +FQBN_FULL="$1" +BUILD_PATH="$2" +SKETCH_PATH="$3" +BOARDS_TXT="$HOME/Arduino/hardware/arduino-git/xmc/boards.txt" + +# Extract board name from FQBN (e.g. arduino-git:xmc:kit_xmc47_relax -> kit_xmc47_relax) +BOARD_NAME=$(echo "$FQBN_FULL" | awk -F: '{print $NF}') + +# Find arm-none-eabi-gdb +GDB_PATH=$(command -v arm-none-eabi-gdb) +if [ -z "$GDB_PATH" ]; then + # Try to find it under home directory only + GDB_PATH=$(find "$HOME" -type f -name arm-none-eabi-gdb 2>/dev/null | head -n 1) +fi +if [ -z "$GDB_PATH" ]; then + echo "arm-none-eabi-gdb not found in PATH or under your home directory." + exit 3 +fi + +if [[ -z "$FQBN_FULL" || -z "$BUILD_PATH" || -z "$SKETCH_PATH" ]]; then + echo "Usage: $0 " + exit 1 +fi + +# 1. Compile +arduino-cli compile -b "${FQBN_FULL}" --build-path "${BUILD_PATH}" "${SKETCH_PATH}" || exit 1 + +# 2. Parse boards.txt for variant and board.v using board name +VARIANT=$(grep "^${BOARD_NAME}\.build\.variant=" "$BOARDS_TXT" | cut -d= -f2) +BOARD_V=$(grep "^${BOARD_NAME}\.build\.board\.v=" "$BOARDS_TXT" | cut -d= -f2) + +if [[ -z "$VARIANT" || -z "$BOARD_V" ]]; then + echo "Could not find variant or board.v for $BOARD_NAME in $BOARDS_TXT" + exit 2 +fi + +DEVICE="${VARIANT}-${BOARD_V}" +EXECUTABLE="${BUILD_PATH}/build.ino.elf" + +# 3. Generate launch.json in xmc/.vscode +LAUNCH_DIR="../../.vscode" +if [ ! -d "$LAUNCH_DIR" ]; then + mkdir "$LAUNCH_DIR" +fi +if [ -f "$LAUNCH_DIR/launch.json" ]; then + rm "$LAUNCH_DIR/launch.json" +fi +cat > "$LAUNCH_DIR/launch.json" < Date: Fri, 19 Sep 2025 17:29:32 +0200 Subject: [PATCH 2/9] tools: Change sh address. Signed-off-by: wxyyy0117 --- tools/gen_launch.sh | 0 tools/vscode_profile/tasks.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 tools/gen_launch.sh diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh old mode 100644 new mode 100755 diff --git a/tools/vscode_profile/tasks.json b/tools/vscode_profile/tasks.json index f02a80bb..b65d8dd6 100644 --- a/tools/vscode_profile/tasks.json +++ b/tools/vscode_profile/tasks.json @@ -37,7 +37,7 @@ { "label": "Arduino Debug", "type": "shell", - "command": "${workspaceFolder}/extras/arduino-core-tests/gen_launch.sh", + "command": "${workspaceFolder}/tools/gen_launch.sh", "args": [ "${input:boardFqbn}", "${input:debugBuildPath}", From 8486d4f28866b4227526ebc900ad01d3f156a796 Mon Sep 17 00:00:00 2001 From: wxyyy0117 Date: Mon, 22 Sep 2025 13:09:52 +0200 Subject: [PATCH 3/9] tools: Add optional parameters. Signed-off-by: wxyyy0117 --- tools/gen_launch.sh | 20 ++- tools/vscode_profile/tasks.json | 218 +++++++++++++++++--------------- 2 files changed, 121 insertions(+), 117 deletions(-) diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh index ffac3035..96d05e82 100755 --- a/tools/gen_launch.sh +++ b/tools/gen_launch.sh @@ -10,21 +10,15 @@ set -e FQBN_FULL="$1" BUILD_PATH="$2" SKETCH_PATH="$3" -BOARDS_TXT="$HOME/Arduino/hardware/arduino-git/xmc/boards.txt" +# Allow BOARDS_TXT as optional 4th parameter, default to original absolute path +BOARDS_TXT="${4:-$HOME/Arduino/hardware/arduino-git/xmc/boards.txt}" # Extract board name from FQBN (e.g. arduino-git:xmc:kit_xmc47_relax -> kit_xmc47_relax) BOARD_NAME=$(echo "$FQBN_FULL" | awk -F: '{print $NF}') -# Find arm-none-eabi-gdb -GDB_PATH=$(command -v arm-none-eabi-gdb) -if [ -z "$GDB_PATH" ]; then - # Try to find it under home directory only - GDB_PATH=$(find "$HOME" -type f -name arm-none-eabi-gdb 2>/dev/null | head -n 1) -fi -if [ -z "$GDB_PATH" ]; then - echo "arm-none-eabi-gdb not found in PATH or under your home directory." - exit 3 -fi + +# Allow GDB_PATH as optional 5th parameter, default to Infineon toolchain path +GDB_PATH="${5:-$HOME/.arduino15/packages/Infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}" if [[ -z "$FQBN_FULL" || -z "$BUILD_PATH" || -z "$SKETCH_PATH" ]]; then echo "Usage: $0 " @@ -34,12 +28,13 @@ fi # 1. Compile arduino-cli compile -b "${FQBN_FULL}" --build-path "${BUILD_PATH}" "${SKETCH_PATH}" || exit 1 -# 2. Parse boards.txt for variant and board.v using board name + # 2. Parse boards.txt for variant and board.v using board name VARIANT=$(grep "^${BOARD_NAME}\.build\.variant=" "$BOARDS_TXT" | cut -d= -f2) BOARD_V=$(grep "^${BOARD_NAME}\.build\.board\.v=" "$BOARDS_TXT" | cut -d= -f2) if [[ -z "$VARIANT" || -z "$BOARD_V" ]]; then echo "Could not find variant or board.v for $BOARD_NAME in $BOARDS_TXT" + exit 2 fi @@ -75,5 +70,6 @@ cat > "$LAUNCH_DIR/launch.json" < Date: Mon, 22 Sep 2025 15:51:47 +0200 Subject: [PATCH 4/9] tools: Configure build elf and json path. Signed-off-by: wxyyy0117 --- tools/gen_launch.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh index 96d05e82..f5f2779a 100755 --- a/tools/gen_launch.sh +++ b/tools/gen_launch.sh @@ -39,12 +39,17 @@ if [[ -z "$VARIANT" || -z "$BOARD_V" ]]; then fi DEVICE="${VARIANT}-${BOARD_V}" -EXECUTABLE="${BUILD_PATH}/build.ino.elf" +EXECUTABLE=$(find "${BUILD_PATH}" -maxdepth 1 -type f -name "*.elf" | head -n 1) +if [[ -z "$EXECUTABLE" ]]; then + echo "No .elf executable found in $BUILD_PATH." + exit 3 +fi -# 3. Generate launch.json in xmc/.vscode -LAUNCH_DIR="../../.vscode" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +XMC_DIR="$(dirname "$SCRIPT_DIR")" +LAUNCH_DIR="$XMC_DIR/.vscode" if [ ! -d "$LAUNCH_DIR" ]; then - mkdir "$LAUNCH_DIR" + mkdir -p "$LAUNCH_DIR" fi if [ -f "$LAUNCH_DIR/launch.json" ]; then rm "$LAUNCH_DIR/launch.json" @@ -63,7 +68,7 @@ cat > "$LAUNCH_DIR/launch.json" < Date: Tue, 23 Sep 2025 15:38:59 +0200 Subject: [PATCH 5/9] docs: Update documentation. Signed-off-by: wxyyy0117 --- docs/development-instructions.rst | 20 ++++++++++++++++++++ tools/gen_launch.sh | 11 ++++++++--- tools/vscode_profile/tasks.json | 2 +- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/docs/development-instructions.rst b/docs/development-instructions.rst index de3ee20a..a232dbb8 100644 --- a/docs/development-instructions.rst +++ b/docs/development-instructions.rst @@ -124,6 +124,26 @@ Tests are located in ``tests/arduino-core-tests`` and included as submodule in t If you need to run these tests locally, you'll also need to download `GNU Make `_ . +Debugging (VS Code) +^^^^^^^^^^^^^^^^^^^^ +Debugging support described here is for Visual Studio Code. The Arduino IDE already provides a built-in debugger for supported boards. + +#. Install the `Cortex-Debug` extension in VS Code. +#. Copy the `tasks.json` file from `tools/vscode-profile` to the `.vscode` directory in your project root. +#. In VS Code, run the task: **Generate launch.json for debug (XMC)**. +#. Required parameters for this task: + * **fqbn**: Fully Qualified Board Name (e.g., `arduino-git:xmc:kit_xmc47_relax`) + * **build path**: Directory where the `.elf` file will be placed + * **example path**: Path to the sketch (`.ino` file) to debug +#. Optional parameters: + * **boards.txt path**: Path to a custom `boards.txt` file + * **gdb path**: Path to a custom GDB executable + +Refer to the documentation of your chosen debugger and scripts in the `tools/` folder for more details. + +.. note:: + If you encounter an error indicating that ``libncurses.so.5`` or a similar library cannot be found, please search online and install the appropriate package for your environment. + Release --------- Add a git tag in the format `Vx.y.z` (e.g. V3.3.0) to trigger the release process. diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh index f5f2779a..998b7155 100755 --- a/tools/gen_launch.sh +++ b/tools/gen_launch.sh @@ -1,7 +1,12 @@ #!/bin/bash # gen_launch.sh: Compile and generate launch.json for XMC boards -# Usage: ./gen_launch.sh -# Example: ./gen_launch.sh kit_xmc47_relax ~/output ~/build/build.ino +# Usage: ./gen_launch.sh [boards.txt] [gdb_path] +# : Fully Qualified Board Name (e.g. arduino-git:xmc:kit_xmc47_relax) +# : Directory where the .elf file will be placed +# : Path to the sketch (.ino) file +# [boards.txt] : (Optional) Path to boards.txt (default: $HOME/Arduino/hardware/arduino-git/xmc/boards.txt) +# [gdb_path] : (Optional) Path to GDB executable (default: $HOME/.arduino15/packages/Infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb) +# Example: ./gen_launch.sh arduino-git:xmc:kit_xmc47_relax ~/output ~/build/Blink.ino ~/Arduino/hardware/arduino-git/xmc/boards.txt /usr/bin/arm-none-eabi-gdb set -e @@ -21,7 +26,7 @@ BOARD_NAME=$(echo "$FQBN_FULL" | awk -F: '{print $NF}') GDB_PATH="${5:-$HOME/.arduino15/packages/Infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}" if [[ -z "$FQBN_FULL" || -z "$BUILD_PATH" || -z "$SKETCH_PATH" ]]; then - echo "Usage: $0 " + echo "Usage: $0 [boards.txt] [gdb_path]" exit 1 fi diff --git a/tools/vscode_profile/tasks.json b/tools/vscode_profile/tasks.json index 73dd7d02..2356665b 100644 --- a/tools/vscode_profile/tasks.json +++ b/tools/vscode_profile/tasks.json @@ -83,7 +83,7 @@ { "id": "debugBuildPath", "type": "promptString", - "description": "Enter the build path for gen_launch.sh", + "description": "Enter the build path where the .elf file would be placed", "default": "${workspaceFolder}/extras/arduino-core-tests/build/output" }, { From 04330f57320b0b7bbf4765aac03abd3dcb607f6d Mon Sep 17 00:00:00 2001 From: wxyyy0117 Date: Fri, 26 Sep 2025 13:33:45 +0200 Subject: [PATCH 6/9] tools: Change to Lowercase. Signed-off-by: wxyyy0117 --- tools/gen_launch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh index 998b7155..7efabf5c 100755 --- a/tools/gen_launch.sh +++ b/tools/gen_launch.sh @@ -23,7 +23,7 @@ BOARD_NAME=$(echo "$FQBN_FULL" | awk -F: '{print $NF}') # Allow GDB_PATH as optional 5th parameter, default to Infineon toolchain path -GDB_PATH="${5:-$HOME/.arduino15/packages/Infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}" +GDB_PATH="${5:-$HOME/.arduino15/packages/infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}" if [[ -z "$FQBN_FULL" || -z "$BUILD_PATH" || -z "$SKETCH_PATH" ]]; then echo "Usage: $0 [boards.txt] [gdb_path]" From b2d60c4a4e57ab1ce53b4b6b3810a3d35fcc653d Mon Sep 17 00:00:00 2001 From: wxyyy0117 Date: Thu, 30 Oct 2025 13:28:21 +0100 Subject: [PATCH 7/9] tools: Make gen_launch.sh generic. Signed-off-by: wxyyy0117 --- docs/development-instructions.rst | 4 +- tools/gen_launch.sh | 123 ++++++++++++++++++++++------- tools/vscode_profile/task_xmc.json | 114 ++++++++++++++++++++++++++ 3 files changed, 210 insertions(+), 31 deletions(-) create mode 100644 tools/vscode_profile/task_xmc.json diff --git a/docs/development-instructions.rst b/docs/development-instructions.rst index a232dbb8..3f4d7ce8 100644 --- a/docs/development-instructions.rst +++ b/docs/development-instructions.rst @@ -129,12 +129,12 @@ Debugging (VS Code) Debugging support described here is for Visual Studio Code. The Arduino IDE already provides a built-in debugger for supported boards. #. Install the `Cortex-Debug` extension in VS Code. -#. Copy the `tasks.json` file from `tools/vscode-profile` to the `.vscode` directory in your project root. +#. Copy the `task_xmc.json` file from `tools/vscode-profile` to the `.vscode` directory and rename to `tasks.json` in your project root. #. In VS Code, run the task: **Generate launch.json for debug (XMC)**. #. Required parameters for this task: * **fqbn**: Fully Qualified Board Name (e.g., `arduino-git:xmc:kit_xmc47_relax`) * **build path**: Directory where the `.elf` file will be placed - * **example path**: Path to the sketch (`.ino` file) to debug + * **example path**: Path to the sketch (`.ino` file) to debug (for arduino-core-tests make sure it has been built at least once to generate the required build.ino) #. Optional parameters: * **boards.txt path**: Path to a custom `boards.txt` file * **gdb path**: Path to a custom GDB executable diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh index 7efabf5c..9ab54060 100755 --- a/tools/gen_launch.sh +++ b/tools/gen_launch.sh @@ -1,65 +1,129 @@ #!/bin/bash -# gen_launch.sh: Compile and generate launch.json for XMC boards +# gen_launch.sh: Compile and generate launch.json for XMC or PSoC6 boards # Usage: ./gen_launch.sh [boards.txt] [gdb_path] -# : Fully Qualified Board Name (e.g. arduino-git:xmc:kit_xmc47_relax) +# : Fully Qualified Board Name (e.g. infineon:psoc6:CY8CKIT_062S2_AI or arduino-git:xmc:kit_xmc47_relax) # : Directory where the .elf file will be placed # : Path to the sketch (.ino) file -# [boards.txt] : (Optional) Path to boards.txt (default: $HOME/Arduino/hardware/arduino-git/xmc/boards.txt) -# [gdb_path] : (Optional) Path to GDB executable (default: $HOME/.arduino15/packages/Infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb) -# Example: ./gen_launch.sh arduino-git:xmc:kit_xmc47_relax ~/output ~/build/Blink.ino ~/Arduino/hardware/arduino-git/xmc/boards.txt /usr/bin/arm-none-eabi-gdb +# [boards.txt] : (Optional) Path to boards.txt (default: inferred based on device) +# [gdb_path] : (Optional) Path to GDB executable (default: inferred based on device) set -e - - FQBN_FULL="$1" BUILD_PATH="$2" SKETCH_PATH="$3" -# Allow BOARDS_TXT as optional 4th parameter, default to original absolute path -BOARDS_TXT="${4:-$HOME/Arduino/hardware/arduino-git/xmc/boards.txt}" - -# Extract board name from FQBN (e.g. arduino-git:xmc:kit_xmc47_relax -> kit_xmc47_relax) -BOARD_NAME=$(echo "$FQBN_FULL" | awk -F: '{print $NF}') - - -# Allow GDB_PATH as optional 5th parameter, default to Infineon toolchain path -GDB_PATH="${5:-$HOME/.arduino15/packages/infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}" if [[ -z "$FQBN_FULL" || -z "$BUILD_PATH" || -z "$SKETCH_PATH" ]]; then echo "Usage: $0 [boards.txt] [gdb_path]" exit 1 fi -# 1. Compile -arduino-cli compile -b "${FQBN_FULL}" --build-path "${BUILD_PATH}" "${SKETCH_PATH}" || exit 1 +# Get the script directory and package root +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PACKAGE_DIR="$(dirname "$SCRIPT_DIR")" + +# Detect device type based on FQBN +if [[ "$FQBN_FULL" == infineon:psoc6:* ]]; then + DEVICE_TYPE="psoc6" + BOARDS_TXT="${4:-$PACKAGE_DIR/boards.txt}" + GDB_PATH="${5:-$HOME/.arduino15/packages/Infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}" +elif [[ "$FQBN_FULL" == arduino-git:xmc:* ]]; then + DEVICE_TYPE="xmc" + XMC_DIR="$(dirname "$SCRIPT_DIR")" + BOARDS_TXT="${4:-$XMC_DIR/boards.txt}" + GDB_PATH="${5:-$HOME/.arduino15/packages/infineon/tools/arm-none-eabi-gcc/10.3-2021.10/bin/arm-none-eabi-gdb}" +else + echo "Unsupported device type in FQBN: $FQBN_FULL" + exit 1 +fi - # 2. Parse boards.txt for variant and board.v using board name -VARIANT=$(grep "^${BOARD_NAME}\.build\.variant=" "$BOARDS_TXT" | cut -d= -f2) -BOARD_V=$(grep "^${BOARD_NAME}\.build\.board\.v=" "$BOARDS_TXT" | cut -d= -f2) +# Extract board name from FQBN +BOARD_NAME=$(echo "$FQBN_FULL" | awk -F: '{print $NF}') -if [[ -z "$VARIANT" || -z "$BOARD_V" ]]; then - echo "Could not find variant or board.v for $BOARD_NAME in $BOARDS_TXT" +# Compile the sketch +arduino-cli compile -b "${FQBN_FULL}" --build-path "${BUILD_PATH}" "${SKETCH_PATH}" || exit 1 +# Parse boards.txt for variant and other parameters +VARIANT=$(grep "^${BOARD_NAME}\.build\.variant=" "$BOARDS_TXT" | cut -d= -f2) +if [[ -z "$VARIANT" ]]; then + echo "Could not find variant for $BOARD_NAME in $BOARDS_TXT" exit 2 fi -DEVICE="${VARIANT}-${BOARD_V}" +if [[ "$DEVICE_TYPE" == "xmc" ]]; then + BOARD_V=$(grep "^${BOARD_NAME}\.build\.board\.v=" "$BOARDS_TXT" | cut -d= -f2) + if [[ -z "$BOARD_V" ]]; then + echo "Could not find board.v for $BOARD_NAME in $BOARDS_TXT" + exit 2 + fi + DEVICE="${VARIANT}-${BOARD_V}" +else + DEVICE="${VARIANT}" +fi + +# Find the .elf executable EXECUTABLE=$(find "${BUILD_PATH}" -maxdepth 1 -type f -name "*.elf" | head -n 1) if [[ -z "$EXECUTABLE" ]]; then echo "No .elf executable found in $BUILD_PATH." exit 3 fi -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -XMC_DIR="$(dirname "$SCRIPT_DIR")" -LAUNCH_DIR="$XMC_DIR/.vscode" +# Create the .vscode directory and generate launch.json +LAUNCH_DIR="$PACKAGE_DIR/.vscode" if [ ! -d "$LAUNCH_DIR" ]; then mkdir -p "$LAUNCH_DIR" fi if [ -f "$LAUNCH_DIR/launch.json" ]; then rm "$LAUNCH_DIR/launch.json" fi -cat > "$LAUNCH_DIR/launch.json" < "$LAUNCH_DIR/launch.json" < "$LAUNCH_DIR/launch.json" < "$LAUNCH_DIR/launch.json" < Date: Thu, 30 Oct 2025 13:31:28 +0100 Subject: [PATCH 8/9] tools: Make gen_launch.sh generic. Signed-off-by: wxyyy0117 --- tools/vscode_profile/tasks.json | 114 -------------------------------- 1 file changed, 114 deletions(-) delete mode 100644 tools/vscode_profile/tasks.json diff --git a/tools/vscode_profile/tasks.json b/tools/vscode_profile/tasks.json deleted file mode 100644 index 2356665b..00000000 --- a/tools/vscode_profile/tasks.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "Arduino Build", - "type": "shell", - "command": "arduino-cli", - "args": [ - "compile", - "--fqbn", "${input:boardFqbn}", - "${input:examplePath}" - ], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": [] - }, - { - "label": "Arduino Upload", - "type": "shell", - "command": "arduino-cli", - "args": [ - "upload", - // "--verbose", - "-p", "${input:port}", - "--fqbn", "${input:boardFqbn}", - "${input:examplePath}" - ], - "dependsOn": "Arduino Build", - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": [] - }, - { - "label": "Generate lauch.json for debug (XMC)", - "type": "shell", - "command": "${workspaceFolder}/tools/gen_launch.sh", - "args": [ - "${input:boardFqbn}", - "${input:debugBuildPath}", - "${input:examplePath}", - "${input:boardsTxtPath}", - "${input:gdbPath}" - ], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": [], - "presentation": { - "echo": true, - "reveal": "always", - "focus": false, - "panel": "shared" - } - }, - { - "label": "Arduino Monitor", - "type": "shell", - "command": "arduino-cli", - "args": [ - "monitor", - "-p", "${input:port}", - "-c", "baudrate=115200" - ], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": [] - } - ], - "inputs": [ - { - "id": "boardFqbn", - "type": "promptString", - "description": "Enter the FQBN (Fully Qualified Board Name) for the Arduino board", - "default": "arduino-git:xmc:kit_xmc47_relax" - }, - { - "id": "debugBuildPath", - "type": "promptString", - "description": "Enter the build path where the .elf file would be placed", - "default": "${workspaceFolder}/extras/arduino-core-tests/build/output" - }, - { - "id": "examplePath", - "type": "promptString", - "description": "Enter the path to the Arduino example sketch", - "default": "${workspaceFolder}/examples/bug/bug.ino" - }, - { - "id": "port", - "type": "promptString", - "description": "Enter the port for the Arduino board", - "default": "/dev/ttyACM0" - }, - { - "id": "boardsTxtPath", - "type": "promptString", - "description": "(Optional) Enter the path to boards.txt, or leave blank for default", - "default": "" - }, - { - "id": "gdbPath", - "type": "promptString", - "description": "(Optional) Enter the path to arm-none-eabi-gdb, or leave blank for default", - "default": "" - }, - ] - } \ No newline at end of file From df4b74f158d6905b1b17c3c79d019fc66a0e42bc Mon Sep 17 00:00:00 2001 From: wxyyy0117 Date: Thu, 30 Oct 2025 14:18:19 +0100 Subject: [PATCH 9/9] tools: Modify gen_launch.sh. Signed-off-by: wxyyy0117 --- tools/gen_launch.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/gen_launch.sh b/tools/gen_launch.sh index 9ab54060..16cb0989 100755 --- a/tools/gen_launch.sh +++ b/tools/gen_launch.sh @@ -109,8 +109,7 @@ if [[ "$DEVICE_TYPE" == "psoc6" ]]; then "numberOfProcessors": 2, "targetProcessor": 1,// Set to 0 for the CM0+, set to 1 for the CM4 "postStartSessionCommands": [ - "monitor gdb_sync", - "stepi" + "continue" ], "overrideRestartCommands": [ "starti"