Skip to content

Commit de740c3

Browse files
committed
Added pyOCD Debugger Information
1 parent d25c169 commit de740c3

File tree

6 files changed

+173
-28
lines changed

6 files changed

+173
-28
lines changed

docs/MCUXpressoConfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configure NXP Devices with MCUXpresso Config Tools
1+
# MCUXpresso for NXP Devices
22

33
<!-- markdownlint-disable MD009 -->
44
<!-- markdownlint-disable MD013 -->

docs/YML-Input-Format.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2548,15 +2548,19 @@ CMSIS-DAP supports the SWO trace output of Cortex-M devices. The device-specific
25482548

25492549
This section lists options that are specific for the Arm Debugger.
25502550

2551-
debugger: | | Description
2552-
:---------------------------------|:------------|:-----------------------------------------------
2553-
&nbsp;&nbsp;&nbsp; `name:` |**Required** | Identifies the debug adapter with `<adapter>@Arm-Debugger`.
2551+
debugger: | | Description
2552+
:------------------------------------|:------------|:-----------------------------------------------
2553+
&nbsp;&nbsp;&nbsp; `name:` |**Required** | Identifies the debug adapter with `<adapter>@Arm-Debugger`.
2554+
&nbsp;&nbsp;&nbsp; `clock-armdbg` | Optional | Debug clock speed. Possible values: auto (default), 50MHz, 33MHz, 25MHz, 20MHz, 10MHz, 5MHz, 2MHz, 1MHz, 500kHz, 200kHz, 100kHz, 50kHz, 20kHz, 10kHz, 5kHz
2555+
&nbsp;&nbsp;&nbsp; `protocol-armdbg` | Optional | Debug protocol. Possible values: auto (default), JTAG, SWD
25542556

25552557
**Example:**
25562558

25572559
```yml
25582560
debugger:
25592561
name: CMSIS-DAP@Arm-Debugger
2562+
protocol-armdbg: SWD
2563+
clock-armdbg: 5MHz
25602564
```
25612565

