ulink_cmd is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

ulink_cmd struct

OpenULINK command (OpenULINK command queue element). For the OUT direction payload, things are quite easy: Payload is stored in a rather small array (up to 63 bytes), the payload is always allocated by the function generating the command and freed by ulink_clear_queue(). For the IN direction payload, things get a little bit more complicated: The maximum IN payload size for a single command is 64 bytes. Assume that a single OpenOCD command needs to scan 256 bytes. This results in the generation of four OpenULINK commands. The function generating these commands shall allocate an uint8_t[256] array. Each command's #payload_in pointer shall point to the corresponding offset where IN data shall be placed, while #payload_in_start shall point to the first element of the 256 byte array. - first command: #payload_in_start + 0 - second command: #payload_in_start + 64 - third command: #payload_in_start + 128 - fourth command: #payload_in_start + 192 The last command sets #needs_postprocessing to true.

Syntax

struct ulink_cmd {     uint8_t id;                 uint8_t *payload_out;             uint8_t payload_out_size;         uint8_t *payload_in_start;         uint8_t *payload_in;             uint8_t payload_in_size;         bool needs_postprocessing;     bool free_payload_in_start;     struct jtag_command *cmd_origin;     struct ulink_cmd *next;         };

Fields

id

ULINK command ID. Read more...

payload_out

OUT direction payload data. Read more...

payload_out_size

OUT direction payload size for this command. Read more...

payload_in_start

Pointer to first element of IN payload array. Read more...

payload_in

Pointer where IN payload shall be stored. Read more...

payload_in_size

IN direction payload size for this command. Read more...

needs_postprocessing

Indicates if this command needs post-processing. Read more...

free_payload_in_start

Indicates if ulink_clear_queue() should free payload_in_start. Read more...

cmd_origin

Pointer to corresponding OpenOCD command for post-processing. Read more...

next

Pointer to next command (linked list). Read more...

References

LocationReferrerScopeText
ulink.c:111
struct ulink_cmd {
ulink.c:130ulink_cmd::nextulink_cmd
struct ulink_cmd *next; /**< Pointer to next command (linked list) */
ulink.c:149ulink::queue_startulink
struct ulink_cmd *queue_start; /**< Pointer to first command in queue */
ulink.c:150ulink::queue_endulink
struct ulink_cmd *queue_end; /**< Pointer to last command in queue */
ulink.c:171ulink_allocate_payload()::ulink_cmdulink_allocate_payload()
static int ulink_allocate_payload(struct ulink_cmd *ulink_cmd, int size,
ulink.c:178ulink_append_queue()::ulink_cmdulink_append_queue()
static int ulink_append_queue(struct ulink *device, struct ulink_cmd *ulink_cmd);
ulink.c:226ulink_post_process_scan()::ulink_cmdulink_post_process_scan()
static int ulink_post_process_scan(struct ulink_cmd *ulink_cmd);
ulink.c:513ulink_allocate_payload()
static int ulink_allocate_payload(struct ulink_cmd *ulink_cmd, int size,
ulink.c:570ulink_get_queue_size()
struct ulink_cmd *current = device->queue_start;
ulink.c:596ulink_clear_queue()
struct ulink_cmd *current = device->queue_start;
ulink.c:597ulink_clear_queue()
struct ulink_cmd *next = NULL;
ulink.c:616ulink_clear_queue()
free(current);
ulink.c:636ulink_append_queue()
static int ulink_append_queue(struct ulink *device, struct ulink_cmd *ulink_cmd)
ulink.c:690ulink_execute_queued_commands()
struct ulink_cmd *current;
ulink.c:797ulink_print_command()
static void ulink_print_command(struct ulink_cmd *ulink_cmd)
ulink.c:817ulink_print_queue()
struct ulink_cmd *current;
ulink.c:860ulink_append_scan_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:872ulink_append_scan_cmd()
free(cmd);
ulink.c:912ulink_append_scan_cmd()
free(cmd);
ulink.c:959ulink_append_clock_tms_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:973ulink_append_clock_tms_cmd()
free(cmd);
ulink.c:995ulink_append_clock_tck_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:1009ulink_append_clock_tck_cmd()
free(cmd);
ulink.c:1028ulink_append_get_signals_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:1041ulink_append_get_signals_cmd()
free(cmd);
ulink.c:1068ulink_append_set_signals_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:1080ulink_append_set_signals_cmd()
free(cmd);
ulink.c:1100ulink_append_sleep_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:1112ulink_append_sleep_cmd()
free(cmd);
ulink.c:1137ulink_append_configure_tck_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:1149ulink_append_configure_tck_cmd()
free(cmd);
ulink.c:1198ulink_append_led_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:1209ulink_append_led_cmd()
free(cmd);
ulink.c:1228ulink_append_test_cmd()
struct ulink_cmd *cmd = calloc(1, sizeof(struct ulink_cmd));
ulink.c:1239ulink_append_test_cmd()
free(cmd);
ulink.c:1820ulink_post_process_scan()
static int ulink_post_process_scan(struct ulink_cmd *ulink_cmd)
ulink.c:1853ulink_post_process_queue()
struct ulink_cmd *current;

Type Use

Variables of ulink_cmd type
ulink_get_queue_size()::current
ulink_clear_queue()::current
ulink_clear_queue()::next
ulink_execute_queued_commands()::current
ulink_print_queue()::current
ulink_append_scan_cmd()::cmd
ulink_append_clock_tms_cmd()::cmd
ulink_append_clock_tck_cmd()::cmd
ulink_append_get_signals_cmd()::cmd
ulink_append_set_signals_cmd()::cmd
ulink_append_sleep_cmd()::cmd
ulink_append_configure_tck_cmd()::cmd
ulink_append_led_cmd()::cmd
ulink_append_test_cmd()::cmd
ulink_post_process_queue()::current
all items filtered out
ulink_cmd