You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reset the target, optionally specifying the reset type. The reset type must be one of ‘default’, ‘hw’, ‘sw’, ‘hardware’, ‘software’, ‘sw_sysresetreq’, ‘sw_vectreset’, ‘sw_emulated’, ‘sysresetreq’, ‘vectreset’, or ‘emulated’.</p>
1218
+
Reset the target, optionally with halt and/or specifying the reset type. The reset type must be one of ‘default’, ‘hw’, ‘sw’, ‘hardware’, ‘software’, ‘system’, ‘core’, ‘emulated’, ‘sw_system’, ‘sw_core’, ‘sw_sysresetreq’, ‘sw_vectreset’, ‘sw_emulated’, ‘sysresetreq’, or ‘vectreset’.</p>
<strong>Usage</strong>: wreg [-r] [-p] [-f] REG VALUE <br/>
1289
1358
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>
<strong>Usage</strong>: show pins, set pins VALUE <br/>
1540
+
Current debug probe protocol I/O pin states. The pins value is a mask containing the state of all accessible protocol pins. See the <codeclass="highlighter-rouge">accessible-pins</code> value for protocol pins that can be read and written by the connected debug probe.</p>
Copy file name to clipboardExpand all lines: docs/multicore_debug.html
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -217,30 +217,28 @@ <h5 class="sidebar-header">On this page</h5>
217
217
</div>
218
218
219
219
<p>pyOCD supports debugging multicore devices. It does this by serving one gdb server per core, to which
220
-
you connect independant gdb instances. This is the most reliable method of debugging multicore
221
-
embedded devices using gdb.</p>
220
+
independent gdb instances are connected. This is the most reliable method of debugging asymmetric multicore
221
+
devices using gdb.</p>
222
222
223
-
<p><codeclass="highlighter-rouge">pyocd gdbserver</code> automatically creates one <codeclass="highlighter-rouge">GDBServer</code> instance per core. The first core is given the
224
-
user-specified port number. Additional cores have port numbers incremented from there.</p>
223
+
<p><codeclass="highlighter-rouge">pyocd gdbserver</code> automatically creates one gdb server instance per core by default. The primary core is given the user-specified port number. Additional cores have port numbers incremented from there. If a gdb server for only one or a subset of cores is desired, the <codeclass="highlighter-rouge">--core</code> command line argument can be used with a list of core numbers.</p>
225
224
226
-
<p>To prevent reset requests from multiple connected gdb instances causing havoc, secondary cores have
227
-
their default reset type set to core-only reset (VECTRESET), which will fall back to an emulated
228
-
reset for non-v7-M architectures. This feature can be disabled by setting the
229
-
<codeclass="highlighter-rouge">enable_multicore_debug</code> session option to false.</p>
225
+
<p>By default, the primary core is core number 0. For Arm CoreSight based devices, this will be the core with the lowest associated access port address. Use the <codeclass="highlighter-rouge">primary_core</code> session option to change the primary core.</p>
226
+
227
+
<p>When performing multicore debug where multiple gdb instances are connected simultaneously, it is important to set the <codeclass="highlighter-rouge">enable_multicore_debug</code> session option to true. This changes secondary cores to have their default reset type set to core-only reset (<codeclass="highlighter-rouge">sw_core</code>). This prevents competing reset requests from the multiple gdb instances causing havoc. On v7-M architecture cores, VECTRESET is used. However, VECTRESET is not supported on other core architecture, so non-v7-M architectures will fall back to an emulated core reset.</p>
230
228
231
229
<p>To debug a multicore device, run <codeclass="highlighter-rouge">pyocd gdbserver</code> as usual. This will connect to the device, detect
232
230
the cores, and create the gdb server instances on separate ports. Next, start up two gdb instances
233
231
and connect to the two gdb server ports. For instance, on a dual core device if you pass 3333 for
234
-
the port, connect to port 3333 for the first core and port 3334 for the second core.</p>
232
+
the port (or leave it set to default), connect to port 3333 for the first core and port 3334 for the second core.</p>
235
233
236
234
<p>On many devices, secondary cores are by default held in reset until released by the primary core.
237
235
Because gdb does not have a concept of a core held in reset, pyOCD will report a core held in reset
238
236
by telling gdb that there is a single thread with the name “Reset”. This is visible if you run the
239
-
show threads gdb command, and will appear in the Eclipe Debug view’s list of threads. All register
237
+
show threads gdb command, and will appear in the VSCode or Eclipse Debug view’s list of threads. All register
240
238
values will be reported as 0 until the core is released from reset.</p>
241
239
242
-
<p>Usually you want to have the primary core load code for the secondary core, so configure the second
243
-
core’s gdb to not load any code to the target. This is highly device-specific, though, and may
240
+
<p>Usually you want to have the primary core load code and/or configure the reset vector for secondary cores prior to releasing those cores from reset. For this situation, configure the second
241
+
core’s gdb to not load any code to the target. This usage is highly device-specific, though, and may
244
242
depend on whether the secondary core’s code is running out of flash or RAM.</p>
0 commit comments