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
 
struct  ucos_iii_private
 

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 21 of file uCOS-III.c.

◆ UCOS_III_MAX_THREADS

#define UCOS_III_MAX_THREADS   256

Definition at line 25 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 79 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()

static int ucos_iii_find_last_thread_address ( struct rtos rtos,
symbol_address_t thread_address 
)
static

◆ 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 487 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

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

References ERROR_OK, ucos_iii_private::params, target::rtos, and rtos::rtos_specific_params.

Referenced by ucos_iii_create().

◆ 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:
= {
{
.target_name = "cortex_m",
.pointer_width = sizeof(uint32_t),
.threadid_start = 1,
},
{
.target_name = "esirisc",
.pointer_width = sizeof(uint32_t),
.threadid_start = 1,
},
}
static const struct rtos_register_stacking * stacking_info
Definition: riot.c:72
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:274
static int ucos_iii_create(struct target *target)
Definition: uCOS-III.c:250
static int ucos_iii_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
Definition: uCOS-III.c:487
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:452
static bool ucos_iii_detect_rtos(struct target *target)
Definition: uCOS-III.c:234

Definition at line 487 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 63 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 94 of file uCOS-III.c.

Referenced by ucos_iii_update_threads().