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

Go to the source code of this file.

Data Structures

struct  mem_ap
 
struct  mem_ap_alloc_reg_list
 

Macros

#define MAX_REG_SIZE   96
 
#define MEM_AP_COMMON_MAGIC   0x4DE4DA50
 
#define NUM_REGS   26
 
#define REG_EXIST(n)   ((n) < 16)
 
#define REG_SIZE(n)   ((((n) >= 16) && ((n) < 24)) ? 96 : 32)
 

Functions

static int mem_ap_arch_state (struct target *target)
 
static int mem_ap_assert_reset (struct target *target)
 
static int mem_ap_deassert_reset (struct target *target)
 
static void mem_ap_deinit_target (struct target *target)
 
static int mem_ap_examine (struct target *target)
 
static const char * mem_ap_get_gdb_arch (struct target *target)
 
static int mem_ap_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
 
static int mem_ap_halt (struct target *target)
 
static int mem_ap_init_target (struct command_context *cmd_ctx, struct target *target)
 
static int mem_ap_poll (struct target *target)
 
static int mem_ap_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
 
static int mem_ap_reg_get (struct reg *reg)
 
static int mem_ap_reg_set (struct reg *reg, uint8_t *buf)
 
static int mem_ap_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
 
static int mem_ap_step (struct target *target, int current, target_addr_t address, int handle_breakpoints)
 
static int mem_ap_target_create (struct target *target, Jim_Interp *interp)
 
static int mem_ap_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
 

Variables

static struct reg_arch_type mem_ap_reg_arch_type
 
struct target_type mem_ap_target
 

Macro Definition Documentation

◆ MAX_REG_SIZE

#define MAX_REG_SIZE   96

Definition at line 200 of file mem_ap.c.

◆ MEM_AP_COMMON_MAGIC

#define MEM_AP_COMMON_MAGIC   0x4DE4DA50

Definition at line 18 of file mem_ap.c.

◆ NUM_REGS

#define NUM_REGS   26

Definition at line 199 of file mem_ap.c.

◆ REG_EXIST

#define REG_EXIST (   n)    ((n) < 16)

Definition at line 201 of file mem_ap.c.

◆ REG_SIZE

#define REG_SIZE (   n)    ((((n) >= 16) && ((n) < 24)) ? 96 : 32)

Definition at line 202 of file mem_ap.c.

Function Documentation

◆ mem_ap_arch_state()

static int mem_ap_arch_state ( struct target target)
static

Definition at line 81 of file mem_ap.c.

References ERROR_OK, and LOG_DEBUG.

◆ mem_ap_assert_reset()

static int mem_ap_assert_reset ( struct target target)
static

◆ mem_ap_deassert_reset()

◆ mem_ap_deinit_target()

static void mem_ap_deinit_target ( struct target target)
static

Definition at line 67 of file mem_ap.c.

References mem_ap::ap, target::arch_info, dap_put_ap(), LOG_DEBUG, and target::private_config.

◆ mem_ap_examine()

◆ mem_ap_get_gdb_arch()

static const char* mem_ap_get_gdb_arch ( struct target target)
static

Definition at line 185 of file mem_ap.c.

◆ mem_ap_get_gdb_reg_list()

static int mem_ap_get_gdb_reg_list ( struct target target,
struct reg **  reg_list[],
int *  reg_list_size,
enum target_register_class  reg_class 
)
static

◆ mem_ap_halt()

static int mem_ap_halt ( struct target target)
static

◆ mem_ap_init_target()

static int mem_ap_init_target ( struct command_context cmd_ctx,
struct target target 
)
static

◆ mem_ap_poll()

static int mem_ap_poll ( struct target target)
static

◆ mem_ap_read_memory()

static int mem_ap_read_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
uint8_t *  buffer 
)
static

◆ mem_ap_reg_get()

static int mem_ap_reg_get ( struct reg reg)
static

Definition at line 170 of file mem_ap.c.

References ERROR_OK.

◆ mem_ap_reg_set()

static int mem_ap_reg_set ( struct reg reg,
uint8_t *  buf 
)
static

Definition at line 175 of file mem_ap.c.

◆ mem_ap_resume()

static int mem_ap_resume ( struct target target,
int  current,
target_addr_t  address,
int  handle_breakpoints,
int  debug_execution 
)
static

◆ mem_ap_step()

static int mem_ap_step ( struct target target,
int  current,
target_addr_t  address,
int  handle_breakpoints 
)
static

◆ mem_ap_target_create()

◆ mem_ap_write_memory()

static int mem_ap_write_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
const uint8_t *  buffer 
)
static

Definition at line 250 of file mem_ap.c.

Variable Documentation

◆ mem_ap_reg_arch_type

struct reg_arch_type mem_ap_reg_arch_type
static
Initial value:
= {
}
static int mem_ap_reg_get(struct reg *reg)
Definition: mem_ap.c:170
static int mem_ap_reg_set(struct reg *reg, uint8_t *buf)
Definition: mem_ap.c:175

Definition at line 175 of file mem_ap.c.

Referenced by mem_ap_get_gdb_reg_list().

◆ mem_ap_target

struct target_type mem_ap_target
Initial value:
= {
.name = "mem_ap",
.target_create = mem_ap_target_create,
.init_target = mem_ap_init_target,
.deinit_target = mem_ap_deinit_target,
.examine = mem_ap_examine,
.target_jim_configure = adiv5_jim_configure,
.poll = mem_ap_poll,
.arch_state = mem_ap_arch_state,
.halt = mem_ap_halt,
.resume = mem_ap_resume,
.step = mem_ap_step,
.assert_reset = mem_ap_assert_reset,
.deassert_reset = mem_ap_deassert_reset,
.get_gdb_arch = mem_ap_get_gdb_arch,
.get_gdb_reg_list = mem_ap_get_gdb_reg_list,
.read_memory = mem_ap_read_memory,
.write_memory = mem_ap_write_memory,
}
int adiv5_jim_configure(struct target *target, struct jim_getopt_info *goi)
Definition: arm_adi_v5.c:2330
static const char * mem_ap_get_gdb_arch(struct target *target)
Definition: mem_ap.c:185
static int mem_ap_assert_reset(struct target *target)
Definition: mem_ap.c:125
static int mem_ap_poll(struct target *target)
Definition: mem_ap.c:87
static int mem_ap_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
Definition: mem_ap.c:211
static int mem_ap_target_create(struct target *target, Jim_Interp *interp)
Definition: mem_ap.c:27
static int mem_ap_examine(struct target *target)
Definition: mem_ap.c:134
static int mem_ap_halt(struct target *target)
Definition: mem_ap.c:97
static int mem_ap_write_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
Definition: mem_ap.c:250
static int mem_ap_deassert_reset(struct target *target)
Definition: mem_ap.c:155
static int mem_ap_resume(struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
Definition: mem_ap.c:106
static int mem_ap_read_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
Definition: mem_ap.c:236
static int mem_ap_arch_state(struct target *target)
Definition: mem_ap.c:81
static void mem_ap_deinit_target(struct target *target)
Definition: mem_ap.c:67
static int mem_ap_step(struct target *target, int current, target_addr_t address, int handle_breakpoints)
Definition: mem_ap.c:115
static int mem_ap_init_target(struct command_context *cmd_ctx, struct target *target)
Definition: mem_ap.c:59

Definition at line 250 of file mem_ap.c.