Skip to content

Commit 30b6230

Browse files
author
pyocd-bot
committed
Deploying to main from @ pyocd/pyocd-website-source@39b32dc 🚀
1 parent 38343dc commit 30b6230

13 files changed

+641
-268
lines changed

docs/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
## Table of Contents
3+
4+
### Getting started
5+
6+
- [Installing](installing.md)
7+
- [Installing on non-x86](installing_on_non_x86.md)
8+
- [GDB setup](gdb_setup.md)
9+
10+
### User documentation
11+
12+
- [Terminology](terminology.md)
13+
- [Target support](target_support.md)
14+
- [Debug probes](debug_probes.md)
15+
- [Configuration](configuration.md)
16+
- [User scripts](user_scripts.md)
17+
- [Remote probe access](remote_probe_access.md)
18+
- [Configuring logging](configuring_logging.md)
19+
- [Target security features](security.md)
20+
- [Debugging multicore devices](multicore_debug.md)
21+
- [Semihosting](semihosting.md)
22+
- [SWO/SWV](swo_swv.md)
23+
- [Target family usage notes](target_notes.md)
24+
25+
### Reference
26+
27+
- [Built-in targets](builtin-targets.md)
28+
- [Session options reference](options.md)
29+
- [Command reference](command_reference.md)
30+
- [Environment variables](env_vars.md)
31+
32+
### Python API
33+
34+
- [Introduction to the pyOCD Python API](python_api.md)
35+
- [Python API examples](api_examples.md)
36+
37+
### Developer documentation
38+
39+
- [Developers’ guide](developers_guide.md)
40+
- [How to add new targets](adding_new_targets.md)
41+
- [Running the automated tests](automated_tests.md)
42+
- Internal design
43+
- [Architecture overview](architecture.md)
44+
- [Remote probe protocol](remote_probe_protocol.md)
45+
46+
47+
48+

docs/automated_tests.html

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ <h5 class="sidebar-header">On this page</h5>
205205
<ul id="toc" class="section-nav">
206206
<li class="toc-entry toc-h2"><a href="#unit-tests">Unit tests</a></li>
207207
<li class="toc-entry toc-h2"><a href="#functional-tests">Functional tests</a></li>
208+
<li class="toc-entry toc-h2"><a href="#azure-pipelines">Azure Pipelines</a></li>
208209
<li class="toc-entry toc-h2"><a href="#testing-with-tox">Testing with tox</a></li>
209210
</ul>
210211
</div>
@@ -244,19 +245,38 @@ <h2 id="functional-tests">Functional tests</h2>
244245
<ul>
245246
<li><code class="highlighter-rouge">basic_test.py</code>: a simple test that checks a range of basic functionality, from flash programming to accessing memory and core registers.</li>
246247
<li><code class="highlighter-rouge">blank_test.py</code>: tests ability to connect to devices with with blank flash. (Not run by <code class="highlighter-rouge">automated_test.py</code>.)</li>
248+
<li><code class="highlighter-rouge">commander_test.py</code>: tests the <code class="highlighter-rouge">pyocd commander</code> functionality.</li>
249+
<li><code class="highlighter-rouge">commands_test.py</code>: tests commands supported by commander and gdb monitor commands.</li>
250+
<li><code class="highlighter-rouge">concurrency_test.py</code>: verify multiple threads can simultaneously access a debug probe, specifically for memory
251+
transfers.</li>
247252
<li><code class="highlighter-rouge">connect_test.py</code>: tests all combinations of the halt on connect and disconnect resume options.</li>
248253
<li><code class="highlighter-rouge">cortex_test.py</code>: validates CPU control operations and memory accesses.</li>
249254
<li><code class="highlighter-rouge">debug_context_test.py</code>: tests some <code class="highlighter-rouge">DebugContext</code> classes.</li>
250-
<li><code class="highlighter-rouge">flash_test.py</code>: comprehensive test of flash programming.</li>
251255
<li><code class="highlighter-rouge">flash_loader_test.py</code>: test the classes in the <code class="highlighter-rouge">pyocd.flash.loader</code> module.</li>
252-
<li><code class="highlighter-rouge">gdb_server_json_test.py</code>: validates the JSON output from pyocd-gdbserver used by tools like the GNU MCU Eclipse pyOCD plugin.</li>
256+
<li><code class="highlighter-rouge">flash_test.py</code>: comprehensive test of flash programming.</li>
257+
<li><code class="highlighter-rouge">import_all.py</code>: imports all pyocd modules. (Not run by <code class="highlighter-rouge">automated_test.py</code>.)</li>
253258
<li><code class="highlighter-rouge">gdb_test.py</code>: tests the gdbserver by running a script in a gdb process. Note that on Windows,
254259
the 32-bit Python 2.7 must be installed for the Python-enabled gdb to work properly and for
255260
this test to pass.</li>
261+
<li><code class="highlighter-rouge">json_lists_test.py</code>: validates the JSON output from <code class="highlighter-rouge">pyocd json</code>.</li>
256262
<li><code class="highlighter-rouge">parallel_test.py</code>: checks for issues with accessing debug probes from multiple processes and threads simultaneously. (Not run by <code class="highlighter-rouge">automated_test.py</code>.)</li>
263+
<li><code class="highlighter-rouge">probeserver_test.py</code>: verify remote probe server and client.</li>
257264
<li><code class="highlighter-rouge">speed_test.py</code>: performance test for memory reads and writes.</li>
265+
<li><code class="highlighter-rouge">user_script_test.py</code>: verify loading of user scripts.</li>
258266
</ul>
259267

268+
<h2 id="azure-pipelines">Azure Pipelines</h2>
269+
270+
<p>PyOCD uses Azure Pipelines to run the CI tests for commits and pull requests. The pipeline runs the functional tests on
271+
a set of test machines, called self-hosted test agents in Azure Pipelines parlance. There is one each of Mac, Linux, and
272+
Windows test agents.</p>
273+
274+
<p>The complete results from pipeline runs are <a href="https://dev.azure.com/pyocd/pyocd/_build?definitionId=1&amp;_a=summary">publicly
275+
accessible</a>.</p>
276+
277+
<p>For pull requests, a pyOCD team member or collaborator must manually initiate the pipeline run by entering a special
278+
comment of the form “/azp run” or “/AzurePipelines run”.</p>
279+
260280
<h2 id="testing-with-tox">Testing with tox</h2>
261281

262282
<p>pyOCD includes a configuration file for tox that enables easy testing of multiple Python versions.

docs/command_reference.html

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ <h5 class="sidebar-header">On this page</h5>
282282
<li class="toc-entry toc-h5"><a href="#init">init</a></li>
283283
</ul>
284284
</li>
285+
<li class="toc-entry toc-h3"><a href="#probe">Probe</a>
286+
<ul>
287+
<li class="toc-entry toc-h5"><a href="#flushprobe">flushprobe</a></li>
288+
</ul>
289+
</li>
285290
<li class="toc-entry toc-h3"><a href="#registers">Registers</a>
286291
<ul>
287292
<li class="toc-entry toc-h5"><a href="#reg">reg</a></li>
@@ -690,20 +695,31 @@ <h2 id="all-commands">All commands</h2>
690695
Ignored; for OpenOCD compatibility.
691696
</td></tr>
692697

698+
<tr><td colspan="3"><b>Probe</b></td></tr>
699+
700+
<tr><td>
701+
<a href="#flushprobe"><tt>flushprobe</tt></a>
702+
</td><td>
703+
</td><td>
704+
Ensure all debug probe requests have been completed.
705+
</td></tr>
706+
693707
<tr><td colspan="3"><b>Registers</b></td></tr>
694708

695709
<tr><td>
696-
<a href="#reg"><tt>reg</tt></a>
710+
<a href="#reg"><tt>reg</tt></a>,
711+
<a href="#reg"><tt>rr</tt></a>
697712
</td><td>
698-
[-f] [REG]
713+
[-p] [-f] [REG...]
699714
</td><td>
700715
Print core or peripheral register(s).
701716
</td></tr>
702717

