OpenOCD
uCOS-III.c File Reference
Include dependency graph for uCOS-III.c:

Go to the source code of this file.

Data Structures

struct  ucos_iii_params
 

Macros

#define UCOS_III_MAX_STRLEN   64
 
#define UCOS_III_MAX_THREADS   256
 

Enumerations

enum  ucos_iii_symbol_values {
  UCOS_III_VAL_OS_RUNNING , UCOS_III_VAL_OS_TCB_CUR_PTR , UCOS_III_VAL_OS_TASK_DBG_LIST_PTR , UCOS_III_VAL_OS_TASK_QTY ,
  UCOS_III_VAL_OS_TCB_STK_PTR_OFFSET , UCOS_III_VAL_OS_TCB_NAME_PTR_OFFSET , UCOS_III_VAL_OS_TCB_TASK_STATE_OFFSET , UCOS_III_VAL_OS_TCB_PRIO_OFFSET ,
  UCOS_III_VAL_OS_TCB_DBG_PREV_PTR_OFFSET , UCOS_III_VAL_OS_TCB_DBG_NEXT_PTR_OFFSET
}
 

Functions

static int ucos_iii_create (struct target *target)
 
static bool ucos_iii_detect_rtos (struct target *target)
 
static int ucos_iii_find_last_thread_address (struct rtos *rtos, symbol_address_t *thread_address)
 
static int ucos_iii_find_or_create_thread (struct rtos *rtos, symbol_address_t thread_address, threadid_t *threadid)
 
static int ucos_iii_find_thread_address (struct rtos *rtos, threadid_t threadid, symbol_address_t *thread_address)
 
static int ucos_iii_get_symbol_list_to_lookup (struct symbol_table_elem *symbol_list[])
 
static int ucos_iii_get_thread_reg_list (struct rtos *rtos, threadid_t threadid, struct rtos_reg **reg_list, int *num_regs)
 
static int ucos_iii_reset_handler (struct target *target, enum target_reset_mode reset_mode, void *priv)
 
static int ucos_iii_update_thread_offsets (struct rtos *rtos)
 
static int ucos_iii_update_threads (struct rtos *rtos)
 

Variables

static const struct ucos_iii_params ucos_iii_params_list []
 
const struct rtos_type ucos_iii_rtos
 
static const char *const ucos_iii_symbol_list []
 
static const char *const ucos_iii_thread_state_list []
 

Macro Definition Documentation

◆ UCOS_III_MAX_STRLEN

#define UCOS_III_MAX_STRLEN   64

Definition at line 22 of file uCOS-III.c.

◆ UCOS_III_MAX_THREADS

#define UCOS_III_MAX_THREADS   256

Definition at line 26 of file uCOS-III.c.

Enumeration Type Documentation

◆ ucos_iii_symbol_values

Enumerator
UCOS_III_VAL_OS_RUNNING 
UCOS_III_VAL_OS_TCB_CUR_PTR 
UCOS_III_VAL_OS_TASK_DBG_LIST_PTR 
UCOS_III_VAL_OS_TASK_QTY 
UCOS_III_VAL_OS_TCB_STK_PTR_OFFSET 
UCOS_III_VAL_OS_TCB_NAME_PTR_OFFSET 
UCOS_III_VAL_OS_TCB_TASK_STATE_OFFSET 
UCOS_III_VAL_OS_TCB_PRIO_OFFSET 
UCOS_III_VAL_OS_TCB_DBG_PREV_PTR_OFFSET 
UCOS_III_VAL_OS_TCB_DBG_NEXT_PTR_OFFSET 

Definition at line 92 of file uCOS-III.c.

Function Documentation

◆ ucos_iii_create()

◆ ucos_iii_detect_rtos()

static bool ucos_iii_detect_rtos ( struct target target)
static

◆ ucos_iii_find_last_thread_address()

◆ ucos_iii_find_or_create_thread()

