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