OpenOCD
esp_algorithm_run_data Struct Reference

Algorithm run data. More...

Collaboration diagram for esp_algorithm_run_data:

Data Fields

union {
   struct esp_algorithm_image   image
 
   struct {
      target_addr_t   code_buf_addr
 Address of pre-compiled target buffer for stub trampoline. More...
 
      uint32_t   code_buf_size
 Size of the pre-alocated on-board buffer for stub's code. More...
 
      target_addr_t   min_stack_addr
 Pre-compiled target buffer's addr for stack. More...
 
      uint32_t   min_stack_size
 Size of the pre-alocated on-board buffer for stub's stack. More...
 
   }   on_board
 
}; 
 
int(* algo_func )(struct target *target, struct esp_algorithm_run_data *run, void *arg)
 Algorithm run function. More...
 
void * arch_info
 Algorithm arch-specific info. More...
 
const struct esp_algorithm_hwhw
 HW specific API. More...
 
struct esp_algorithm_mem_args mem_args
 Algorithm memory arguments. More...
 
struct esp_algorithm_reg_args reg_args
 Algorithm register arguments. More...
 
int32_t ret_code
 Algorithm return code. More...
 
uint32_t stack_size
 Algorithm stack size. More...
 
struct esp_algorithm_stub stub
 Stub. More...
 
uint32_t timeout_ms
 Algorithm completion timeout in ms. More...
 
int(* usr_func )(struct target *target, void *usr_arg)
 Host part of algorithm. More...
 
void * usr_func_arg
 Host side algorithm function argument. More...
 
void(* usr_func_done )(struct target *target, struct esp_algorithm_run_data *run, void *usr_arg)
 Algorithm's arguments cleanup function. More...
 
int(* usr_func_init )(struct target *target, struct esp_algorithm_run_data *run, void *usr_arg)
 Algorithm's arguments setup function. More...
 

Detailed Description

Algorithm run data.

Definition at line 204 of file esp_algorithm.h.

Field Documentation

◆ 

union { ... }

◆ algo_func

int(* esp_algorithm_run_data::algo_func) (struct target *target, struct esp_algorithm_run_data *run, void *arg)

Algorithm run function.

Parameters
targetPointer to target.
runPointer to algo run data.
argFunction specific argument.
Returns
ERROR_OK on success, otherwise ERROR_XXX.

Definition at line 287 of file esp_algorithm.h.

◆ arch_info

void* esp_algorithm_run_data::arch_info

Algorithm arch-specific info.

For Xtensa this should point to struct xtensa_algorithm.

Definition at line 214 of file esp_algorithm.h.

Referenced by esp_xtensa_algo_init().

◆ code_buf_addr

target_addr_t esp_algorithm_run_data::code_buf_addr

Address of pre-compiled target buffer for stub trampoline.

Definition at line 224 of file esp_algorithm.h.

◆ code_buf_size

uint32_t esp_algorithm_run_data::code_buf_size

Size of the pre-alocated on-board buffer for stub's code.

Definition at line 222 of file esp_algorithm.h.

◆ hw

const struct esp_algorithm_hw* esp_algorithm_run_data::hw

◆ image

struct esp_algorithm_image esp_algorithm_run_data::image

◆ mem_args

struct esp_algorithm_mem_args esp_algorithm_run_data::mem_args

Algorithm memory arguments.

Definition at line 208 of file esp_algorithm.h.

Referenced by esp_algorithm_run_debug_stub(), and esp_algorithm_run_image().

◆ min_stack_addr

target_addr_t esp_algorithm_run_data::min_stack_addr

Pre-compiled target buffer's addr for stack.

Definition at line 228 of file esp_algorithm.h.

◆ min_stack_size

uint32_t esp_algorithm_run_data::min_stack_size

Size of the pre-alocated on-board buffer for stub's stack.

Definition at line 226 of file esp_algorithm.h.

◆ 

struct { ... } esp_algorithm_run_data::on_board

◆ reg_args

◆ ret_code

int32_t esp_algorithm_run_data::ret_code

Algorithm return code.

Definition at line 216 of file esp_algorithm.h.

Referenced by esp_algorithm_run_debug_stub(), and esp_algorithm_run_image().

◆ stack_size

uint32_t esp_algorithm_run_data::stack_size

◆ stub

◆ timeout_ms

uint32_t esp_algorithm_run_data::timeout_ms

Algorithm completion timeout in ms.

If 0, default value will be used

Definition at line 206 of file esp_algorithm.h.

Referenced by esp_algorithm_run_debug_stub(), and esp_algorithm_run_image().

◆ usr_func

int(* esp_algorithm_run_data::usr_func) (struct target *target, void *usr_arg)

Host part of algorithm.

This function will be called while stub is running on target. It can be used for communication with stub.

Parameters
targetPointer to target.
usr_argFunction specific argument.
Returns
ERROR_OK on success, otherwise ERROR_XXX.

Definition at line 245 of file esp_algorithm.h.

Referenced by esp_algorithm_run_image().

◆ usr_func_arg

void* esp_algorithm_run_data::usr_func_arg

Host side algorithm function argument.

Definition at line 233 of file esp_algorithm.h.

Referenced by esp_algorithm_run_image().

◆ usr_func_done

void(* esp_algorithm_run_data::usr_func_done) (struct target *target, struct esp_algorithm_run_data *run, void *usr_arg)

Algorithm's arguments cleanup function.

This function will be called just after stub exit. It can be used to cleanup stub memory parameters.

Parameters
targetPointer to target.
runPointer to algo run data.
usr_argFunction specific argument. The same as for usr_func.
Returns
ERROR_OK on success, otherwise ERROR_XXX.

Definition at line 274 of file esp_algorithm.h.

Referenced by esp_algorithm_run_image().

◆ usr_func_init

int(* esp_algorithm_run_data::usr_func_init) (struct target *target, struct esp_algorithm_run_data *run, void *usr_arg)

Algorithm's arguments setup function.

This function will be called just before stub start. It must return when all operations with running stub are completed. It can be used to prepare stub memory parameters.

Parameters
targetPointer to target.
runPointer to algo run data.
usr_argFunction specific argument. The same as for usr_func.
Returns
ERROR_OK on success, otherwise ERROR_XXX.

Definition at line 259 of file esp_algorithm.h.

Referenced by esp_algorithm_run_image().


The documentation for this struct was generated from the following file: