OpenOCD
riot.c File Reference
Include dependency graph for riot.c:

Go to the source code of this file.

Data Structures

struct  riot_params
 
struct  riot_symbol
 
struct  riot_thread_state
 

Macros

#define RIOT_NUM_PARAMS   ARRAY_SIZE(riot_params_list)
 
#define RIOT_NUM_STATES   ARRAY_SIZE(riot_thread_states)
 

Enumerations

enum  riot_symbol_values {
  RIOT_THREADS_BASE = 0 , RIOT_NUM_THREADS , RIOT_ACTIVE_PID , RIOT_MAX_THREADS ,
  RIOT_NAME_OFFSET
}
 

Functions

static int riot_create (struct target *target)
 
static bool riot_detect_rtos (struct target *target)
 
static int riot_get_symbol_list_to_lookup (struct symbol_table_elem *symbol_list[])
 
static int riot_get_thread_reg_list (struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
 
static int riot_update_threads (struct rtos *rtos)
 

Variables

static const struct riot_params riot_params_list []
 
const struct rtos_type riot_rtos
 
static struct riot_symbol const riot_symbol_list []
 
static const struct riot_thread_state riot_thread_states []
 
static const struct rtos_register_stackingstacking_info
 

Macro Definition Documentation

◆ RIOT_NUM_PARAMS

#define RIOT_NUM_PARAMS   ARRAY_SIZE(riot_params_list)

Definition at line 70 of file riot.c.

◆ RIOT_NUM_STATES

#define RIOT_NUM_STATES   ARRAY_SIZE(riot_thread_states)

Definition at line 50 of file riot.c.

Enumeration Type Documentation

◆ riot_symbol_values

Enumerator
RIOT_THREADS_BASE 
RIOT_NUM_THREADS 
RIOT_ACTIVE_PID 
RIOT_MAX_THREADS 
RIOT_NAME_OFFSET 

Definition at line 75 of file riot.c.

Function Documentation

◆ riot_create()

◆ riot_detect_rtos()

static bool riot_detect_rtos ( struct target target)
static

Definition at line 378 of file riot.c.

References symbol_table_elem::address, RIOT_THREADS_BASE, target::rtos, and rtos::symbols.

◆ riot_get_symbol_list_to_lookup()

static int riot_get_symbol_list_to_lookup ( struct symbol_table_elem symbol_list[])
static

◆ riot_get_thread_reg_list()

static int riot_get_thread_reg_list ( struct rtos rtos,
int64_t  thread_id,
struct rtos_reg **  reg_list,
int *  num_regs 
)
static

◆ riot_update_threads()

Variable Documentation

◆ riot_params_list

const struct riot_params riot_params_list[]
static
Initial value:
= {
{
"cortex_m",
0x00,
0x04,
},
{
"hla_target",
0x00,
0x04,
}
}

Definition at line 27 of file riot.c.

Referenced by riot_create().

◆ riot_rtos

const struct rtos_type riot_rtos
Initial value:
= {
.name = "RIOT",
.detect_rtos = riot_detect_rtos,
.create = riot_create,
.update_threads = riot_update_threads,
.get_thread_reg_list = riot_get_thread_reg_list,
.get_symbol_list_to_lookup = riot_get_symbol_list_to_lookup,
}
static int riot_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
Definition: riot.c:361
static bool riot_detect_rtos(struct target *target)
Definition: riot.c:378
static int riot_update_threads(struct rtos *rtos)
Definition: riot.c:107
static int riot_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
Definition: riot.c:316
static int riot_create(struct target *target)
Definition: riot.c:388

Definition at line 73 of file riot.c.

◆ riot_symbol_list

struct riot_symbol const riot_symbol_list[]
static
Initial value:
= {
{"sched_threads", false},
{"sched_num_threads", false},
{"sched_active_pid", false},
{"max_threads", false},
{"_tcb_name_offset", true},
{NULL, false}
}
#define NULL
Definition: usb.h:16

Definition at line 73 of file riot.c.

Referenced by riot_get_symbol_list_to_lookup(), riot_get_thread_reg_list(), and riot_update_threads().

◆ riot_thread_states

const struct riot_thread_state riot_thread_states[]
static
Initial value:
= {
{ 0, "Stopped" },
{ 1, "Zombie" },
{ 2, "Sleeping" },
{ 3, "Blocked mutex" },
{ 4, "Blocked receive" },
{ 5, "Blocked send" },
{ 6, "Blocked reply" },
{ 7, "Blocked any flag" },
{ 8, "Blocked all flags" },
{ 9, "Blocked mbox" },
{ 10, "Blocked condition" },
{ 11, "Running" },
{ 12, "Pending" },
}

Definition at line 27 of file riot.c.

Referenced by riot_update_threads().

◆ stacking_info

const struct rtos_register_stacking* stacking_info
static

Definition at line 73 of file riot.c.

Referenced by riot_create(), riot_get_thread_reg_list(), and threadx_get_thread_reg_list().