Skip to content

Commit 2edc3fb

Browse files
authored
Rework, added RTOS Views. (#585)
* Rework, added RTOS Views.
1 parent 8c0a7ee commit 2edc3fb

File tree

2 files changed

+48
-32
lines changed

2 files changed

+48
-32
lines changed

README.md

Lines changed: 48 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -242,39 +242,9 @@ Most Arm Cortex-M processors (except Cortex-M0/M0+/M23) include a `DWT->CYCCNT`
242242
> - `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.
243243
> - Each processor in a multi-processor system has and independent `DWT->CYCCNT` register.
244244
245-
### Multi-Core Debug
245+
### PERIPHERALS
246246

247-
A GDB server provides multiple connections to the processor cores (identified with `pname`) of a device. The list below shows the output of pyOCD in the DEBUG CONSOLE of VS Code.
248-
249-
```txt
250-
0000680 I Target device: MCXN947VDF [cbuild_run]
251-
0001585 I core 0: Cortex-M33 r0p4, pname: cm33_core0 [cbuild_run]
252-
0001585 I core 1: Cortex-M33 r0p4, pname: cm33_core1 [cbuild_run]
253-
0001585 I start-pname: cm33_core0 [cbuild_run]
254-
0001600 I Semihost server started on port 4444 (core 0) [server]
255-
0001636 I GDB server started on port 3333 (core 0) [gdbserver]
256-
0001641 I Semihost server started on port 4445 (core 1) [server]
257-
0001642 I GDB server started on port 3334 (core 1) [gdbserver]
258-
0007560 I Client connected to port 3333! [gdbserver]
259-
```
260-
261-
The `start-pname` indicates the processor that starts first and boots the system. A debug _launch_ command connects to this processor. Use a debug _attach_ command to connect to processors that are running. The picture below highlights the parts of the user interface that interact with processors.
262-
263-
1. Select a processor and **Start Debug**. This connects the debugger.
264-
2. **Select a Processor** in the debug toolbar, or
265-
3. Click in **CALL STACK** on a thread or function name to select a processor.
266-
4. The selected processor is also shown in the **CPU Time Status bar**. This processor context is used in the VARIABLES and WATCH view.
267-
268-
![Multicore Debug](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/multicore.png)
269-
270-
> 📝 **Notes:**
271-
>
272-
> - The SEGGER JLink GDB server uses a _launch_ command to connect to a running processor whereas other GDB servers use an _attach_ command.
273-
> - A [Disassembly View](#disassembly) opens only for a selected processor; otherwise the command is shown as disabled.
274-
275-
### Peripherals
276-
277-
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).
247+
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).
278248

279249
![Peripheral Inspector](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/peripheral-inspector.png)
280250

@@ -311,6 +281,22 @@ The command **Open Disassembly View** (available from [command palette](https://
311281
>
312282
> - Enable the [VS Code setting](https://code.visualstudio.com/docs/configure/settings) **Features > Debug > Disassembly View: Show Source Code** to show assembler instructions interleaved with source code.
313283
284+
### RTOS Views
285+
286+
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.
288+
289+
![RTOS Views with FreeRTOS](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/rtos-views.png)
290+
291+
> 📝 **Note:**
292+
>
293+
> - This is not a live view. It only gets updated when the program execution is stopped.
294+
> - To enable the view, you need to go to the debug view and press Ctrl/Cmd - Shift - P. Select
295+
> **RTOS Views: Toggle RTOS Panel**. Afterwards, start your debug session.
296+
> - The view is located in the Terminal panel at the bottom and is called **XRTOS**.
297+
> - If it does not show values after entering a debug session and running the application, press Ctrl/Cmd - Shift - P
298+
> again and select **RTOS Views: Refresh**.
299+
314300
### Debug Console
315301

316302
The **Debug Console** enables viewing and interacting with the output of your code running in the debugger.
@@ -337,6 +323,36 @@ application is run with the `> continue` command.
337323

338324
The [Serial Monitor](https://learn.microsoft.com/en-us/cpp/embedded/serial-monitor?view=msvc-170&tabs=visual-studio) allows users to configure, monitor, and communicate with serial or TCP ports.
339325

326+
## Multi-Core Debug
327+
328+
A GDB server provides multiple connections to the processor cores (identified with `pname`) of a device. The list below shows the output of pyOCD in the DEBUG CONSOLE of VS Code.
329+
330+
```txt
331+
0000680 I Target device: MCXN947VDF [cbuild_run]
332+
0001585 I core 0: Cortex-M33 r0p4, pname: cm33_core0 [cbuild_run]
333+
0001585 I core 1: Cortex-M33 r0p4, pname: cm33_core1 [cbuild_run]
334+
0001585 I start-pname: cm33_core0 [cbuild_run]
335+
0001600 I Semihost server started on port 4444 (core 0) [server]
336+
0001636 I GDB server started on port 3333 (core 0) [gdbserver]
337+
0001641 I Semihost server started on port 4445 (core 1) [server]
338+
0001642 I GDB server started on port 3334 (core 1) [gdbserver]
339+
0007560 I Client connected to port 3333! [gdbserver]
340+
```
341+
342+
The `start-pname` indicates the processor that starts first and boots the system. A debug _launch_ command connects to this processor. Use a debug _attach_ command to connect to processors that are running. The picture below highlights the parts of the user interface that interact with processors.
343+
344+
1. Select a processor and **Start Debug**. This connects the debugger.
345+
2. **Select a Processor** in the debug toolbar, or
346+
3. Click in **CALL STACK** on a thread or function name to select a processor.
347+
4. The selected processor is also shown in the **CPU Time Status bar**. This processor context is used in the VARIABLES and WATCH view.
348+
349+
![Multicore Debug](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/raw/main/images/multicore.png)
350+
351+
> 📝 **Notes:**
352+
>
353+
> - The SEGGER JLink GDB server uses a _launch_ command to connect to a running processor whereas other GDB servers use an _attach_ command.
354+
> - A [Disassembly View](#disassembly) opens only for a selected processor; otherwise the command is shown as disabled.
355+
340356
## Extension Functionality
341357

342358
This extension adds functionality to work seamlessly with other extensions.

images/rtos-views.png

36.5 KB
Loading

0 commit comments

Comments
 (0)