Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Change Log

## Unreleased
- Implemented [#69](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/issues/69): Bring Debug Console to front during connection.
- Removes [Arm Tools Environment Manager](https://marketplace.visualstudio.com/items?itemName=Arm.environment-manager) from extension pack. Instead, README lists it as one of the recommended extensions to use with the Arm CMSIS Debugger.
- Fixes use of `${workspace}` to `${workspaceFolder}` in default debug configurations.
- Reduces and aligns default `initCommands` lists for pseudo debugger types `cmsis-debug-pyocd` and `cmsis-debug-jlink`.
- Implements [#69](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/issues/69): Bring Debug Console to front during connection.

## 0.0.1
- Initial release of extension pack on GitHub.
Expand Down
18 changes: 9 additions & 9 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Prerequisites

- Install **Visual Studio Code**.
- Install **Node.js** on your machine and ensure it is on your path.
- Install **Visual Studio Code®**.
- Install **Node.js®** on your machine and ensure it is on your path.
- The currently recommended version is 20.x (LTS).
- Install **Yarn** which is used to build and execute scripts in this repository:

Expand All @@ -18,15 +18,15 @@ packages become platform-specific, i.e. for on `<target>`.

Supported `<target>`s are:

- win32-x64 (Windows, Intel, x86-64)
- win32-arm64 (Windows, Arm, aarch64)
- linux-x64 (Linux, Intel, x86-64)
- win32-x64 (Windows®, x86-64)
- win32-arm64 (Windows, Arm®, aarch64)
- linux-x64 (Linux, x86-64)
- linux-arm64 (Linux, Arm, aarch64)
- darwin-x64 (MacOS, Intel, x86-64)
- darwin-arm64 (MacOS, Arm, aarch64)
- darwin-x64 (macOS, x86-64)
- darwin-arm64 (macOS, Arm, aarch64)

1. Open a terminal and execute the following command to download NPM dependencies and tools, and
to build the Typescript code:
to build the TypeScript code:

```sh
> yarn
Expand Down Expand Up @@ -61,7 +61,7 @@ Supported `<target>`s are:
creates a build dedicated for debug. Additionally, it sets up a watch which detects code
changes and rebuilds them incrementally.

2. Switch to the VS Code `Run and Debug` view.
2. Switch to the VS Code® `Run and Debug` view.

3. Select and run `Desktop Extension`. This launches an extension host that runs this extension.

Expand Down
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/0f12a7e73736f8bbfb9d/maintainability)](https://codeclimate.com/github/Open-CMSIS-Pack/vscode-cmsis-debugger/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/0f12a7e73736f8bbfb9d/test_coverage)](https://codeclimate.com/github/Open-CMSIS-Pack/vscode-cmsis-debugger/test_coverage)

# Arm CMSIS Debugger Extension for Visual Studio Code (In Progress)
# Arm CMSIS Debugger

The Arm CMSIS Debugger extension for Visual Studio Code is an extension pack demonstrating how to combine technologies from various open source projects to create a comprehensive debug platform for Arm based IoT solutions.
The Arm® CMSIS Debugger extension is an extension pack for Visual Studio Code® that demonstrates how to combine technologies from various open source projects to create a comprehensive debug platform for Arm-based IoT solutions.

Related open source projects are

- [Open-CMSIS-Pack](https://www.open-cmsis-pack.org/) of which this extension is part of.
- [Eclipse CDT Cloud](https://eclipse.dev/cdt-cloud/), an open-source project that hosts a number of components and best practices for building customizable web-based C/C++ tools.
- [pyOCD](https://pyocd.io/), a Python based tool and API for debugging, programming, and exploring Arm Cortex microcontrollers.
- [GDB](https://www.sourceware.org/gdb/), the GNU Project debugger.
- [Eclipse® CDT.cloud™](https://eclipse.dev/cdt-cloud/), an open-source project that hosts a number of components and best practices for building customizable web-based C/C++ tools.
- [pyOCD](https://pyocd.io/), a Python based tool and API for debugging, programming, and exploring Arm Cortex® microcontrollers.
- [GDB](https://www.sourceware.org/gdb/), the debugger of the GNU Project.

## The Arm CMSIS Debugger Extension Pack

The Arm CMSIS Debugger extension is actually an [extension pack](https://code.visualstudio.com/api/references/extension-manifest#extension-packs). It allows to install multiple separate extensions together.
The Arm CMSIS Debugger extension is an [extension pack](https://code.visualstudio.com/api/references/extension-manifest#extension-packs). It allows to install multiple separate extensions together.

## Included Extensions

The following extensions are included in this extension pack:

- [CDT GDB Debug Adapter Extension](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.cdt-gdb-vscode), an Eclipse CDT Cloud extension that supports debugging using gdb and any other debuggers that supports the MI protocol.
- [Memory Inspector](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.memory-inspector), an Eclipse CDT Cloud extension that provides a powerful and configurable memory viewer that works with debug adapters.
- [Peripheral Inspector](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.peripheral-inspector), an Eclipse CDT Cloud extension that provides a CMSIS SVD viewer and works with debug adapters.
- [CDT GDB Debug Adapter Extension](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.cdt-gdb-vscode), an Eclipse CDT.cloud extension that supports debugging using GDB and any other debuggers that supports the MI protocol.
- [Memory Inspector](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.memory-inspector), an Eclipse CDT.cloud extension that provides a powerful and configurable memory viewer that works with debug adapters.
- [Peripheral Inspector](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.peripheral-inspector), an Eclipse CDT.cloud extension that provides a CMSIS SVD viewer and works with debug adapters.

## Recommended Extensions

We recommend to install the following extensions to simplify the user experience:

- [Arm Tools Environment Manager](https://marketplace.visualstudio.com/items?itemName=Arm.environment-manager), an extension that allows to download, install, and manage software development tools using [Microsoft vcpkg](https://vcpkg.io/en/index.html) artifacts. Use this extension to for example install the `GCC compiler for ARM CPUs` which comes with a GDB variant for Arm CPUs.
- [Arm Tools Environment Manager](https://marketplace.visualstudio.com/items?itemName=Arm.environment-manager), an extension that allows to download, install, and manage software development tools using [Microsoft® Vcpkg](https://vcpkg.io/en/index.html) artifacts. Use this extension to for example install the `GCC compiler for ARM CPUs` which comes with a GDB variant for Arm CPUs.
- [Arm CMSIS Solution](https://marketplace.visualstudio.com/items?itemName=Arm.cmsis-csolution), an extension that is a graphical user interface for csolution projects that use the [CMSIS-Toolbox](https://open-cmsis-pack.github.io/cmsis-toolbox/). Use this extension to build your csolution projects, to generate `*.cbuild-run.yml` debug configuration files, and to make use of contributed commands in your debug launch configurations.

## pyOCD Debug Setup
Expand All @@ -45,16 +45,16 @@ We recommend to install the following extensions to simplify the user experience
}
```

## Segger J-Link Debug Setup
## SEGGER® J-LINK® Debug Setup

- Install the latest [J-Link Software and Documentation Pack](https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack) from [Segger](https://www.segger.com/). Ensure all required drivers and host platform specific settings are done.
- Install the latest [J-LINK Software and Documentation Pack](https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack) from [SEGGER](https://www.segger.com/). Ensure all required drivers and host platform specific settings are done.
- Ensure the installation folder is added to your system's `PATH` environment variable. Alternatively, you can add an absolute path to your installation in the debug launch configuration.

## Additional Extension Functionality

This extension contributes additional functionality to more seamlessly integrate the included extensions:

- The pseudo debugger types `cmsis-debug-pyocd` and `cmsis-debug-jlink`. These types allow a more seamless integration into the VS Code IDE. However, these are not full debug adapters but generate debug configurations of type `gdbtarget` which comes with the [CDT GDB Debug Adapter Extension](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.cdt-gdb-vscode).
- The pseudo debugger types `cmsis-debug-pyocd` and `cmsis-debug-jlink`. These types allow a more seamless integration into your IDE. However, these are not full debug adapters but generate debug configurations of type `gdbtarget` which comes with the [CDT GDB Debug Adapter Extension](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.cdt-gdb-vscode).
- A [debug configuration provider](https://code.visualstudio.com/api/references/vscode-api#DebugConfigurationProvider) for the type `gdbtarget` which comes with the [CDT GDB Debug Adapter Extension](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.cdt-gdb-vscode). This provider automatically fills in default values for known remote GDB servers when launching a debug session.
- CMSIS specific launch configuration items for the `*` debugger type, i.e. visible for all debugger types. It depends on the actually used debug adapter type if this information is known and utilized.

Expand All @@ -76,11 +76,11 @@ In addition this extension contributes a debug configuration resolver which auto

**Note**: The built-in version of pyOCD supports the command line option `--cbuild-run`. However, this is a new option which isn't contained yet in releases outside this extension.

#### CMSIS Debugger (J-Link) - `cmsis-debug-jlink`
#### CMSIS Debugger (J-LINK) - `cmsis-debug-jlink`

The `cmsis-debug-jlink` debugger type allows to add default debug configurations to the workspace's `launch.json` file to debug via GDB and the Segger J-Link GDB server. The actually used debugger type is `gdbtarget`.
The `cmsis-debug-jlink` debugger type allows to add default debug configurations to the workspace's `launch.json` file to debug via GDB and the SEGGER J-LINK GDB server. The actually used debugger type is `gdbtarget`.

**Note**: The generated default debug configuration uses `JLinkGDBServer` as `target`.`server` setting. The executable with this name has slightly differing behavior depending on your host platform. It launches a GUI-less server on Linux and MacOS. Whereas a GDB server with GUI is launched on Windows. Please change the value to `JLinkGDBServerCL` to suppress the GUI on Windows.
**Note**: The generated default debug configuration uses `JLinkGDBServer` as `target`.`server` setting. The executable with this name has slightly differing behavior depending on your host platform. It launches a GUI-less server on Linux and macOS. Whereas a GDB server with GUI is launched on Windows®. Please change the value to `JLinkGDBServerCL` to suppress the GUI on Windows.

In addition this extension contributes a debug configuration resolver which automatically fills the following gaps during debug launch:

Expand All @@ -94,4 +94,10 @@ In addition this extension contributes a debug configuration resolver which auto

## Trademarks

Visual Studio is a trademark of the Microsoft group of companies.
Arm and Cortex are registered trademarks of Arm Limited (or its subsidiaries or affiliates) in the US and/or elsewhere.<br>
Windows, Visual Studio Code, VS Code, and the Visual Studio Code icon are trademarks of Microsoft Corporation. All rights reserved.<br>
Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other countries and regions.<br>
Eclipse, CDT, and CDT.cloud are trademarks of Eclipse Foundation, Inc.<br>
SEGGER and J-LINK are registered trademarks of SEGGER Microcontroller GmbH.<br>
Node.js is a registered trademark of the OpenJS Foundation.<br>
GDB and GCC are part of the GNU Project and are maintained by the Free Software Foundation.<br>
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@
},
{
"type": "cmsis-debug-jlink",
"label": "CMSIS Debugger (J-Link)",
"label": "CMSIS Debugger (J-LINK)",
"initialConfigurations": [
{
"name": "CMSIS Debugger: J-Link",
"name": "CMSIS Debugger: J-LINK",
"type": "gdbtarget",
"request": "launch",
"cwd": "${workspaceFolder}",
Expand Down Expand Up @@ -133,10 +133,10 @@
],
"configurationSnippets": [
{
"label": "CMSIS Debugger: J-Link",
"description": "CMSIS Debugger via J-Link GDB adapter.",
"label": "CMSIS Debugger: J-LINK",
"description": "CMSIS Debugger via J-LINK GDB adapter.",
"body": {
"name": "CMSIS Debugger: J-Link",
"name": "CMSIS Debugger: J-LINK",
"type": "gdbtarget",
"request": "launch",
"cwd": "^\"\\${workspaceFolder}\"",
Expand Down