static int ucos_iii_find_or_create_thread ( struct rtos rtos,
symbol_address_t  thread_address,
threadid_t threadid 
)
static

◆ ucos_iii_find_thread_address()

static int ucos_iii_find_thread_address ( struct rtos rtos,
threadid_t  threadid,
symbol_address_t thread_address 
)
static

◆ ucos_iii_get_symbol_list_to_lookup()

static int ucos_iii_get_symbol_list_to_lookup ( struct symbol_table_elem symbol_list[])
static

Definition at line 500 of file uCOS-III.c.

References ARRAY_SIZE, ERROR_FAIL, ERROR_OK, LOG_ERROR, and ucos_iii_symbol_list.

◆ ucos_iii_get_thread_reg_list()

static int ucos_iii_get_thread_reg_list ( struct rtos rtos,
threadid_t  threadid,
struct rtos_reg **  reg_list,
int *  num_regs 
)
static

◆ ucos_iii_reset_handler()

static int ucos_iii_reset_handler ( struct target target,
enum target_reset_mode  reset_mode,
void *  priv 
)
static

◆ ucos_iii_update_thread_offsets()

◆ ucos_iii_update_threads()

Variable Documentation

◆ ucos_iii_params_list

const struct ucos_iii_params ucos_iii_params_list[]
static
Initial value:
= {
{
"cortex_m",
sizeof(uint32_t),
0,
0,
0,
0,
0,
0,
false,
1,
0,
},
{
"esirisc",
sizeof(uint32_t),
0,
0,
0,
0,
0,
0,
false,
1,
0,
},
}
const struct rtos_register_stacking rtos_ucos_iii_cortex_m_stacking
const struct rtos_register_stacking rtos_ucos_iii_esi_risc_stacking

Definition at line 1 of file uCOS-III.c.

Referenced by ucos_iii_create().

◆ ucos_iii_rtos

const struct rtos_type ucos_iii_rtos
Initial value:
= {
.name = "uCOS-III",
.detect_rtos = ucos_iii_detect_rtos,
.create = ucos_iii_create,
.update_threads = ucos_iii_update_threads,
.get_thread_reg_list = ucos_iii_get_thread_reg_list,
.get_symbol_list_to_lookup = ucos_iii_get_symbol_list_to_lookup,
}
static int ucos_iii_update_threads(struct rtos *rtos)
Definition: uCOS-III.c:287
static int ucos_iii_create(struct target *target)
Definition: uCOS-III.c:263
static int ucos_iii_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
Definition: uCOS-III.c:500
static int ucos_iii_get_thread_reg_list(struct rtos *rtos, threadid_t threadid, struct rtos_reg **reg_list, int *num_regs)
Definition: uCOS-III.c:465
static bool ucos_iii_detect_rtos(struct target *target)
Definition: uCOS-III.c:247

Definition at line 500 of file uCOS-III.c.

◆ ucos_iii_symbol_list

const char* const ucos_iii_symbol_list[]
static
Initial value:
= {
"OSRunning",
"OSTCBCurPtr",
"OSTaskDbgListPtr",
"OSTaskQty",
"openocd_OS_TCB_StkPtr_offset",
"openocd_OS_TCB_NamePtr_offset",
"openocd_OS_TCB_TaskState_offset",
"openocd_OS_TCB_Prio_offset",
"openocd_OS_TCB_DbgPrevPtr_offset",
"openocd_OS_TCB_DbgNextPtr_offset",
}
#define NULL
Definition: usb.h:16

Definition at line 76 of file uCOS-III.c.

Referenced by ucos_iii_get_symbol_list_to_lookup().

◆ ucos_iii_thread_state_list

const char* const ucos_iii_thread_state_list[]
static
Initial value:
= {
"Ready",
"Delay",
"Pend",
"Pend Timeout",
"Suspended",
"Delay Suspended",
"Pend Suspended",
"Pend Timeout Suspended",
}

Definition at line 107 of file uCOS-III.c.

Referenced by ucos_iii_update_threads().