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

Go to the source code of this file.

Data Structures

struct  ChibiOS_chdebug
 ChibiOS/RT memory signature record. More...
 
struct  ChibiOS_params
 

Macros

#define CH_RLIST_OFFSET   0x00
 
#define CHIBIOS_NUM_PARAMS   ((int)(sizeof(ChibiOS_params_list)/sizeof(struct ChibiOS_params)))
 
#define CHIBIOS_NUM_STATES   (sizeof(ChibiOS_thread_states)/sizeof(char *))
 
#define CHIBIOS_THREAD_NAME_STR_SIZE   (64)
 
#define GET_CH_KERNEL_MAJOR(codedVersion)   ((codedVersion >> 11) & 0x1f)
 
#define GET_CH_KERNEL_MINOR(codedVersion)   ((codedVersion >> 6) & 0x1f)
 
#define GET_CH_KERNEL_PATCH(codedVersion)   ((codedVersion >> 0) & 0x3f)
 

Enumerations

enum  ChibiOS_symbol_values { ChibiOS_VAL_rlist = 0, ChibiOS_VAL_ch = 1, ChibiOS_VAL_ch_debug = 2 }
 

Functions

static int ChibiOS_create (struct target *target)
 
static int ChibiOS_detect_rtos (struct target *target)
 
static int ChibiOS_get_symbol_list_to_lookup (symbol_table_elem_t *symbol_list[])
 
static int ChibiOS_get_thread_reg_list (struct rtos *rtos, int64_t thread_id, char **hex_reg_list)
 
static int ChibiOS_update_memory_signature (struct rtos *rtos)
 
static int ChibiOS_update_stacking (struct rtos *rtos)
 
static int ChibiOS_update_threads (struct rtos *rtos)
 

Variables

static struct ChibiOS_params ChibiOS_params_list []
 
struct rtos_type ChibiOS_rtos
 
static symbol_table_elem_t ChibiOS_symbol_list []
 
static const char *const ChibiOS_thread_states []
 ChibiOS thread states. More...
 

Macro Definition Documentation

#define CH_RLIST_OFFSET   0x00

Definition at line 142 of file ChibiOS.c.

Referenced by ChibiOS_update_threads().

#define CHIBIOS_NUM_PARAMS   ((int)(sizeof(ChibiOS_params_list)/sizeof(struct ChibiOS_params)))

Definition at line 104 of file ChibiOS.c.

Referenced by ChibiOS_create().

#define CHIBIOS_NUM_STATES   (sizeof(ChibiOS_thread_states)/sizeof(char *))

Definition at line 78 of file ChibiOS.c.

Referenced by ChibiOS_update_threads().

#define CHIBIOS_THREAD_NAME_STR_SIZE   (64)

Definition at line 83 of file ChibiOS.c.

Referenced by ChibiOS_update_threads().

#define GET_CH_KERNEL_MAJOR (   codedVersion)    ((codedVersion >> 11) & 0x1f)

Definition at line 65 of file ChibiOS.c.

Referenced by ChibiOS_update_memory_signature().

#define GET_CH_KERNEL_MINOR (   codedVersion)    ((codedVersion >> 6) & 0x1f)

Definition at line 66 of file ChibiOS.c.

Referenced by ChibiOS_update_memory_signature().

#define GET_CH_KERNEL_PATCH (   codedVersion)    ((codedVersion >> 0) & 0x3f)

Definition at line 67 of file ChibiOS.c.

Referenced by ChibiOS_update_memory_signature().

Enumeration Type Documentation

Enumerator
ChibiOS_VAL_rlist 
ChibiOS_VAL_ch 
ChibiOS_VAL_ch_debug 

Definition at line 128 of file ChibiOS.c.

Function Documentation

static int ChibiOS_create ( struct target target)
static
static int ChibiOS_detect_rtos ( struct target target)
static
static int ChibiOS_get_symbol_list_to_lookup ( symbol_table_elem_t symbol_list[])
static

Definition at line 502 of file ChibiOS.c.

References ERROR_FAIL, and NULL.

static int ChibiOS_get_thread_reg_list ( struct rtos rtos,
int64_t  thread_id,
char **  hex_reg_list 
)
static

Variable Documentation

struct ChibiOS_params ChibiOS_params_list[]
static
Initial value:
= {
{
"cortex_m",
0,
NULL,
},
{
"hla_target",
0,
NULL,
}
}
#define NULL
Definition: usb.h:27

Definition at line 92 of file ChibiOS.c.

struct rtos_type ChibiOS_rtos
Initial value:
= {
.name = "ChibiOS",
.detect_rtos = ChibiOS_detect_rtos,
.create = ChibiOS_create,
.update_threads = ChibiOS_update_threads,
.get_thread_reg_list = ChibiOS_get_thread_reg_list,
.get_symbol_list_to_lookup = ChibiOS_get_symbol_list_to_lookup,
}
static int ChibiOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, char **hex_reg_list)
Definition: ChibiOS.c:468
static int ChibiOS_update_threads(struct rtos *rtos)
Definition: ChibiOS.c:277
static int ChibiOS_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[])
Definition: ChibiOS.c:502
static int ChibiOS_detect_rtos(struct target *target)
Definition: ChibiOS.c:513
static int ChibiOS_create(struct target *target)
Definition: ChibiOS.c:532

Definition at line 112 of file ChibiOS.c.

symbol_table_elem_t ChibiOS_symbol_list[]
static
Initial value:
= {
{ "rlist", 0, true},
{ "ch", 0, true},
{ "ch_debug", 0, false},
{ NULL, 0, false}
}
#define NULL
Definition: usb.h:27

Definition at line 134 of file ChibiOS.c.

const char* const ChibiOS_thread_states[]
static
Initial value:
= {
"READY", "CURRENT", "SUSPENDED", "WTSEM", "WTMTX", "WTCOND", "SLEEPING",
"WTEXIT", "WTOREVT", "WTANDEVT", "SNDMSGQ", "SNDMSG", "WTMSG", "WTQUEUE",
"FINAL"
}

ChibiOS thread states.

Definition at line 72 of file ChibiOS.c.

Referenced by ChibiOS_update_threads().