pyOCD Debugger
Note
- This section contains preliminary information and is work-in-progress.
The CMSIS-Toolbox has many features. For debuggers it organizes projects and configuration options. This chapter explains the usage of the pyOCD Debugger in combination with these CMSIS-Toolbox features.
Other manual sections describe how to configure debuggers:
- Run and Debug Configuration explains overall structure and how projects and images are configured.
- Debugger Configuration - pyOCD contains details about the options that are specific to pyOCD.
Command Line Invocation
The CMSIS-Toolbox debugger configuration is provided in the file *.cbuild-run.yml. Use the following command line syntax to leverage this information:
>pyOCD <command> --cbuild-run <cbuild-run.yml file> [options]
<command> |
Description |
|---|---|
run |
Execute application. |
erase |
Erase device |
load |
Load image to device. |
<options> |
Description |
|---|---|
--timelimit sec |
Terminate pyOCD when the timelimit is reached. Applies to run command only. |
--eot |
Terminate when EOT character (0x04) is printed via a telnet channel. Applies to run command only. |
--load |
Erase device and flash program the images specified in cbuild-run.yml. Applies to run command only. |
--udi <id> |
Specify an id of a debug probe |
Examples:
ToDo: command line examples
Content of cbuild-run.yml
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.
However, it is possible to create a *.cbuild-run.yml file manually and the following section explains the file structure.
Configuration File Example:
todo
cbuild-run:
The cbuild-run: node is the start of a *.cbuild-run.yml file.
cbuild-run: |
Content | |
|---|---|---|
device: |
Optional | Identifies the device. |
device-pack: |
Optional | Identifies the device pack used. |
output: |
Optional | Lists the possible compiler selection that this project is tested with. |
system-resources: |
Optional | When specified, the cdefault.yml file is used to setup compiler specific controls. |
output:
output: |
Content | |
|---|---|---|
device: |
Optional | Identifies the device. |
device-pack: |
Optional | Identifies the device pack used. |
output: |
Optional | Lists the possible compiler selection that this project is tested with. |
system-resources: |
Optional | When specified, the cdefault.yml file is used to setup compiler specific controls. |
system-resources:
cbuild-run:
device:
device-pack: ? is the board-pack: not used?
output:
- file:
info:
type:
load-offset:
load:
pname:
system-resources:
memory:
- name:
access:
start:
size:
pname:
alias:
from-pack:
system-descriptions:
- file:
type:
pname:
debugger:
name:
clock:
dbgconf:
start-pname:
gdbserver:
- port:
pname:
- port:
pname:
debug-vars:
vars:
debug-sequences:
- name:
info:
pname:
blocks:
- info:
if:
while:
execute:
timeout:
atomic:
blocks:
programming:
- algorithm:
ram-start:
size:
ram-start:
ram-size:
pname:
debug-topology:
debugports:
- dpid:
accessports:
- apid:
address:
index:
processors:
- pname:
apid:
swj:
dormant: