Skip to content

Commit e0f8b91

Browse files
authored
Docs Updates for v1.2.0 (#613)
* Rework, added RTOS Views. * Update for the RTOS view with RTX5 * Added LIVE WATCH
1 parent 5b33f9b commit e0f8b91

File tree

5 files changed

+75
-29
lines changed

5 files changed

+75
-29
lines changed

README.md

Lines changed: 75 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ The Arm CMSIS Debugger includes [pyOCD](https://pyocd.io/) for target connection
1818
- [Peripheral Inspector](https://marketplace.visualstudio.com/items?itemName=eclipse-cdt.peripheral-inspector) provides a structured view to device peripheral registers during debugging.
1919
- [Serial Monitor](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-serial-monitor) to view output from and send messages to serial (UART) or TCP ports.
2020

21+
For RTOS awareness, we recommend installing this extension manually:
22+
23+
- [RTOS Views](https://marketplace.visualstudio.com/items?itemName=mcu-debug.rtos-views) provides insights into resources of popular RTOS implementations at runtime.
24+
2125
This extension is [free to use](https://marketplace.visualstudio.com/items/Arm.vscode-cmsis-debugger/license) and you can install it individually or as part of the [Arm Keil® Studio pack](https://marketplace.visualstudio.com/items?itemName=Arm.keil-studio-pack). For optimum debugger experience, use it with extensions from Arm (included in the Arm Keil Studio pack) and from other parties:
2226

2327
- [Arm CMSIS Solution](https://marketplace.visualstudio.com/items?itemName=Arm.cmsis-csolution) a user interface for _csolution projects_ that simplifies the [Run and Debug configuration](https://mdk-packs.github.io/vscode-cmsis-solution-docs/configuration.html#configure-run-and-debug).
@@ -42,7 +46,9 @@ Many features of the CMSIS Debugger extension are exposed in the **Run and Debug
4246

4347
1. **Start debugging** selects a configuration: _launch_ to start download/debug, _attach_ to connect with a running system.
4448
2. **Debug Toolbar** has buttons for the most common debugging actions that control execution.
45-
3. **Debug Statusbar** shows the configuration along with the workspace name. A color change indicates an active debug session.
49+
3. The **Trace and Live View** shows the **LIVE WATCH** window.
50+
4. **Debug Statusbar** shows the time spent running the application.
51+
5. The **Debug Console** can be used to interact with the debugger on the command line.
4652

4753
![Run and Debug view](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/RunAndDebugView.png)
4854

@@ -60,10 +66,14 @@ The **Run and Debug** view provides:
6066
6167
Other debugger specific views or features:
6268

63-
- [**Disassembly**](#disassembly) shows assembly instructions and supports run control, for example with stepping and breakpoints.
69+
- [**Live Watch**](#trace-and-live-view) offers run-time viewing of user-defined expressions, for example, variable
70+
values.
71+
- [**Disassembly**](#disassembly) shows assembly instructions and supports run control, for example with stepping and
72+
breakpoints.
6473
- [**Debug Console**](#debug-console) lists debug output messages and allows entering expressions or GDB commands.
6574
- [**Peripherals**](#peripherals) show the device peripheral registers and allow changing their values.
66-
- [**Serial Monitor**](#serial-monitor) uses serial or TCP communication to interact with application I/O functions (`printf`, `getc`, etc.).
75+
- [**Serial Monitor**](#serial-monitor) uses serial or TCP communication to interact with application I/O functions
76+
(`printf`, `getc`, etc.).
6777
- [**CPU Time**](#cpu-time) shows execution timing and statistics of the past five breakpoints.
6878
- [**Multi-Core Debug**](#multi-core-debug) to view and control several processors in a device.
6979

@@ -136,8 +146,23 @@ For more control of breakpoints, use the **BREAKPOINTS** section that lists and
136146

137147
![BREAKPOINTS section](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/breakpoints-section.png)
138148

149+
> 📝 **Note:**
150+
>
151+
> You can set breakpoints anytime during your debug session. However, when setting a breakpoint while running an
152+
> application, the target stops for a short period of time.
153+
139154
#### Breakpoint types
140155

156+
Apart from the code breakpoint, there are other breakpoint types to satisfy specific use cases.
157+
158+
##### Function breakpoints
159+
160+
Instead of placing breakpoints directly in source code, a debugger can support creating breakpoints by specifying
161+
a function name. This is useful in situations where the source is not available but a function name is known.
162+
163+
To create a function breakpoint, select the + button in the **BREAKPOINTS section** header and enter the function
164+
name. Function breakpoints are shown with a red triangle in the **BREAKPOINTS section**.
165+
141166
##### Conditional breakpoints
142167

143168
Set breakpoint conditions based on expressions, hit counts, or a combination of both.
@@ -166,6 +191,25 @@ To add a condition to an existing breakpoint:
166191

167192
- Edit the condition (expression, hit count, or wait for breakpoint).
168193

194+
> 📝 **Note:**
195+
>
196+
> For checking the the breakpoint condition, the target is halted for a short period of time.
197+
198+
##### Data breakpoints
199+
200+
Data breakpoints can be set from the context menu of a variable in the **WATCH section**. The Break on Value
201+
Change/Read/Access commands add a data breakpoint that is hit when the value of the underlying variable changes/is
202+
read/is accessed. Data breakpoints are shown with a red hexagon in the **BREAKPOINTS section** and the type of
203+
breakpoint is shown (Write/Read/Access).
204+
205+
![Creating a data breakpoint](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/data-breakpoints.gif)
206+
207+
> 📝 **Note:**
208+
>
209+
> When hitting a data breakpoint, the program execution does not stop exactly on that line of code. Depending on the
210+
> underlying CPU architecture, stopping can be delayed by up to 5 cycles. Use the
211+
> [Call Stack](#call-stack) view to determine what caused the execution to stop.
212+
169213
##### Triggered breakpoints
170214

171215
A triggered breakpoint is type of conditional breakpoint that is enabled once another breakpoint is hit. They can
@@ -176,6 +220,7 @@ then, choose which other breakpoint enables the breakpoint.
176220

177221
![Creating a triggered breakpoint](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/triggered-bkpt.gif)
178222

223+
<!--
179224
##### Inline breakpoints
180225
181226
Inline breakpoints are only hit when the execution reaches the column associated with the inline breakpoint.
@@ -186,36 +231,16 @@ Inline breakpoints are shown inline in the editor.
186231
187232
Inline breakpoints can also have conditions. Editing multiple breakpoints on a line is possible through the
188233
context menu in the editor's left margin.
189-
190-
##### Function breakpoints
191-
192-
Instead of placing breakpoints directly in source code, a debugger can support creating breakpoints by specifying
193-
a function name. This is useful in situations where the source is not available but a function name is known.
194-
195-
To create a function breakpoint, select the + button in the **BREAKPOINTS section** header and enter the function
196-
name. Function breakpoints are shown with a red triangle in the **BREAKPOINTS section**.
197-
198-
##### Data breakpoints
199-
200-
If a debugger supports data breakpoints, they can be set from the context menu of a variable in the **WATCH section**.
201-
The Break on Value Change/Read/Access commands add a data breakpoint that is hit when the value of the underlying
202-
variable changes/is read/is accessed. Data breakpoints are shown with a red hexagon in the **BREAKPOINTS section**.
203-
204-
![Creating a data breakpoint](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/data-breakpoints.gif)
205-
206-
> 📝 **Note:**
207-
>
208-
> When hitting a data breakpoint, the program execution does not stop exactly on that line of code. Depending on the
209-
> underlying CPU architecture, stopping can be delayed by up to 5 cycles. Use the
210-
> [Call Stack](#call-stack) view to determine what caused the execution to stop.
234+
-->
211235

212236
##### Logpoints
213237

214-
A logpoint is a variant of a breakpoint that does not interrupt the debugger, but instead logs a message to the
215-
debug console. Logpoints can help you save time by not having to add or remove logging statements in your code.
238+
A logpoint pauses the program execution for a short period of time, sends a message to the debug console, and then
239+
continues with the application. Logpoints can help you save time by not having to add or remove logging statements in
240+
your code.
216241

217242
A logpoint is represented by a diamond-shaped icon. Log messages are plain text, but can also include expressions to be
218-
evaluated within curly braces ('{}').
243+
evaluated within curly braces (`{}`).
219244

220245
To add a logpoint, right-click in the editor left margin and select Add Logpoint, or use the
221246
**Debug: Add Logpoint...** command in the Command Palette (**Ctrl/Cmd + Shift + p**).
@@ -242,6 +267,26 @@ Most Arm Cortex-M processors (except Cortex-M0/M0+/M23) include a `DWT->CYCCNT`
242267
> - `DWT->CYCCNT` is a 32-bit register incremented with [`SystemCoreClock`](https://arm-software.github.io/CMSIS_6/latest/Core/group__system__init__gr.html) frequency. The time calculation copes with one overflow between program stops. Multiple overflows between program stops deliver wrong time information.
243268
> - Each processor in a multi-processor system has and independent `DWT->CYCCNT` register.
244269
270+
### Trace and Live view
271+
272+
The **Trace and Live View**
273+
![Trace and Live view](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/TraceLiveView.png)
274+
(available from the VS Code Activty Bar) currently shows the **LIVE WATCH**. You can add expressions to this view that
275+
are updated while the application is running on your target.
276+
277+
![Trace and Live View](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/talv-live-watch.png)
278+
279+
You can add expressions to this view by:
280+
281+
1. Pressing the three dots to the right.
282+
2. Pressing the `+` sign.
283+
3. Using the context menu item **Add to Live Watch** in:
284+
- source code files.
285+
- the **Watch** window.
286+
- the **Variables** window.
287+
4. From the **Trace and Live View**, you can show an expression in the Memory Inspector. Right-click on the expression
288+
and select **Show in Memory Inspector**.
289+
245290
### PERIPHERALS
246291

247292
The **PERIPHERALS** view shows the device peripheral registers and allows to change their values. It uses the CMSIS-SVD files that are provided by silicon vendors and distributed as part of the CMSIS Device Family Packs (DFP).
@@ -284,7 +329,8 @@ The command **Open Disassembly View** (available from [command palette](https://
284329
### RTOS Views
285330

286331
For RTOS awareness, the [RTOS Views](https://marketplace.visualstudio.com/items?itemName=mcu-debug.rtos-views)
287-
extension is used. Currently, it supports FreeRTOS, Zephyr, embOS,and various flavors of uC/OS. Keil RTX5 will be added soon.
332+
extension needs to be added to CS Code. This extension supports a wide range of real-time operating systems, such as
333+
FreeRTOS, Zephyr, embOS,and Keil RTX5.
288334

289335
![RTOS Views with FreeRTOS](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/rtos-views.png)
290336

images/RunAndDebugView.png

36.7 KB
Loading

images/TraceLiveView.png

719 Bytes
Loading

images/rtos-views.png

12.2 KB
Loading

images/talv-live-watch.png

32.6 KB
Loading

0 commit comments

Comments
 (0)