25622566
### Arm-FVP
@@ -2570,7 +2574,7 @@ debugger: | | Description
25702574
&nbsp;&nbsp;&nbsp; `name:` |**Required** | Identifies the debug adapter with `Arm-FVP`.
25712575
&nbsp;&nbsp;&nbsp; `model:` | Optional | Filename (optionally with path) of the FVP executable. Default: `FVP_MPS2_Cortex-M3`.
25722576
&nbsp;&nbsp;&nbsp; `config-file:` | Optional | Path and filename of the [FVP configuration file](https://arm-software.github.io/AVH/main/simulation/html/using.html).
2573-
`args:` | Optional | Miscellaneous [command line arguments](https://arm-software.github.io/AVH/main/simulation/html/using.html).
2577+
&nbsp;&nbsp;&nbsp; `args:` | Optional | Miscellaneous [command line arguments](https://arm-software.github.io/AVH/main/simulation/html/using.html).
25742578

25752579
The following `model:` executables are installed from the [Arm Tools Artifactory](https://www.keil.arm.com/artifacts/#models/arm/avh-fvp). You should use these models in combination with a `pack:` and `device:` as listed under
25762580
["CMSIS-based projects for AVH FVPs"](https://arm-software.github.io/AVH/main/simulation/html/avh_fvp_cmsis.html). The PATH environment variable of your system can define the path to the FVP executable (then only the `model:` name from the list below is required. Optionally an explicit path can be specified in the `model:` node.

docs/build-operation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ The options are added
428428
`values:` | | Content
429429
:-------------------------------------------------------|:-----------|:------------------------------------
430430
`- name:` |**Required**| Label text for the option in the user interface.
431-
&nbsp;&nbsp;&nbsp; `value:` |**Required**| Value used for the enum name in file csolution.yml file.
431+
&nbsp;&nbsp;&nbsp; `value:` | Optional | Value used for the enum name in csolution.yml file. If empty, `name` is used as `value`.
432432
&nbsp;&nbsp;&nbsp; `description:` | Optional | Descriptive text (hover over or sub-text in dialog).
433433

434434
**Example**
@@ -495,8 +495,7 @@ debug-adapters:
495495
yml-node: trace-port
496496
type: enum
497497
values:
498-
- name: UART
499-
value: UART
498+
- name: UART # UART is also used as value
500499
description: SWO configured for UART protocol
501500
- name: Manchester
502501
value: Man
@@ -543,7 +542,6 @@ debug-adapters:
543542
type: enum
544543
values:
545544
name: UART
546-
value: UART
547545
default: UART
548546
549547
- name: "Keil uVision"

docs/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ Thank you for using the **CMSIS-Toolbox** that provides command-line tools for:
2222

2323
- [**Reference Applications**](ReferenceApplications.md) explains how to use and creates examples that show middleware usage on many different evaluation boards, including custom hardware.
2424

25-
- [**Configure STM32 Devices with STM32CubeMX**](CubeMX.md) explains how to use [STM32CubeMX](https://www.st.com/en/development-tools/stm32cubemx.html) to manage device and board configuration.
26-
27-
- [**Configure NXP Devices with MCUXpresso Config Tools**](./MCUXpressoConfig.md) shows how to use [MCUXpresso Config Tools](https://www.nxp.com/configtools) to manage device and board configuration.
28-
2925
- [**Build Information Files**](YML-CBuild-Format.md) details the build information generated by the `csolution` tool. It includes license information for components and configuration for download and debug.
3026

27+
- [**pyOCD Debugger**](pyOCD-Debugger.md) explains the usage of the [pyOCD](https://pyocd.io/) Debugger in combination with the CMSIS-Toolbox configuration features.
28+
3129
- [**Theory of Operation**](build-operation.md) contains further details about the build process including CMake, West, generator (device configurators), and debugger integration for advanced users.
3230

3331
- [**Pack Creation**](pack-tools.md) describes how to create software packs that optionally include examples and explains the pack creation tools `packchk` (software pack verification) and `svdconv` (SVD file verification and header file generator).
@@ -36,6 +34,10 @@ Thank you for using the **CMSIS-Toolbox** that provides command-line tools for:
3634

3735
- [**Experimental Features**](Experimental-Features.md) for resource management of multi-project linker scripts, run and debug management.
3836

37+
- **Device Configuration Tools**
38+
- [**MCUXpresso for NXP Devices**](./MCUXpressoConfig.md) shows how to use [MCUXpresso Config Tools](https://www.nxp.com/configtools) to manage device and board configuration.
39+
- [**STM32CubeMX for STM32**](CubeMX.md) explains how to use [STM32CubeMX](https://www.st.com/en/development-tools/stm32cubemx.html) to manage device and board configuration.
40+
3941
## Revision History
4042

4143
Version | Description

docs/pyOCD-Debugger.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# pyOCD Debugger
2+
3+
!!! Note
4+
- This section contains preliminary information and is work-in-progress.
5+
6+
The CMSIS-Toolbox has many features. For debuggers it organizes projects and configuration options.
7+
This chapter explains the usage of the [pyOCD](https://pyocd.io/) Debugger in combination with these CMSIS-Toolbox features.
8+
9+
Other manual sections describe how to configure debuggers:
10+
11+
- [Run and Debug Configuration](build-overview.md#run-and-debug-configuration) explains overall structure and how projects and images are configured.
12+
- [Debugger Configuration - pyOCD](YML-Input-Format.md#pyocd) contains details about the options that are specific to pyOCD.
13+
14+
## Command Line Invocation
15+
16+
The CMSIS-Toolbox debugger configuration is provided in the [file `*.cbuild-run.yml`](YML-CBuild-Format.md#file-structure-of-cbuild-runyml). Use the following command line syntax to leverage this information:
17+
18+
```bash
19+
>pyOCD <command> --cbuild-run <cbuild-run.yml file> [options]
20+
```
21+
22+
`<command>` | Description
23+
:--------------------|:-------------------------------------
24+
`run` | Execute application.
25+
`erase` | Erase device
26+
`load` | Load image to device.
27+
28+
`<options>` | Description
29+
:--------------------|:-------------------------------------
30+
`--timelimit sec` | Terminate pyOCD when the timelimit is reached. Applies to `run` command only.
31+
`--eot` | Terminate when EOT character (`0x04`) is printed via a telnet channel. Applies to `run` command only.
32+
`--load` | Erase device and flash program the images specified in cbuild-run.yml. Applies to `run` command only.
33+
`--udi <id>` | Specify an id of a debug probe
34+
35+
**Examples:**
36+
37+
ToDo: command line examples
38+
39+
## Content of `cbuild-run.yml`
40+
41+
This section details the content of `cbuild-run.yml` file and how it is used to configure pyOCD. The `cbuild-run.yml` file is generated by the CMSIS-Toolbox from the information provided in the *csolution project*.
42+
However, it is possible to create a `*.cbuild-run.yml` file manually and the following section explains the file structure.
43+
44+
**Configuration File Example:**
45+
46+
```yml
47+
todo
48+
```
49+
50+
### `cbuild-run:`
51+
52+
The `cbuild-run:` node is the start of a `*.cbuild-run.yml` file.
53+
54+
`cbuild-run:` | | Content
55+
:-----------------------------------------------------------|:-----------|:------------------------------------
56+
&nbsp;&nbsp;&nbsp; `device:` | Optional | Identifies the device.
57+
&nbsp;&nbsp;&nbsp; `device-pack:` | Optional | Identifies the device pack used.
58+
&nbsp;&nbsp;&nbsp; [`output:`](#output) | Optional | Lists the possible compiler selection that this project is tested with.
59+
&nbsp;&nbsp;&nbsp; [`system-resources:`](#system-resources) | Optional | When specified, the [`cdefault.yml`](build-overview.md#cdefaultyml) file is used to setup compiler specific controls.
60+
61+
### `output:`
62+
63+
`output:` | | Content
64+
:-----------------------------------------------------------|:-----------|:------------------------------------
65+
&nbsp;&nbsp;&nbsp; `device:` | Optional | Identifies the device.
66+
&nbsp;&nbsp;&nbsp; `device-pack:` | Optional | Identifies the device pack used.
67+
&nbsp;&nbsp;&nbsp; [`output:`](#output) | Optional | Lists the possible compiler selection that this project is tested with.
68+
&nbsp;&nbsp;&nbsp; [`system-resources:`](#system-resources) | Optional | When specified, the [`cdefault.yml`](build-overview.md#cdefaultyml) file is used to setup compiler specific controls.
69+
70+
### `system-resources:`
71+
72+
```yml
73+
cbuild-run:
74+
device:
75+
device-pack: ? is the board-pack: not used?
76+
output:
77+
- file:
78+
info:
79+
type:
80+
load-offset:
81+
load:
82+
pname:
83+
system-resources:
84+
memory:
85+
- name:
86+
access:
87+
start:
88+
size:
89+
pname:
90+
alias:
91+
from-pack:
92+
system-descriptions:
93+
- file:
94+
type:
95+
pname:
96+
debugger:
97+
name:
98+
clock:
99+
dbgconf:
100+
start-pname:
101+
gdbserver:
102+
- port:
103+
pname:
104+
- port:
105+
pname:
106+
debug-vars:
107+
vars:
108+
debug-sequences:
109+
- name:
110+
info:
111+
pname:
112+
blocks:
113+
- info:
114+
if:
115+
while:
116+
execute:
117+
timeout:
118+
atomic:
119+
blocks:
120+
programming:
121+
- algorithm:
122+
ram-start:
123+
size:
124+
ram-start:
125+
ram-size:
126+
pname:
127+
debug-topology:
128+
debugports:
129+
- dpid:
130+
accessports:
131+
- apid:
132+
address:
133+
index:
134+
processors:
135+
- pname:
136+
apid:
137+
swj:
138+
dormant:
139+
```

mkdocs.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ extra:
44
repo_url: https://github.com/Open-CMSIS-Pack/cmsis-toolbox
55
edit_uri: ./edit/main/docs
66
nav:
7-
- Home: index.md
8-
- Overview: overview.md
9-
- Installation: installation.md
10-
- Build Tools: build-tools.md
11-
- CSolution Project Structure: build-overview.md
12-
- CSolution Project Format: YML-Input-Format.md
13-
- Create Applications: CreateApplications.md
14-
- Reference Applications: ReferenceApplications.md
15-
- Configure STM32 Devices with STM32CubeMX: CubeMX.md
16-
- Configure NXP Devices with MCUXpresso Config Tools: MCUXpressoConfig.md
17-
- Build Information Files: YML-CBuild-Format.md
18-
- Theory of Operation: build-operation.md
19-
- Pack Creation: pack-tools.md
20-
- Troubleshooting: Troubleshooting.md
21-
- Experimental Features: Experimental-Features.md
7+
- Home: index.md
8+
- Overview: overview.md
9+
- Installation: installation.md
10+
- Build Tools: build-tools.md
11+
- CSolution Project Structure: build-overview.md
12+
- CSolution Project Format: YML-Input-Format.md
13+
- Create Applications: CreateApplications.md
14+
- Reference Applications: ReferenceApplications.md
15+
- Build Information Files: YML-CBuild-Format.md
16+
- pyOCD Debugger: pyOCD-Debugger.md
17+
- Theory of Operation: build-operation.md
18+
- Pack Creation: pack-tools.md
19+
- Troubleshooting: Troubleshooting.md
20+
- Experimental Features: Experimental-Features.md
21+
- Device Configuration Tools:
22+
- MCUXpresso for NXP Devices: MCUXpressoConfig.md
23+
- STM32CubeMX for STM32 Devices: CubeMX.md
2224
theme:
2325
name: readthedocs
2426
markdown_extensions:

0 commit comments

Comments
 (0)