OpenOCD
FreeRTOS.c
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 /***************************************************************************
4  * Copyright (C) 2011 by Broadcom Corporation *
5  * Evan Hunter - ehunter@broadcom.com *
6  ***************************************************************************/
7 
8 #ifdef HAVE_CONFIG_H
9 #include "config.h"
10 #endif
11 
12 #include <helper/time_support.h>
13 #include <jtag/jtag.h>
14 #include "target/target.h"
15 #include "rtos.h"
16 #include "helper/log.h"
17 #include "helper/types.h"
19 #include "target/armv7m.h"
20 #include "target/cortex_m.h"
21 
22 #define FREERTOS_MAX_PRIORITIES 63
23 
24 /* FIXME: none of the _width parameters are actually observed properly!
25  * you WILL need to edit more if you actually attempt to target a 8/16/64
26  * bit target!
27  */
28 
30  const char *target_name;
31  const unsigned char thread_count_width;
32  const unsigned char pointer_width;
33  const unsigned char list_next_offset;
34  const unsigned char list_width;
35  const unsigned char list_elem_next_offset;
36  const unsigned char list_elem_content_offset;
37  const unsigned char thread_stack_offset;
38  const unsigned char thread_name_offset;
42 };
43 
44 static const struct freertos_params freertos_params_list[] = {
45  {
46  "cortex_m", /* target_name */
47  4, /* thread_count_width; */
48  4, /* pointer_width; */
49  16, /* list_next_offset; */
50  20, /* list_width; */
51  8, /* list_elem_next_offset; */
52  12, /* list_elem_content_offset */
53  0, /* thread_stack_offset; */
54  52, /* thread_name_offset; */
55  &rtos_standard_cortex_m3_stacking, /* stacking_info */
58  },
59  {
60  "hla_target", /* target_name */
61  4, /* thread_count_width; */
62  4, /* pointer_width; */
63  16, /* list_next_offset; */
64  20, /* list_width; */
65  8, /* list_elem_next_offset; */
66  12, /* list_elem_content_offset */
67  0, /* thread_stack_offset; */
68  52, /* thread_name_offset; */
69  &rtos_standard_cortex_m3_stacking, /* stacking_info */
72  },
73 };
74 
75 static bool freertos_detect_rtos(struct target *target);
76 static int freertos_create(struct target *target);
77 static int freertos_update_threads(struct rtos *rtos);
78 static int freertos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
79  struct rtos_reg **reg_list, int *num_regs);
80 static int freertos_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]);
81 
82 const struct rtos_type freertos_rtos = {
83  .name = "FreeRTOS",
84 
85  .detect_rtos = freertos_detect_rtos,
86  .create = freertos_create,
87  .update_threads = freertos_update_threads,
88  .get_thread_reg_list = freertos_get_thread_reg_list,
89  .get_symbol_list_to_lookup = freertos_get_symbol_list_to_lookup,
90 };
91 
105 };
106 
107 struct symbols {
108  const char *name;
109  bool optional;
110 };
111 
112 static const struct symbols freertos_symbol_list[] = {
113  { "pxCurrentTCB", false },
114  { "pxReadyTasksLists", false },
115  { "xDelayedTaskList1", false },
116  { "xDelayedTaskList2", false },
117  { "pxDelayedTaskList", false },
118  { "pxOverflowDelayedTaskList", false },
119  { "xPendingReadyList", false },
120  { "xTasksWaitingTermination", true }, /* Only if INCLUDE_vTaskDelete */
121  { "xSuspendedTaskList", true }, /* Only if INCLUDE_vTaskSuspend */
122  { "uxCurrentNumberOfTasks", false },
123  { "uxTopUsedPriority", true }, /* Unavailable since v7.5.3 */
124  { "xSchedulerRunning", false },
125  { NULL, false }
126 };
127 
128 /* TODO: */
129 /* this is not safe for little endian yet */
130 /* may be problems reading if sizes are not 32 bit long integers. */
131 /* test mallocs for failure */
132 
133 static int freertos_update_threads(struct rtos *rtos)
134 {
135  int retval;
136  unsigned int tasks_found = 0;
137  const struct freertos_params *param;
138 
140  return -1;
141 
142  param = (const struct freertos_params *) rtos->rtos_specific_params;
143 
144  if (!rtos->symbols) {
145  LOG_ERROR("No symbols for FreeRTOS");
146  return -3;
147  }
148 
150  LOG_ERROR("Don't have the number of threads in FreeRTOS");
151  return -2;
152  }
153 
154  uint32_t thread_list_size = 0;
155  retval = target_read_u32(rtos->target,
157  &thread_list_size);
158  LOG_DEBUG("FreeRTOS: Read uxCurrentNumberOfTasks at 0x%" PRIx64 ", value %" PRIu32,
160  thread_list_size);
161 
162  if (retval != ERROR_OK) {
163  LOG_ERROR("Could not read FreeRTOS thread count from target");
164  return retval;
165  }
166 
167  /* wipe out previous thread details if any */
169 
170  /* read the current thread */
171  uint32_t pointer_casts_are_bad;
172  retval = target_read_u32(rtos->target,
174  &pointer_casts_are_bad);
175  if (retval != ERROR_OK) {
176  LOG_ERROR("Error reading current thread in FreeRTOS thread list");
177  return retval;
178  }
179  rtos->current_thread = pointer_casts_are_bad;
180  LOG_DEBUG("FreeRTOS: Read pxCurrentTCB at 0x%" PRIx64 ", value 0x%" PRIx64,
183 
184  /* read scheduler running */
185  uint32_t scheduler_running;
186  retval = target_read_u32(rtos->target,
188  &scheduler_running);
189  if (retval != ERROR_OK) {
190  LOG_ERROR("Error reading FreeRTOS scheduler state");
191  return retval;
192  }
193  LOG_DEBUG("FreeRTOS: Read xSchedulerRunning at 0x%" PRIx64 ", value 0x%" PRIx32,
195  scheduler_running);
196 
197  if ((thread_list_size == 0) || (rtos->current_thread == 0) || (scheduler_running != 1)) {
198  /* Either : No RTOS threads - there is always at least the current execution though */
199  /* OR : No current thread - all threads suspended - show the current execution
200  * of idling */
201  char tmp_str[] = "Current Execution";
202  thread_list_size++;
203  tasks_found++;
204  rtos->thread_details = malloc(
205  sizeof(struct thread_detail) * thread_list_size);
206  if (!rtos->thread_details) {
207  LOG_ERROR("Error allocating memory for %d threads", thread_list_size);
208  return ERROR_FAIL;
209  }
210  rtos->current_thread = 1;
212  rtos->thread_details->exists = true;
214  rtos->thread_details->thread_name_str = malloc(sizeof(tmp_str));
215  strcpy(rtos->thread_details->thread_name_str, tmp_str);
216 
217  if (thread_list_size == 1) {
218  rtos->thread_count = 1;
219  return ERROR_OK;
220  }
221  } else {
222  /* create space for new thread details */
223  rtos->thread_details = malloc(
224  sizeof(struct thread_detail) * thread_list_size);
225  if (!rtos->thread_details) {
226  LOG_ERROR("Error allocating memory for %d threads", thread_list_size);
227  return ERROR_FAIL;
228  }
229  }
230 
231  /* Find out how many lists are needed to be read from pxReadyTasksLists, */
233  LOG_ERROR("FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around");
234  return ERROR_FAIL;
235  }
236  uint32_t top_used_priority = 0;
237  retval = target_read_u32(rtos->target,
239  &top_used_priority);
240  if (retval != ERROR_OK)
241  return retval;
242  LOG_DEBUG("FreeRTOS: Read uxTopUsedPriority at 0x%" PRIx64 ", value %" PRIu32,
244  top_used_priority);
245  if (top_used_priority > FREERTOS_MAX_PRIORITIES) {
246  LOG_ERROR("FreeRTOS top used priority is unreasonably big, not proceeding: %" PRIu32,
247  top_used_priority);
248  return ERROR_FAIL;
249  }
250 
251  /* uxTopUsedPriority was defined as configMAX_PRIORITIES - 1
252  * in old FreeRTOS versions (before V7.5.3)
253  * Use contrib/rtos-helpers/FreeRTOS-openocd.c to get compatible symbol
254  * in newer FreeRTOS versions.
255  * Here we restore the original configMAX_PRIORITIES value */
256  unsigned int config_max_priorities = top_used_priority + 1;
257 
258  symbol_address_t *list_of_lists =
259  malloc(sizeof(symbol_address_t) * (config_max_priorities + 5));
260  if (!list_of_lists) {
261  LOG_ERROR("Error allocating memory for %u priorities", config_max_priorities);
262  return ERROR_FAIL;
263  }
264 
265  unsigned int num_lists;
266  for (num_lists = 0; num_lists < config_max_priorities; num_lists++)
267  list_of_lists[num_lists] = rtos->symbols[FREERTOS_VAL_PX_READY_TASKS_LISTS].address +
268  num_lists * param->list_width;
269 
270  list_of_lists[num_lists++] = rtos->symbols[FREERTOS_VAL_X_DELAYED_TASK_LIST1].address;
271  list_of_lists[num_lists++] = rtos->symbols[FREERTOS_VAL_X_DELAYED_TASK_LIST2].address;
272  list_of_lists[num_lists++] = rtos->symbols[FREERTOS_VAL_X_PENDING_READY_LIST].address;
273  list_of_lists[num_lists++] = rtos->symbols[FREERTOS_VAL_X_SUSPENDED_TASK_LIST].address;
274  list_of_lists[num_lists++] = rtos->symbols[FREERTOS_VAL_X_TASKS_WAITING_TERMINATION].address;
275 
276  for (unsigned int i = 0; i < num_lists; i++) {
277  if (list_of_lists[i] == 0)
278  continue;
279 
280  /* Read the number of threads in this list */
281  uint32_t list_thread_count = 0;
282  retval = target_read_u32(rtos->target,
283  list_of_lists[i],
284  &list_thread_count);
285  if (retval != ERROR_OK) {
286  LOG_ERROR("Error reading number of threads in FreeRTOS thread list");
287  free(list_of_lists);
288  return retval;
289  }
290  LOG_DEBUG("FreeRTOS: Read thread count for list %u at 0x%" PRIx64 ", value %" PRIu32,
291  i, list_of_lists[i], list_thread_count);
292 
293  if (list_thread_count == 0)
294  continue;
295 
296  /* Read the location of first list item */
297  uint32_t prev_list_elem_ptr = -1;
298  uint32_t list_elem_ptr = 0;
299  retval = target_read_u32(rtos->target,
300  list_of_lists[i] + param->list_next_offset,
301  &list_elem_ptr);
302  if (retval != ERROR_OK) {
303  LOG_ERROR("Error reading first thread item location in FreeRTOS thread list");
304  free(list_of_lists);
305  return retval;
306  }
307  LOG_DEBUG("FreeRTOS: Read first item for list %u at 0x%" PRIx64 ", value 0x%" PRIx32,
308  i, list_of_lists[i] + param->list_next_offset, list_elem_ptr);
309 
310  while ((list_thread_count > 0) && (list_elem_ptr != 0) &&
311  (list_elem_ptr != prev_list_elem_ptr) &&
312  (tasks_found < thread_list_size)) {
313  /* Get the location of the thread structure. */
314  retval = target_read_u32(rtos->target,
315  list_elem_ptr + param->list_elem_content_offset,
316  &pointer_casts_are_bad);
317  if (retval != ERROR_OK) {
318  LOG_ERROR("Error reading thread list item object in FreeRTOS thread list");
319  free(list_of_lists);
320  return retval;
321  }
322  rtos->thread_details[tasks_found].threadid = pointer_casts_are_bad;
323  LOG_DEBUG("FreeRTOS: Read Thread ID at 0x%" PRIx32 ", value 0x%" PRIx64,
324  list_elem_ptr + param->list_elem_content_offset,
325  rtos->thread_details[tasks_found].threadid);
326 
327  /* get thread name */
328 
329  #define FREERTOS_THREAD_NAME_STR_SIZE (200)
330  char tmp_str[FREERTOS_THREAD_NAME_STR_SIZE];
331 
332  /* Read the thread name */
333  retval = target_read_buffer(rtos->target,
334  rtos->thread_details[tasks_found].threadid + param->thread_name_offset,
336  (uint8_t *)&tmp_str);
337  if (retval != ERROR_OK) {
338  LOG_ERROR("Error reading first thread item location in FreeRTOS thread list");
339  free(list_of_lists);
340  return retval;
341  }
342  tmp_str[FREERTOS_THREAD_NAME_STR_SIZE-1] = '\x00';
343  LOG_DEBUG("FreeRTOS: Read Thread Name at 0x%" PRIx64 ", value '%s'",
344  rtos->thread_details[tasks_found].threadid + param->thread_name_offset,
345  tmp_str);
346 
347  if (tmp_str[0] == '\x00')
348  strcpy(tmp_str, "No Name");
349 
350  rtos->thread_details[tasks_found].thread_name_str =
351  malloc(strlen(tmp_str)+1);
352  strcpy(rtos->thread_details[tasks_found].thread_name_str, tmp_str);
353  rtos->thread_details[tasks_found].exists = true;
354 
355  if (rtos->thread_details[tasks_found].threadid == rtos->current_thread) {
356  char running_str[] = "State: Running";
357  rtos->thread_details[tasks_found].extra_info_str = malloc(
358  sizeof(running_str));
359  strcpy(rtos->thread_details[tasks_found].extra_info_str,
360  running_str);
361  } else
362  rtos->thread_details[tasks_found].extra_info_str = NULL;
363 
364  tasks_found++;
365  list_thread_count--;
366  rtos->thread_count = tasks_found;
367 
368  prev_list_elem_ptr = list_elem_ptr;
369  list_elem_ptr = 0;
370  retval = target_read_u32(rtos->target,
371  prev_list_elem_ptr + param->list_elem_next_offset,
372  &list_elem_ptr);
373  if (retval != ERROR_OK) {
374  LOG_ERROR("Error reading next thread item location in FreeRTOS thread list");
375  free(list_of_lists);
376  return retval;
377  }
378  LOG_DEBUG("FreeRTOS: Read next thread location at 0x%" PRIx32 ", value 0x%" PRIx32,
379  prev_list_elem_ptr + param->list_elem_next_offset,
380  list_elem_ptr);
381  }
382  }
383 
384  free(list_of_lists);
385  return 0;
386 }
387 
388 static int freertos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
389  struct rtos_reg **reg_list, int *num_regs)
390 {
391  int retval;
392  const struct freertos_params *param;
393  int64_t stack_ptr = 0;
394 
395  if (!rtos)
396  return -1;
397 
398  if (thread_id == 0)
399  return -2;
400 
402  return -1;
403 
404  param = (const struct freertos_params *) rtos->rtos_specific_params;
405 
406  /* Read the stack pointer */
407  uint32_t pointer_casts_are_bad;
408  retval = target_read_u32(rtos->target,
409  thread_id + param->thread_stack_offset,
410  &pointer_casts_are_bad);
411  if (retval != ERROR_OK) {
412  LOG_ERROR("Error reading stack frame from FreeRTOS thread");
413  return retval;
414  }
415  stack_ptr = pointer_casts_are_bad;
416  LOG_DEBUG("FreeRTOS: Read stack pointer at 0x%" PRIx64 ", value 0x%" PRIx64,
417  thread_id + param->thread_stack_offset,
418  stack_ptr);
419 
420  /* Check for armv7m with *enabled* FPU, i.e. a Cortex-M4F */
421  int cm4_fpu_enabled = 0;
422  struct armv7m_common *armv7m_target = target_to_armv7m(rtos->target);
423  if (is_armv7m(armv7m_target)) {
424  if ((armv7m_target->fp_feature == FPV4_SP) || (armv7m_target->fp_feature == FPV5_SP) ||
425  (armv7m_target->fp_feature == FPV5_DP)) {
426  /* Found ARM v7m target which includes a FPU */
427  uint32_t cpacr;
428 
429  retval = target_read_u32(rtos->target, FPU_CPACR, &cpacr);
430  if (retval != ERROR_OK) {
431  LOG_ERROR("Could not read CPACR register to check FPU state");
432  return -1;
433  }
434 
435  /* Check if CP10 and CP11 are set to full access. */
436  if (cpacr & 0x00F00000) {
437  /* Found target with enabled FPU */
438  cm4_fpu_enabled = 1;
439  }
440  }
441  }
442 
443  if (cm4_fpu_enabled == 1) {
444  /* Read the LR to decide between stacking with or without FPU */
445  uint32_t lr_svc = 0;
446  retval = target_read_u32(rtos->target,
447  stack_ptr + 0x20,
448  &lr_svc);
449  if (retval != ERROR_OK) {
450  LOG_OUTPUT("Error reading stack frame from FreeRTOS thread");
451  return retval;
452  }
453  if ((lr_svc & 0x10) == 0)
454  return rtos_generic_stack_read(rtos->target, param->stacking_info_cm4f_fpu, stack_ptr, reg_list, num_regs);
455  else
456  return rtos_generic_stack_read(rtos->target, param->stacking_info_cm4f, stack_ptr, reg_list, num_regs);
457  } else
458  return rtos_generic_stack_read(rtos->target, param->stacking_info_cm3, stack_ptr, reg_list, num_regs);
459 }
460 
461 static int freertos_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
462 {
463  unsigned int i;
464  *symbol_list = calloc(
466 
467  for (i = 0; i < ARRAY_SIZE(freertos_symbol_list); i++) {
468  (*symbol_list)[i].symbol_name = freertos_symbol_list[i].name;
469  (*symbol_list)[i].optional = freertos_symbol_list[i].optional;
470  }
471 
472  return 0;
473 }
474 
475 #if 0
476 
477 static int freertos_set_current_thread(struct rtos *rtos, threadid_t thread_id)
478 {
479  return 0;
480 }
481 
482 static int freertos_get_thread_ascii_info(struct rtos *rtos, threadid_t thread_id, char **info)
483 {
484  int retval;
485  const struct freertos_params *param;
486 
487  if (!rtos)
488  return -1;
489 
490  if (thread_id == 0)
491  return -2;
492 
494  return -3;
495 
496  param = (const struct freertos_params *) rtos->rtos_specific_params;
497 
498 #define FREERTOS_THREAD_NAME_STR_SIZE (200)
499  char tmp_str[FREERTOS_THREAD_NAME_STR_SIZE];
500 
501  /* Read the thread name */
502  retval = target_read_buffer(rtos->target,
503  thread_id + param->thread_name_offset,
505  (uint8_t *)&tmp_str);
506  if (retval != ERROR_OK) {
507  LOG_ERROR("Error reading first thread item location in FreeRTOS thread list");
508  return retval;
509  }
510  tmp_str[FREERTOS_THREAD_NAME_STR_SIZE-1] = '\x00';
511 
512  if (tmp_str[0] == '\x00')
513  strcpy(tmp_str, "No Name");
514 
515  *info = malloc(strlen(tmp_str)+1);
516  strcpy(*info, tmp_str);
517  return 0;
518 }
519 
520 #endif
521 
522 static bool freertos_detect_rtos(struct target *target)
523 {
524  if ((target->rtos->symbols) &&
526  /* looks like FreeRTOS */
527  return true;
528  }
529  return false;
530 }
531 
532 static int freertos_create(struct target *target)
533 {
534  for (unsigned int i = 0; i < ARRAY_SIZE(freertos_params_list); i++)
537  return 0;
538  }
539 
540  LOG_ERROR("Could not find target in FreeRTOS compatibility list");
541  return -1;
542 }
static int freertos_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
Definition: FreeRTOS.c:461
#define FREERTOS_THREAD_NAME_STR_SIZE
static int freertos_create(struct target *target)
Definition: FreeRTOS.c:532
static const struct freertos_params freertos_params_list[]
Definition: FreeRTOS.c:44
const struct rtos_type freertos_rtos
Definition: FreeRTOS.c:82
static bool freertos_detect_rtos(struct target *target)
Definition: FreeRTOS.c:522
static int freertos_update_threads(struct rtos *rtos)
Definition: FreeRTOS.c:133
static const struct symbols freertos_symbol_list[]
Definition: FreeRTOS.c:112
static int freertos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
Definition: FreeRTOS.c:388
freertos_symbol_values
Definition: FreeRTOS.c:92
@ FREERTOS_VAL_X_PENDING_READY_LIST
Definition: FreeRTOS.c:99
@ FREERTOS_VAL_X_SUSPENDED_TASK_LIST
Definition: FreeRTOS.c:101
@ FREERTOS_VAL_X_SCHEDULER_RUNNING
Definition: FreeRTOS.c:104
@ FREERTOS_VAL_X_TASKS_WAITING_TERMINATION
Definition: FreeRTOS.c:100
@ FREERTOS_VAL_UX_TOP_USED_PRIORITY
Definition: FreeRTOS.c:103
@ FREERTOS_VAL_PX_DELAYED_TASK_LIST
Definition: FreeRTOS.c:97
@ FREERTOS_VAL_X_DELAYED_TASK_LIST1
Definition: FreeRTOS.c:95
@ FREERTOS_VAL_X_DELAYED_TASK_LIST2
Definition: FreeRTOS.c:96
@ FREERTOS_VAL_PX_CURRENT_TCB
Definition: FreeRTOS.c:93
@ FREERTOS_VAL_PX_READY_TASKS_LISTS
Definition: FreeRTOS.c:94
@ FREERTOS_VAL_PX_OVERFLOW_DELAYED_TASK_LIST
Definition: FreeRTOS.c:98
@ FREERTOS_VAL_UX_CURRENT_NUMBER_OF_TASKS
Definition: FreeRTOS.c:102
#define FREERTOS_MAX_PRIORITIES
Definition: FreeRTOS.c:22
static struct armv7m_common * target_to_armv7m(struct target *target)
Definition: armv7m.h:262
@ FPV4_SP
Definition: armv7m.h:211
@ FPV5_DP
Definition: armv7m.h:213
@ FPV5_SP
Definition: armv7m.h:212
static bool is_armv7m(const struct armv7m_common *armv7m)
Definition: armv7m.h:250
#define FPU_CPACR
Definition: cortex_m.h:112
The JTAG interface can be implemented with a software or hardware fifo.
#define LOG_OUTPUT(expr ...)
Definition: log.h:141
#define ERROR_FAIL
Definition: log.h:170
#define LOG_ERROR(expr ...)
Definition: log.h:132
#define LOG_DEBUG(expr ...)
Definition: log.h:109
#define ERROR_OK
Definition: log.h:164
int rtos_generic_stack_read(struct target *target, const struct rtos_register_stacking *stacking, int64_t stack_ptr, struct rtos_reg **reg_list, int *num_regs)
Definition: rtos.c:602
void rtos_free_threadlist(struct rtos *rtos)
Definition: rtos.c:695
int64_t symbol_address_t
Definition: rtos.h:16
int64_t threadid_t
Definition: rtos.h:15
const struct rtos_register_stacking rtos_standard_cortex_m3_stacking
const struct rtos_register_stacking rtos_standard_cortex_m4f_fpu_stacking
const struct rtos_register_stacking rtos_standard_cortex_m4f_stacking
int fp_feature
Definition: armv7m.h:232
const unsigned char list_next_offset
Definition: FreeRTOS.c:33
const unsigned char pointer_width
Definition: FreeRTOS.c:32
const unsigned char thread_name_offset
Definition: FreeRTOS.c:38
const struct rtos_register_stacking * stacking_info_cm3
Definition: FreeRTOS.c:39
const unsigned char thread_count_width
Definition: FreeRTOS.c:31
const char * target_name
Definition: FreeRTOS.c:30
const unsigned char list_elem_content_offset
Definition: FreeRTOS.c:36
const unsigned char list_width
Definition: FreeRTOS.c:34
const unsigned char list_elem_next_offset
Definition: FreeRTOS.c:35
const struct rtos_register_stacking * stacking_info_cm4f_fpu
Definition: FreeRTOS.c:41
const struct rtos_register_stacking * stacking_info_cm4f
Definition: FreeRTOS.c:40
const unsigned char thread_stack_offset
Definition: FreeRTOS.c:37
Definition: rtos.h:53
Definition: rtos.h:59
const char * name
Definition: rtos.h:60
Definition: rtos.h:36
int thread_count
Definition: rtos.h:47
struct thread_detail * thread_details
Definition: rtos.h:46
struct symbol_table_elem * symbols
Definition: rtos.h:39
struct target * target
Definition: rtos.h:40
void * rtos_specific_params
Definition: rtos.h:50
threadid_t current_thread
Definition: rtos.h:45
Table should be terminated by an element with NULL in symbol_name.
Definition: rtos.h:23
symbol_address_t address
Definition: rtos.h:25
Definition: eCos.c:368
const char * name
Definition: eCos.c:369
bool optional
Definition: eCos.c:371
Definition: target.h:116
struct rtos * rtos
Definition: target.h:183
char * extra_info_str
Definition: rtos.h:33
char * thread_name_str
Definition: rtos.h:32
bool exists
Definition: rtos.h:31
threadid_t threadid
Definition: rtos.h:30
int target_read_buffer(struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer)
Definition: target.c:2407
int target_read_u32(struct target *target, target_addr_t address, uint32_t *value)
Definition: target.c:2550
const char * target_type_name(const struct target *target)
Get the target type name.
Definition: target.c:736
static const char * target_name(const struct target *target)
Returns the instance-specific name of the specified target.
Definition: target.h:233
#define ARRAY_SIZE(x)
Compute the number of elements of a variable length array.
Definition: types.h:57
static struct ublast_lowlevel_priv info
#define NULL
Definition: usb.h:16