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

Go to the source code of this file.

Data Structures

struct  nuttx_params
 
struct  symbols
 
struct  tcbinfo
 

Macros

#define EXTRAINFO_SIZE   256
 
#define NAME_SIZE   32
 
#define PTR_WIDTH   4
 
#define TCBINFO_TARGET_SIZE   22
 

Functions

static int nuttx_create (struct target *target)
 
static bool nuttx_detect_rtos (struct target *target)
 
static int nuttx_get_symbol_list_to_lookup (struct symbol_table_elem *symbol_list[])
 
static int nuttx_get_thread_reg_list (struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
 
static int nuttx_getreg_current_thread (struct rtos *rtos, struct rtos_reg **reg_list, int *num_regs)
 
static int nuttx_getregs_fromstack (struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
 
static int nuttx_smp_init (struct target *target)
 
static int nuttx_update_threads (struct rtos *rtos)
 
static target_addr_t target_buffer_get_addr (struct target *target, const uint8_t *buffer)
 

Variables

static const struct nuttx_params nuttx_params_list []
 
const struct rtos_type nuttx_rtos
 
static const struct symbols nuttx_symbol_list []
 
static char * task_state_str []
 

Macro Definition Documentation

◆ EXTRAINFO_SIZE

#define EXTRAINFO_SIZE   256

Definition at line 24 of file nuttx.c.

◆ NAME_SIZE

#define NAME_SIZE   32

Definition at line 23 of file nuttx.c.

◆ PTR_WIDTH

#define PTR_WIDTH   4

Definition at line 30 of file nuttx.c.

◆ TCBINFO_TARGET_SIZE

#define TCBINFO_TARGET_SIZE   22

Definition at line 41 of file nuttx.c.

Function Documentation

◆ nuttx_create()

static int nuttx_create ( struct target target)
static

◆ nuttx_detect_rtos()

static bool nuttx_detect_rtos ( struct target target)
static

◆ nuttx_get_symbol_list_to_lookup()

static int nuttx_get_symbol_list_to_lookup ( struct symbol_table_elem symbol_list[])
static

◆ nuttx_get_thread_reg_list()

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

◆ nuttx_getreg_current_thread()

static int nuttx_getreg_current_thread ( struct rtos rtos,
struct rtos_reg **  reg_list,
int *  num_regs 
)
static

◆ nuttx_getregs_fromstack()

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

◆ nuttx_smp_init()

static int nuttx_smp_init ( struct target target)
static

Definition at line 141 of file nuttx.c.

References ERROR_OK.

◆ nuttx_update_threads()

◆ target_buffer_get_addr()

static target_addr_t target_buffer_get_addr ( struct target target,
const uint8_t *  buffer 
)
static

Definition at line 148 of file nuttx.c.

References buffer, target_buffer_get_u32(), and target_buffer_get_u64().

Referenced by nuttx_update_threads().

Variable Documentation

◆ nuttx_params_list

const struct nuttx_params nuttx_params_list[]
static
Initial value:
= {
{
.target_name = "cortex_m",
},
{
.target_name = "hla_target",
},
{
.target_name = "esp32",
.stacking = &nuttx_esp32_stacking,
},
{
.target_name = "esp32s2",
.stacking = &nuttx_esp32s2_stacking,
},
{
.target_name = "esp32s3",
.stacking = &nuttx_esp32s3_stacking,
},
{
.target_name = "esp32c3",
.stacking = &nuttx_riscv_stacking,
},
}
const struct rtos_register_stacking nuttx_esp32s2_stacking
const struct rtos_register_stacking nuttx_riscv_stacking
const struct rtos_register_stacking nuttx_esp32s3_stacking
const struct rtos_register_stacking nuttx_esp32_stacking
const struct rtos_register_stacking nuttx_stacking_cortex_m

Definition at line 67 of file nuttx.c.

Referenced by nuttx_create().

◆ nuttx_rtos

const struct rtos_type nuttx_rtos
Initial value:
= {
.name = "nuttx",
.detect_rtos = nuttx_detect_rtos,
.create = nuttx_create,
.smp_init = nuttx_smp_init,
.update_threads = nuttx_update_threads,
.get_thread_reg_list = nuttx_get_thread_reg_list,
.get_symbol_list_to_lookup = nuttx_get_symbol_list_to_lookup,
}
static int nuttx_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
Definition: nuttx.c:380
static bool nuttx_detect_rtos(struct target *target)
Definition: nuttx.c:108
static int nuttx_create(struct target *target)
Definition: nuttx.c:117
static int nuttx_update_threads(struct rtos *rtos)
Definition: nuttx.c:157
static int nuttx_smp_init(struct target *target)
Definition: nuttx.c:141
static int nuttx_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
Definition: nuttx.c:367

Definition at line 380 of file nuttx.c.

◆ nuttx_symbol_list

const struct symbols nuttx_symbol_list[]
static
Initial value:
= {
{ "g_readytorun", false },
{ "g_pidhash", false },
{ "g_npidhash", false },
{ "g_tcbinfo", false },
{ "g_reg_offs", false},
{ NULL, false }
}
#define NULL
Definition: usb.h:16

Definition at line 1 of file nuttx.c.

Referenced by nuttx_get_symbol_list_to_lookup().

◆ task_state_str

char* task_state_str[]
static
Initial value:
= {
"INVALID",
"PENDING",
"READYTORUN",
"RUNNING",
"INACTIVE",
"WAIT_SEM",
"WAIT_SIG",
"WAIT_MQNOTEMPTY",
"WAIT_MQNOTFULL",
"WAIT_PAGEFILL",
"STOPPED",
}

Definition at line 67 of file nuttx.c.

Referenced by nuttx_update_threads().