You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,18 @@
1
1
# Change Log
2
2
3
3
## Unreleased
4
+
- Updates included pyOCD distribution
5
+
- Fixes [#92](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/issues/92): `monitor reset halt` command fails for LPCXpresso55S69 if using CMSIS Pack support in pyOCD.
6
+
- Fixes [#93](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/issues/93): Download to LPC55S69 flash with GDB and pyOCD ends in errors.
7
+
- Fixes [#94](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/issues/94): Cannot connect to NXP FRDM-K32L3A6 with pyOCD.
8
+
- Fixes support for `<memory>` elements from CMSIS PDSC files.
9
+
- Fixes progress bar output during program download.
10
+
- Fixes handling of `__ap` variable in debug sequences.
11
+
- Improves connection robustness and DP sticky error bits handling for temporary target communication losses and `__errorcontrol` usage (CMSIS debug descriptions). For example in reset scenarios.
12
+
- Updates CMSIS-DAP probe detection (filters out Cypress KitProg3 bridge).
13
+
- Extends and improves support for `*.cbuild-run.yml` debug configuration files.
14
+
15
+
## 0.0.3
4
16
- Fixes [#84](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/issues/84): Cannot use cbuild-run files with pyOCD without CMSIS_PACK_ROOT environment variable.
5
17
- Implements [#83](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/issues/83): Make built-in pyOCD available in VS Code terminals.
6
18
- Note that there is a known issue with a pyOCD installation in Python virtual environments taking precedence over the built-in pyOCD variant.
Copy file name to clipboardExpand all lines: README.md
+92-22Lines changed: 92 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,18 +31,27 @@ We recommend to install the following extensions to simplify the user experience
31
31
-[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.
32
32
-[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.
33
33
34
-
## pyOCD Debug Setup
34
+
## Debug Setup
35
35
36
-
- Install `GCC compiler for ARM CPUs` with the `Arm Tools Environment Manager` extension to get access to a GDB (`arm-none-eabi-gdb`).
36
+
The debug setup requires a GDB installation supporting the GDB remote protocol and that can connect to a GDB server like pyOCD.
37
37
38
-
## SEGGER® J-LINK® Debug Setup
38
+
We recommend to install the [`Arm GNU Toolchain`](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) using the `Arm Tools Environment Manager` extension. It comes with `arm-none-eabi-gdb` which is used in the Arm CMSIS Debugger default debug configurations.
39
39
40
-
- 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.
41
-
- 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.
40
+
### pyOCD Debug Setup
42
41
43
-
## Additional Extension Functionality
42
+
This extension includes a pyOCD distribution which is used by default.
44
43
45
-
This extension contributes additional functionality to more seamlessly integrate the included extensions:
44
+
If you wish to use a different pyOCD installation, enter the full path to the executable (including the file name) in the `target`>`server` setting.
45
+
46
+
### SEGGER® J-LINK® Debug Setup
47
+
48
+
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.
49
+
50
+
The extension expects the installation folder to be on your system `PATH` environment variable. Alternatively, update your debug configuration's `target`>`server` setting to contain the full path to the J-LINK GDB server executable (including the file name).
51
+
52
+
## Extension Functionality
53
+
54
+
This extension contributes additional functionality to work seamlessly with other extensions.
46
55
47
56
- 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).
48
57
- 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.
@@ -54,33 +63,94 @@ This section describes the contributed pseudo debugger types and their support t
54
63
55
64
#### CMSIS Debugger (pyOCD) - `cmsis-debug-pyocd`
56
65
57
-
The `cmsis-debug-pyocd` debugger type allows to add default debug configurations to the workspace's `launch.json` file to debug via GDB and pyOCD. The actually used debugger type is `gdbtarget`.
66
+
The `cmsis-debug-pyocd` debugger type is used to add a debug configuration in the `launch.json` file for debugging with GDB and pyOCD.<br>
67
+
This configuration uses the `gdbtarget` debugger type registered by the CDT GDB Debug Adapter Extension.
58
68
59
-
In addition this extension contributes a debug configuration resolver which automatically fills the following gaps during debug launch:
69
+
Additionaly, the extension contributes a debug configuration resolver which automatically fills the following gaps during debug launch:
60
70
61
-
- If option `target`.`server` is set to `pyocd`, then it expands this option to the absolute path of the built-in pyOCD distribution.
62
-
-Adds/extends the `target`.`serverParameters` list of `pyocd` command line arguments:
71
+
- If option `target`>`server` is set to `pyocd`, then it expands to the absolute path of the built-in pyOCD distribution.
72
+
-Extends the `target`>`serverParameters` list of `pyocd` command line arguments:
63
73
- Prepends `gdbserver` if not present.
64
-
- Appends `--port` and the corresponding `port`value if `target`.`port` is set.
65
-
- Appends `--cbuild-run` and the corresponding `cbuildRunFile` path if `cmsis`.`cbuildRunFile` is set.
74
+
- Appends `--port <gdbserver_port>` if the `target`>`port`setting is set, where `<gdbserver_port>` gets that port setting's value.
75
+
- Appends `--cbuild-run` and the corresponding `cbuildRunFile` path if `cmsis`>`cbuildRunFile` is set.
66
76
67
-
**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.
77
+
**Note**: The built-in version of pyOCD supports the command line option `--cbuild-run`which isn't available in releases outside this extension.
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`.
81
+
The `cmsis-debug-jlink` debugger type is used to add a debug configuration in the launch.json file for debug with GDB and the SEGGER J-LINK GDB server.<br>
82
+
This configuration uses the `gdbtarget` debugger type registered by the CDT GDB Debug Adapter Extension.
83
+
84
+
**Note**: The generated default debug configuration uses the value `JLinkGDBServer` as `target`>`server` setting. This executable has differing behavior on supported host platform:
85
+
* Linux and macOS: A GUI-less version of the GDB server is launched.
86
+
* Windows®: A GDB server with GUI is launched. Update `target`>`server` to `JLinkGDBServerCL` to launch a GUI-less version on Windows, too.
87
+
88
+
Additionaly, the extension contributes a debug configuration resolver which automatically fills the following gaps during debug launch:
89
+
90
+
- Extends the `target`>`serverParameters` list of `JLinkGDBServer`/`JLinkGDBServerCL` command line arguments:
91
+
- Appends `--port <gdbserver_port>` if the `target`>`port` setting is set, where `<gdbserver_port>` gets that port setting's value.
92
+
93
+
## Known Limitations and Workarounds
94
+
95
+
### pyOCD fails to load `*.cbuild-run.yml` in the default configuration
96
+
97
+
When I use the default debug configuration for pyOCD, I get errors that pyOCD cannot find the solutions `*.cbuild-run.yml` file.
98
+
99
+
**Possible Reasons**:
100
+
101
+
1. The application's CMSIS solution was initially built with a CMSIS-Toolbox version prior to v2.8.0 which is the first version to generate `*.cbuild-run.yml` files.
102
+
1. You are using an [Arm CMSIS Solution](https://marketplace.visualstudio.com/items?itemName=Arm.cmsis-csolution) extension prior to v1.52.0 which is the first version to fully support the `${command:cmsis-csolution.getCbuildRunFile}` command.
103
+
104
+
**Workarounds/Solutions**:
105
+
106
+
1. Update the CMSIS-Toolbox to the latest version. Additionally, you may have to run `cbuild setup --update-rte` in a terminal for a first-time generation of `*.cbuild-run.yml` file in an existing workspace.
107
+
1. Update to Arm CMSIS Solution extension v1.52.0. Alternatively, replace `${command:cmsis-csolution.getCbuildRunFile}` with the path to the `*.cbuild-run.yml` in your workspace (`cmsis`>`cbuildRunFile` debug configuration setting).
108
+
109
+
### AXF files built with Arm Compiler 6 toolchain
110
+
111
+
When I download an AXF file built with Arm Compiler 6, I see the following warning and my application does not execute correctly. This happens regardless of the selected GDB server.
112
+
```
113
+
warning: Loadable section "RW_RAM0" outside of ELF segments
114
+
in /path/to/my/application.axf
115
+
```
116
+
117
+
**Possible Reason**: `arm-none-eabi-gdb` does not correctly load ELF program segments due to the way that Arm Compiler 6 generates section and program header information when scatterloading is used.
118
+
119
+
**Workaround**: You can generate a HEX file for the program download, and the ELF file for debug purposes only. The following steps are required if you build a [CSolution](https://open-cmsis-pack.github.io/cmsis-toolbox/build-overview/)-based application with the [CMSIS-Toolbox](https://open-cmsis-pack.github.io/cmsis-toolbox/):
120
+
121
+
1. Edit the `*.cproject.yml` file(s) of your application.
122
+
1. Modify the [`output:type:`](https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#output) node to generate both an `elf` and a `hex` file:
123
+
```
124
+
output:
125
+
type:
126
+
- elf
127
+
- hex
128
+
```
129
+
1. Build the solution.
130
+
1. Keep the default configuration's `program` setting as is.
1. Modify the default debug configuration's `initCommands` list, so that the `load` command gets the relative path to the generated HEX file.
135
+
```
136
+
"initCommands": [
137
+
"load ./relative/path/to/my/application.hex",
138
+
"break main"
139
+
],
140
+
```
72
141
73
-
**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.
142
+
This instructs the debugger to load the debug information from the ELF file and to use the HEX file for program download.
74
143
75
-
In addition this extension contributes a debug configuration resolver which automatically fills the following gaps during debug launch:
144
+
### `arm-none-eabi-gdb` requires DWARF5 debug information
76
145
77
-
- Adds/extends the `target`.`serverParameters` list of `JLinkGDBServer`/`JLinkGDBServerCL` command line arguments:
78
-
- Appends `--port` and the corresponding `port` value if `target`.`port` is set.
146
+
`arm-none-eabi-gdb` generates the following warnings when I debug ELF files with [DWARF](https://dwarfstd.org/) debug information of standard version 4 and earlier. And the debug illusion seems to be broken in many places.<br>
147
+
```
148
+
warning: (Internal error: pc 0x8006a18 in read in CU, but not in symtab.)
149
+
```
79
150
80
-
## Known Limitations
151
+
**Possible Reason**: `arm-none-eabi-gdb` works best with DWARF debug information of standard version 5.
81
152
82
-
- Requires ELF files built with GCC and DWARF5 debug information to operate seamlessly.
83
-
- The shipped pyOCD version accepts the new command line option `--cbuild-run`. But only extracts device and DFP names.
153
+
**Solution**: Make sure to build your application ELF file with DWARF version 5 debug information. Please refer to your toolchain's user reference manual. This may require updates to all build tools like compiler and assembler. For example use `-gdwarf-5` for `armclang`.
0 commit comments