|
|
@@ -2685,188 +2685,6 @@ __SWO_pinlocation = 0;
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
|
-\anchor DebugVars <b>Debug Access Variables</b>
|
|
|
-
|
|
|
-Debug access variables hold 64-bit unsigned integer values and are used in debug access
|
|
|
-sequences to query debugger settings and states. They are <b>read-only</b> within a
|
|
|
-sequence except from a limited set of the \ref PredefinedDebugVars "pre-defined debug access variables".
|
|
|
-Use the <b>debugvars</b> element to specify additional user-defined debug access variables.
|
|
|
-
|
|
|
-
|
|
|
-\anchor PredefinedDebugVars <b>Table: Pre-defined Debug Access Variables</b><br>
|
|
|
-A debugger needs to support a set of pre-defined debug access variables. These are
|
|
|
-described in the following table.
|
|
|
-
|
|
|
-<table class="cmtable" summary="ExpressionType: Pre-defined Debug Access Variables">
|
|
|
- <tr>
|
|
|
- <th>Variable</th>
|
|
|
- <th>Access</th>
|
|
|
- <th>Description</th>
|
|
|
- <th>Value=</th>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__protocol</pre></td>
|
|
|
- <td>Read-Only</td>
|
|
|
- <td>
|
|
|
- Debug protocol selection and parameters for target connection.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- The following bit map applies:<br>
|
|
|
- - Bit 0..15: Type
|
|
|
- - \token{0}: Error<br>
|
|
|
- - \token{1}: JTAG<br>
|
|
|
- - \token{2}: Serial Wire Debug (SWD)<br>
|
|
|
- - \token{3}: CJTAG<br>
|
|
|
- - Bit 16: SWJ-DP
|
|
|
- - Bit 17..63: Reserved
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__connection</pre></td>
|
|
|
- <td>Read-Only</td>
|
|
|
- <td>
|
|
|
- Target connection configuration.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- The following bit map applies:<br>
|
|
|
- - Bit 0..7: Connection type
|
|
|
- - \token{0}: Error or target is disconnected.
|
|
|
- - \token{1}: Connection for target debug.
|
|
|
- - \token{2}: Connection for downloading application to flash.
|
|
|
- - Bit 8..15: Reset type
|
|
|
- - \token{0}: Error.
|
|
|
- - \token{1}: Hardware Reset (debugger reset line).
|
|
|
- - \token{2}: System Reset Request.
|
|
|
- - \token{3}: Processor Reset Request ("Vector Reset").
|
|
|
- - Bit 16: Connection under Hardware Reset (debugger reset line)
|
|
|
- - Bit 17..63: Reserved
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__dp</pre></td>
|
|
|
- <td>Read/Write</td>
|
|
|
- <td>
|
|
|
- Debug Port selected for target accesses.<br>
|
|
|
- This variable is initialized when entering a pre-defined debug access
|
|
|
- sequence on a debug event. The initialization value
|
|
|
- is the <b>__dp</b> as defined for the used <b>debug</b> element.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- Debug port ID as specified in a <b>debugport</b> element or
|
|
|
- \token{0} if no <b>debugport</b> element exists.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__ap</pre></td>
|
|
|
- <td>Read/Write</td>
|
|
|
- <td>
|
|
|
- Access Port selected for target accesses.<br>
|
|
|
- This variable is initialized when entering a pre-defined debug access
|
|
|
- sequence on a debug event. The initialization value
|
|
|
- is the <b>__ap</b> as defined for the used <b>debug</b> element.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- Access Port index.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__traceout</pre></td>
|
|
|
- <td>Read-Only</td>
|
|
|
- <td>
|
|
|
- Activated trace outputs (sinks). Additionally holds information on the selected port width if
|
|
|
- a parallel trace port is enabled.
|
|
|
- </td>
|
|
|
- <td style="white-space: nowrap">
|
|
|
- The following bit map applies:<br>
|
|
|
- - Bit 0: Serial Wire Output (SWO) Trace enabled.
|
|
|
- - Bit 1: Parallel Trace Port enabled.
|
|
|
- - Bit 2: Trace Buffer enabled.
|
|
|
- - Bit 3..15: Reserved.
|
|
|
- - Bit 16..21: Selected Parallel Trace Port size.
|
|
|
- - Bit 22..63: Reserved.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__errorcontrol</pre></td>
|
|
|
- <td>Read/Write</td>
|
|
|
- <td>
|
|
|
- Control variable for debug access error handling. All of its bit
|
|
|
- fields are intialized to \token{0} when entering a pre-defined
|
|
|
- debug access sequence because of a debug event.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- The following bit map applies:<br>
|
|
|
- - Bit 0: Skip errors if set to \token{1}. A debugger must
|
|
|
- continue the sequence execution.
|
|
|
- - Bit 1..63: Reserved
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__Result</pre></td>
|
|
|
- <td>Read/Write</td>
|
|
|
- <td>
|
|
|
- Sequence result. A debugger sets this variable to \token{0} before it calls a sequence.
|
|
|
- The sequence implementation sets it to its result.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- The following values apply:<br>
|
|
|
- - 0: Success
|
|
|
- - (-1): Error
|
|
|
- All other values are reserved.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__FlashOp</pre></td>
|
|
|
- <td>Read-Only</td>
|
|
|
- <td>
|
|
|
- Type of the currently executed Flash operation. A debugger sets this value to \token{0}
|
|
|
- if the executed sequence is not part of a Flash operation.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- The following values apply:<br>
|
|
|
- - 0: No flash operation
|
|
|
- - 1: Erase full chip
|
|
|
- - 2: Erase flash sector
|
|
|
- - 3: Program flash
|
|
|
- All other values are reserved.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__FlashAddr</pre></td>
|
|
|
- <td>Read-Only</td>
|
|
|
- <td>
|
|
|
- Start address for the current Flash operation. A debugger sets this value to \token{0}
|
|
|
- if the executed sequence is not part of a Flash operation.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- Memory-mapped target address the currently programmed \ref element_flashblock "block" is visible at.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__FlashLen</pre></td>
|
|
|
- <td>Read-Only</td>
|
|
|
- <td>
|
|
|
- Flash buffer length for the current flash operation. A debugger sets this value to \token{0}
|
|
|
- if the executed sequence is not part of a flash operation.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>__FlashArg</pre></td>
|
|
|
- <td>Read-Only</td>
|
|
|
- <td>
|
|
|
- Argument for the flash operation as specified in \ref element_flashblock "block". A debugger sets this value to \token{0}
|
|
|
- if the executed sequence is not part of a flash operation.
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- The argument encoding is specific to the debug description for the target device.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
-</table>
|
|
|
-
|
|
|
-<p> </p>
|
|
|
-
|
|
|
<hr>
|
|
|
|
|
|
\section element_debugport /package/devices/family/.../debugport
|
|
|
@@ -3652,474 +3470,6 @@ An expression may consist of the following:
|
|
|
- XML prohibits the use of the characters \token{&}, \token{<}, and \token{>}. Use the corresponding
|
|
|
XML entity names instead: \token{&amp;}, \token{&lt;}, and \token{&gt;}.
|
|
|
|
|
|
-<p> </p>
|
|
|
-
|
|
|
-\anchor DebugFunctions <b>Table: Debug Access Functions</b>
|
|
|
-
|
|
|
-Debug access functions can be called in expressions in order to interact with the target device
|
|
|
-and the user. Parameters to functions can again be expressions.<br>
|
|
|
-By default, a debugger must abort the execution of a debug access sequence if a function call fails.
|
|
|
-However, this behavior can be controlled from a sequence by the <b>__errorcontrol</b>
|
|
|
-\ref DebugVars "debug access variable".<br>
|
|
|
-<br>
|
|
|
-The following table describes the existing debug access functions, their parameters and the
|
|
|
-debug access variables which are evaluated for the function call.
|
|
|
-
|
|
|
-<table class="cmtable" summary="ExpressionType: debug access functions">
|
|
|
- <tr>
|
|
|
- <th>Function</th>
|
|
|
- <th>Description</th>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Sequence("name")</pre></td>
|
|
|
- <td>
|
|
|
- Execute a debug access sequence.
|
|
|
- Calling a sequence by this function causes the modifiable debug access variables <b>__dp</b>,
|
|
|
- <b>__ap</b>, and <b>__errorcontrol</b> to be pushed on a sequence execution stack. Returning
|
|
|
- from such a call will restore the state of these variables.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - name: Name of the sequence to execute. It must be enclosed by quotes.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Read8(addr)</pre></td>
|
|
|
- <td>
|
|
|
- Read an 8-bit value from target memory.
|
|
|
- <b>A device must support native 8-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to read from.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The 8-bit value as read from target memory.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Read16(addr)</pre></td>
|
|
|
- <td>
|
|
|
- Read an 16-bit value from target memory.
|
|
|
- <b>A device must support native 16-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to read from.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The 16-bit value as read from target memory.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Read32(addr)</pre></td>
|
|
|
- <td>
|
|
|
- Read an 32-bit value from target memory.
|
|
|
- <b>A device must support native 32-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to read from.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The 32-bit value as read from target memory.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Read64(addr)</pre></td>
|
|
|
- <td>
|
|
|
- Read an 64-bit value from target memory.
|
|
|
- <b>A device must support native 64-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to read from.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The 64-bit value as read from target memory.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>ReadAP(addr)</pre></td>
|
|
|
- <td>
|
|
|
- Read a 32-bit value from an access port register.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: AP register address to read from. Addresses larger than \token{0xF} automatically cause
|
|
|
- an AP register bank switch.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The 32-bit value as read from the AP register.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>ReadDP(addr)</pre></td>
|
|
|
- <td>
|
|
|
- Read a 32-bit value from a debug port register.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: DP register address to read from.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The 32-bit value as read from the DP register.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Write8(addr, val)</pre></td>
|
|
|
- <td>
|
|
|
- Write an 8-bit value to target memory.
|
|
|
- <b>A device must support native 8-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to write to.
|
|
|
- - val: Value to write.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Write16(addr, val)</pre></td>
|
|
|
- <td>
|
|
|
- Write a 16-bit value to target memory.
|
|
|
- <b>A device must support native 16-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to write to.
|
|
|
- - val: Value to write.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Write32(addr, val)</pre></td>
|
|
|
- <td>
|
|
|
- Write a 32-bit value to target memory.
|
|
|
- <b>A device must support native 32-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to write to.
|
|
|
- - val: Value to write.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Write64(addr, val)</pre></td>
|
|
|
- <td>
|
|
|
- Write a 64-bit value to target memory.
|
|
|
- <b>A device must support native 64-bit memory accesses for this function to succeed.</b><br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to write to.
|
|
|
- - val: Value to write.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>WriteAP(addr, val)</pre></td>
|
|
|
- <td>
|
|
|
- Write a 32-bit value to an access port register.
|
|
|
- Addresses larger than 0xF automatically cause an AP register bank switch.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to write to.
|
|
|
- - val: Value to write.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
- - __ap: The access port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>WriteDP(addr, val)</pre></td>
|
|
|
- <td>
|
|
|
- Write a 32-bit value to a debug port register.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - addr: Memory address to write to.
|
|
|
- - val: Value to write.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>DAP_Delay(delay)</pre></td>
|
|
|
- <td>
|
|
|
- Debug probe command to wait for a specific delay.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - delay: Wait time in microseconds.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>DAP_WriteABORT(value)</pre></td>
|
|
|
- <td>
|
|
|
- Debug probe command to write an abort request to the CoreSight
|
|
|
- ABORT register of the target debug port.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - value: 32-bit value to write into the CoreSight ABORT register.
|
|
|
-
|
|
|
- <b>Debug Access Variables:</b><br>
|
|
|
- - __dp: The debug port to use for this memory access.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>DAP_SWJ_Pins(pinout, pinselect, pinwait)</pre></td>
|
|
|
- <td>
|
|
|
- Debug probe command to monitor and control the I/O Pins including the nRESET
|
|
|
- device reset line.<br>
|
|
|
- <b>I/O Pin Mapping</b> for <b>pinout</b>, <b>pinselect</b>, and <b>pinwait</b>:
|
|
|
- - Bit 0: SWCLK/TCK
|
|
|
- - Bit 1: SWDIO/TMS
|
|
|
- - Bit 2: TDI
|
|
|
- - Bit 3: TDO
|
|
|
- - Bit 5: nTRST
|
|
|
- - Bit 7: nRESET
|
|
|
-
|
|
|
- <br>
|
|
|
- The <b>pinwait</b> time is useful in systems where the nRESET pin is implemented as open-drain
|
|
|
- output. After nRESET is de-asserted by the debugger, external circuit may still hold the
|
|
|
- target Device under reset for a time. Using the <b>pinwait</b> time, the debugger may monitor
|
|
|
- selected I/O Pins and wait until they the expected value appears or a timeout expires.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - pinout: Value for selected output pins.
|
|
|
- - pinselect: Selects which output pins will be modified.
|
|
|
- - pinwait: Wait timeout for the selected output to stabilize. A debugger must extend this timeout
|
|
|
- to the closest possible time granularity.
|
|
|
- - 0 = no wait
|
|
|
- - 1 .. 3000000 = time in microseconds (max 3s)
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The state of the I/O Pins at the end of this operation. If a debugger is not
|
|
|
- capable of monitoring the I/O Pins, it must return a value of \token{0xFFFFFFFF}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>DAP_SWJ_Clock(val)</pre></td>
|
|
|
- <td>
|
|
|
- Debug probe command to set the clock frequency for JTAG and SWD communication mode.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - val: Maximum SWD/JTAG Clock (SWCLK/TCK) value in Hz.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>DAP_SWJ_Sequence(cnt, val)</pre></td>
|
|
|
- <td>
|
|
|
- Debug probe command to generate required SWJ sequences, for example, for SWD/JTAG Reset, SWD<->JTAG
|
|
|
- switch and Dormant operation.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - cnt: Number of bits in sequence: 1..64. Larger sequences need to be implemented by multiple
|
|
|
- subsequent <b>DAP_SWJ_Sequence</b> calls. Such a sequence of <b>DAP_SWJ_Sequence</b> commands
|
|
|
- must be encapsulated in an atomic <b>block</b> to ensure correct execution.
|
|
|
- - val: Sequence generated on SWDIO/TMS (with clock \@SWCLK/TCK), LSB transmitted first.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>DAP_JTAG_Sequence(cnt, tms, tdi)</pre></td>
|
|
|
- <td>
|
|
|
- Debug probe command to generate a JTAG sequence with fixed TMS value and capture TDO.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - cnt: Length of the JTAG sequence (number of TCK cycles and TDI bits): 1..64
|
|
|
- - tms: Fixed TMS value: 0..1
|
|
|
- - tdi: Data generated on TDI with one bit per TCK cycle, LSB transmitted first.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Data captured from TDO with one bit per TCK cycle, LSB captured first and padded with \token{0}s.
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Query(type, "message", default)</pre></td>
|
|
|
- <td>
|
|
|
- Query user input. The sequence execution stalls depending on the used <b>type</b>. If the
|
|
|
- debugger runs in a batch mode, this function returns the value <b>default</b>.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - type: Query type. Can be one of:
|
|
|
- - \token{0} : <b>Query_Ok</b>, displays an informative message which has to be confirmed by the user. This
|
|
|
- type allows the result <b>OK</b>.
|
|
|
- - \token{1} : <b>Query_YesNo</b>, displays a query with the allowed results <b>Yes</b> and <b>No</b>.
|
|
|
- - \token{2} : <b>Query_YesNoCancel</b>, displays a query with the allowed results <b>Yes</b>, <b>No</b>,
|
|
|
- and <b>Cancel</b>.
|
|
|
- - \token{3} : <b>Query_OkCancel</b>, displays a query with the allowed results <b>OK</b> and <b>Cancel</b>.
|
|
|
- - message: A constant string with the query message to display. It must not be an expression and it must be
|
|
|
- enclosed by quotes.
|
|
|
- - default: The default value to return if the debugger runs in batch mode. See <b>Return Values</b>
|
|
|
- for a list of allowed values.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The result of the query. The user input maps to the following numbers:
|
|
|
- - Error : \token{0}
|
|
|
- - OK : \token{1}
|
|
|
- - Cancel : \token{2}
|
|
|
- - Yes : \token{3}
|
|
|
- - No : \token{4}
|
|
|
-
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>QueryValue("message", default)</pre></td>
|
|
|
- <td>
|
|
|
- Query input value from user. The sequence execution stalls until the user has entered a value or canceled the query.
|
|
|
- This function returns the <b>default</b> value if the user canceled the query or if the debugger runs in a batch mode.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - message: A constant string with the query message to display. It must not be an expression and it must be
|
|
|
- enclosed by quotes.
|
|
|
- - default: The default value to return if the user cancels the query or if the debugger runs in batch mode.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- The queried value.
|
|
|
-
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>Message(type, "format", ...)</pre></td>
|
|
|
- <td>
|
|
|
- Outputs a message to a log window.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - type: Message type. Can be one of:
|
|
|
- - \token{0} : <b>Info</b>, outputs an informative message.
|
|
|
- - \token{1} : <b>Warning</b>, outputs a warning.
|
|
|
- - \token{2} : <b>Error</b>, outputs an error. Sequence execution aborts.
|
|
|
- - format: A constant string with the message format. It must not be an expression and it must be
|
|
|
- enclosed by quotes. The string has the following format:<br>
|
|
|
- \code
|
|
|
- %[flags][width][.precision]specifier
|
|
|
- \endcode
|
|
|
- - Specifiers:
|
|
|
- - \token{\%u}: 32-bit unsigned decimal integer.
|
|
|
- - \token{\%llu}: 64-bit unsigned decimal integer.
|
|
|
- - \token{\%x}: 32-bit unsigned hexadecimal integer, lower case letters.
|
|
|
- - \token{\%llx}: 64-bit unsigned hexadecimal integer, lower case letters.
|
|
|
- - \token{\%X}: 32-bit unsigned hexadecimal integer, upper case letters.
|
|
|
- - \token{\%llX}: 64-bit unsigned hexadecimal integer, upper case letters.
|
|
|
- - \token{\%o}: 32-bit unsigned octal integer.
|
|
|
- - \token{\%llo}: 64-bit unsigned octal integer.
|
|
|
- - \token{\%b}: 32-bit unsigned binary integer.
|
|
|
- - \token{\%llb}: 64-bit unsigned binary integer.
|
|
|
- - \token{\%f}: Single-precision (32-bit) floating point value.
|
|
|
- - \token{\%Lf}: Double-precision (64-bit) floating point value.
|
|
|
- - \token{\%s}: Constant character string. Must not be an expression.
|
|
|
- - \token{\%\%}: Print \token{\%} character.
|
|
|
- - Flags:
|
|
|
- - \token{0}: Pad the displayed value with zeros instead of spaces if padding is required by
|
|
|
- the \token{width} option.
|
|
|
- - Width: Minimum number of displayed characters. If \token{width} is less than the number of characters
|
|
|
- of the value, then the value is padded with spaces to the left.
|
|
|
- - .Precision:
|
|
|
- - <b>Integer</b>: Minimum number of displayed digits. Padded with zeros to the left if the
|
|
|
- value has less digits than specified with \token{.precision}.
|
|
|
- - <b>Floating Point</b>: Number of displayed digits after decimal point. Defaults to \token{6}
|
|
|
- if not specified.
|
|
|
- - <b>Constant String</b>: Maximum number of displayed characters.
|
|
|
- - ... : Additional function parameters to replace format string specifiers. Each parameter can be
|
|
|
- a constant string, or an expression that resolves to an unsigned 64-bit integer. A parameter
|
|
|
- type must match the corresponding specifier type.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Always returns \token{0}.
|
|
|
-
|
|
|
- \note
|
|
|
- For 32-bit specifiers the <b>Message</b> command must print the lower 32 Bit of a 64 Bit debug access variable.
|
|
|
-
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="white-space: nowrap"><pre>LoadDebugInfo("file")</pre></td>
|
|
|
- <td>
|
|
|
- Loads DWARF debug information from an application executable.<br>
|
|
|
- <br>
|
|
|
- <b>Parameters:</b><br>
|
|
|
- - file: A constant string with the path to the executable. The path must be relative to the
|
|
|
- root folder of the pack and use the format <b>path/name.extension</b>. It must not be
|
|
|
- an expression and it must be enclosed by quotes.
|
|
|
-
|
|
|
- <b>Return Value:</b><br>
|
|
|
- Returns \token{0} after successful debug information load.<br>
|
|
|
- Returns \token{1} if debug information load failed.
|
|
|
-
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
-</table>
|
|
|
-
|
|
|
-\note
|
|
|
-- Target memory access functions must perform a debug access of the size indicated by their name.
|
|
|
- The target system must support debug accesses of this size.
|
|
|
-- Results of all functions are casted to 64-bit unsigned integer values.
|
|
|
-- Some target access functions determine the used debug and access port by the current values of
|
|
|
- the <b>__dp</b> and <b>__ap</b> debug access variables. If a target access requires a different
|
|
|
- debug or access port than the default ones, it must change these values. This change is held
|
|
|
- until finishing the sequence the change has occurred in.
|
|
|
-
|
|
|
-\delim
|
|
|
-
|
|
|
\section element_debug /package/devices/family/.../debug
|
|
|
|
|
|
Describes configuration settings, default values, and patches for data accesses for a debug connection. Multiple <b>debug</b>
|