703718
<tr><td>
704-
<a href="#wreg"><tt>wreg</tt></a>
719+
<a href="#wreg"><tt>wreg</tt></a>,
720+
<a href="#wreg"><tt>wr</tt></a>
705721
</td><td>
706-
[-r] REG VALUE
722+
[-r] [-p] [-f] REG VALUE
707723
</td><td>
708724
Set the value of a core or peripheral register.
709725
</td></tr>
@@ -1198,17 +1214,26 @@ <h5 id="init"><code class="highlighter-rouge">init</code></h5>
11981214
<p><strong>Usage</strong>: init <br />
11991215
Ignored; for OpenOCD compatibility.</p>
12001216

1217+
<h3 id="probe">Probe</h3>
1218+
1219+
<h5 id="flushprobe"><code class="highlighter-rouge">flushprobe</code></h5>
1220+
1221+
<p><strong>Usage</strong>: <br />
1222+
Ensure all debug probe requests have been completed.</p>
1223+
12011224
<h3 id="registers">Registers</h3>
12021225

12031226
<h5 id="reg"><code class="highlighter-rouge">reg</code></h5>
12041227

1205-
<p><strong>Usage</strong>: [-f] [REG] <br />
1206-
Print core or peripheral register(s). If no arguments are provided, all core registers will be printed. Either a core register name, the name of a peripheral, or a peripheral.register can be provided. When a peripheral name is provided without a register, all registers in the peripheral will be printed. If the -f option is passed, then individual fields of peripheral registers will be printed in addition to the full value.</p>
1228+
<p><strong>Aliases</strong>: <code class="highlighter-rouge">rr</code> <br />
1229+
<strong>Usage</strong>: [-p] [-f] [REG…] <br />
1230+
Print core or peripheral register(s). If no arguments are provided, the ‘general’ core register group will be printed. Either a core register name, the name of a peripheral, or a peripheral.register can be provided. When a peripheral name is provided without a register, all registers in the peripheral will be printed. The -p option forces evaluating the register name as a peripheral register name. If the -f option is passed, then individual fields of peripheral registers will be printed in addition to the full value.</p>
12071231

12081232
<h5 id="wreg"><code class="highlighter-rouge">wreg</code></h5>
12091233

1210-
<p><strong>Usage</strong>: [-r] REG VALUE <br />
1211-
Set the value of a core or peripheral register. The REG parameter must be a core register name or a peripheral.register. When a peripheral register is written, if the -r option is passed then it is read back and the updated value printed.</p>
1234+
<p><strong>Aliases</strong>: <code class="highlighter-rouge">wr</code> <br />
1235+
<strong>Usage</strong>: [-r] [-p] [-f] REG VALUE <br />
1236+
Set the value of a core or peripheral register. The REG parameter must be a core register name or a peripheral.register. When a peripheral register is written, if the -r option is passed then it is read back and the updated value printed. The -p option forces evaluating the register name as a peripheral register name. If the -f option is passed, then individual fields of peripheral registers will be printed in addition to the full value.</p>
12121237

12131238
<h3 id="semihosting">Semihosting</h3>
12141239

docs/configuring_logging.html

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ <h5 class="sidebar-header">On this page</h5>
206206
<li class="toc-entry toc-h2"><a href="#overview">Overview</a></li>
207207
<li class="toc-entry toc-h2"><a href="#log-levels">Log levels</a></li>
208208
<li class="toc-entry toc-h2"><a href="#basic-control">Basic control</a></li>
209+
<li class="toc-entry toc-h2"><a href="#color-logging">Color logging</a></li>
209210
<li class="toc-entry toc-h2"><a href="#loggers">Loggers</a>
210211
<ul>
211212
<li class="toc-entry toc-h3"><a href="#trace-loggers">Trace loggers</a></li>
@@ -289,6 +290,10 @@ <h2 id="log-levels">Log levels</h2>
289290
<td><code class="highlighter-rouge">reset</code></td>
290291
<td>WARNING</td>
291292
</tr>
293+
<tr>
294+
<td><code class="highlighter-rouge">rtt</code></td>
295+
<td>INFO</td>
296+
</tr>
292297
<tr>
293298
<td><code class="highlighter-rouge">server</code></td>
294299
<td>INFO</td>
@@ -303,6 +308,17 @@ <h2 id="basic-control">Basic control</h2>
303308
logging verbosity level. For example, a single <code class="highlighter-rouge">--verbose</code> moves <code class="highlighter-rouge">pyocd flash</code> from the default
304309
level of WARNING to INFO.</p>
305310

311+
<h2 id="color-logging">Color logging</h2>
312+
313+
<p>By default, log output to a tty is colorised. Control over colorised log output is possible two ways.</p>
314+
315+
<p>The command-line <code class="highlighter-rouge">--color</code> argument accepts an optional parameter that must be one of <code class="highlighter-rouge">auto</code>, <code class="highlighter-rouge">always</code>, or <code class="highlighter-rouge">never</code>.
316+
The default is <code class="highlighter-rouge">auto</code>, which will enable color only when outputting to a tty.</p>
317+
318+
<p>Another option for controlling color output is the <code class="highlighter-rouge">PYOCD_COLOR</code> environment variable. It should be set to one of the
319+
same values supported by <code class="highlighter-rouge">--color</code>. This environment variable changes the default color output setting, and is
320+
overridden by <code class="highlighter-rouge">--color</code> on the command line.</p>
321+
306322
<h2 id="loggers">Loggers</h2>
307323

308324
<p>Each module in pyOCD uses its own module-specific logger with a name matching the dotted module
@@ -316,7 +332,7 @@ <h2 id="loggers">Loggers</h2>
316332
<h3 id="trace-loggers">Trace loggers</h3>
317333

318334
<p>Certain modules define additional sub-module loggers that output debug trace logs. These loggers always have the
319-
suffix “.trace” and are set to critical log level by default.</p>
335+
suffix “.trace” and are disabled by default. This ensures the trace messages won’t be seen unless explicitly enabled by the <code class="highlighter-rouge">--log-level</code> / <code class="highlighter-rouge">-L</code> argument described in the following section.</p>
320336

321337
<p>Currently defined trace loggers:</p>
322338

@@ -356,6 +372,22 @@ <h3 id="trace-loggers">Trace loggers</h3>
356372
<td><code class="highlighter-rouge">pyocd.probe.pydapaccess.dap_access_cmsis_dap.trace</code></td>
357373
<td>CMSIS-DAP packet building</td>
358374
</tr>
375+
<tr>
376+
<td><code class="highlighter-rouge">pyocd.probe.pydapaccess.interface.hidapi_backend.trace</code></td>
377+
<td>CMSIS-DAP v1 hidapi backend USB transfers</td>
378+
</tr>
379+
<tr>
380+
<td><code class="highlighter-rouge">pyocd.probe.pydapaccess.interface.pyusb_backend.trace</code></td>
381+
<td>CMSIS-DAP v1 pyusb backend USB transfers</td>
382+
</tr>
383+
<tr>
384+
<td><code class="highlighter-rouge">pyocd.probe.pydapaccess.interface.pyusb_v2_backend.trace</code></td>
385+
<td>CMSIS-DAP v2 pyusb backend USB transfers</td>
386+
</tr>
387+
<tr>
388+
<td><code class="highlighter-rouge">pyocd.probe.pydapaccess.interface.pywinusb_backend.trace</code></td>
389+
<td>CMSIS-DAP v1 pywinusb backend USB transfers</td>
390+
</tr>
359391
<tr>
360392
<td><code class="highlighter-rouge">pyocd.probe.stlink.usb.trace</code></td>
361393
<td>STLink USB transfers</td>

0 commit comments

Comments
 (0)