diff options
-rw-r--r-- | src/flash/lpc2000.c | 2 | ||||
-rw-r--r-- | src/target/algorithm.c | 4 | ||||
-rw-r--r-- | src/target/algorithm.h | 8 | ||||
-rw-r--r-- | src/target/arm11.c | 2 | ||||
-rw-r--r-- | src/target/arm7_9_common.c | 2 | ||||
-rw-r--r-- | src/target/arm7_9_common.h | 2 | ||||
-rw-r--r-- | src/target/armv4_5.c | 4 | ||||
-rw-r--r-- | src/target/armv4_5.h | 2 | ||||
-rw-r--r-- | src/target/armv7m.c | 2 | ||||
-rw-r--r-- | src/target/armv7m.h | 2 | ||||
-rw-r--r-- | src/target/mips32.c | 2 | ||||
-rw-r--r-- | src/target/mips32.h | 2 | ||||
-rw-r--r-- | src/target/target.c | 4 | ||||
-rw-r--r-- | src/target/target.h | 2 | ||||
-rw-r--r-- | src/target/target_type.h | 4 |
15 files changed, 22 insertions, 22 deletions
diff --git a/src/flash/lpc2000.c b/src/flash/lpc2000.c index 01b17f53..ab2b1c8e 100644 --- a/src/flash/lpc2000.c +++ b/src/flash/lpc2000.c @@ -239,7 +239,7 @@ static int lpc2000_iap_call(flash_bank_t *bank, int code, uint32_t param_table[5 int retval; struct lpc2000_flash_bank *lpc2000_info = bank->driver_priv; target_t *target = bank->target; - mem_param_t mem_params[2]; + struct mem_param mem_params[2]; reg_param_t reg_params[5]; armv4_5_algorithm_t armv4_5_info; /* for LPC2000 */ armv7m_algorithm_t armv7m_info; /* for LPC1700 */ diff --git a/src/target/algorithm.c b/src/target/algorithm.c index 5fcbfd30..6d213e0c 100644 --- a/src/target/algorithm.c +++ b/src/target/algorithm.c @@ -25,7 +25,7 @@ #include "binarybuffer.h" -void init_mem_param(mem_param_t *param, uint32_t address, uint32_t size, enum param_direction direction) +void init_mem_param(struct mem_param *param, uint32_t address, uint32_t size, enum param_direction direction) { param->address = address; param->size = size; @@ -33,7 +33,7 @@ void init_mem_param(mem_param_t *param, uint32_t address, uint32_t size, enum pa param->direction = direction; } -void destroy_mem_param(mem_param_t *param) +void destroy_mem_param(struct mem_param *param) { free(param->value); param->value = NULL; diff --git a/src/target/algorithm.h b/src/target/algorithm.h index 600580cb..963d1a55 100644 --- a/src/target/algorithm.h +++ b/src/target/algorithm.h @@ -29,13 +29,13 @@ enum param_direction PARAM_IN_OUT }; -typedef struct mem_param_s +struct mem_param { uint32_t address; uint32_t size; uint8_t *value; enum param_direction direction; -} mem_param_t; +}; typedef struct reg_param_s { @@ -45,9 +45,9 @@ typedef struct reg_param_s enum param_direction direction; } reg_param_t; -void init_mem_param(mem_param_t *param, +void init_mem_param(struct mem_param *param, uint32_t address, uint32_t size, enum param_direction dir); -void destroy_mem_param(mem_param_t *param); +void destroy_mem_param(struct mem_param *param); void init_reg_param(reg_param_t *param, char *reg_name, uint32_t size, enum param_direction dir); diff --git a/src/target/arm11.c b/src/target/arm11.c index 23185488..d7fca7d3 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -1614,7 +1614,7 @@ static int arm11_remove_watchpoint(struct target_s *target, // HACKHACKHACK - FIXME mode/state /* target algorithm support */ static int arm11_run_algorithm(struct target_s *target, - int num_mem_params, mem_param_t *mem_params, + int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 96575d57..66b13df4 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2654,7 +2654,7 @@ static const uint32_t dcc_code[] = 0xeafffff9 /* b w */ }; -int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)); +int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)); int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, uint8_t *buffer) { diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h index a49dab27..1a9e173c 100644 --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -141,7 +141,7 @@ int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* checksum); int arm7_9_blank_check_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* blank); -int arm7_9_run_algorithm(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_prams, reg_param_t *reg_param, uint32_t entry_point, void *arch_info); +int arm7_9_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_prams, reg_param_t *reg_param, uint32_t entry_point, void *arch_info); int arm7_9_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint); int arm7_9_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint); diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index c0a9c8ab..12509aa8 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -543,7 +543,7 @@ static int armv4_5_run_algorithm_completion(struct target_s *target, uint32_t ex return ERROR_OK; } -int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)) +int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)) { struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target); armv4_5_algorithm_t *armv4_5_algorithm_info = arch_info; @@ -708,7 +708,7 @@ int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, mem return retval; } -int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) +int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { return armv4_5_run_algorithm_inner(target, num_mem_params, mem_params, num_reg_params, reg_params, entry_point, exit_point, timeout_ms, arch_info, armv4_5_run_algorithm_completion); } diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h index 1eaab12d..e908d54a 100644 --- a/src/target/armv4_5.h +++ b/src/target/armv4_5.h @@ -183,7 +183,7 @@ int armv4_5_register_commands(struct command_context_s *cmd_ctx); int armv4_5_init_arch_info(target_t *target, armv4_5_common_t *armv4_5); int armv4_5_run_algorithm(struct target_s *target, - int num_mem_params, mem_param_t *mem_params, + int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 0f9d8114..36f828b7 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -357,7 +357,7 @@ static int armv7m_run_and_wait(struct target_s *target, uint32_t entry_point, in /** Runs a Thumb algorithm in the target. */ int armv7m_run_algorithm(struct target_s *target, - int num_mem_params, mem_param_t *mem_params, + int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) diff --git a/src/target/armv7m.h b/src/target/armv7m.h index 76016856..6b51c477 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -146,7 +146,7 @@ int armv7m_register_commands(struct command_context_s *cmd_ctx); int armv7m_init_arch_info(target_t *target, armv7m_common_t *armv7m); int armv7m_run_algorithm(struct target_s *target, - int num_mem_params, mem_param_t *mem_params, + int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/mips32.c b/src/target/mips32.c index d1722c1a..18bea79a 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -336,7 +336,7 @@ int mips32_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -int mips32_run_algorithm(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) +int mips32_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { /*TODO*/ return ERROR_OK; diff --git a/src/target/mips32.h b/src/target/mips32.h index 64328e35..927c2f17 100644 --- a/src/target/mips32.h +++ b/src/target/mips32.h @@ -135,7 +135,7 @@ int mips32_save_context(target_t *target); reg_cache_t *mips32_build_reg_cache(target_t *target); int mips32_run_algorithm(struct target_s *target, - int num_mem_params, mem_param_t *mem_params, + int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/target.c b/src/target/target.c index 2528a64e..44fe6bc9 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -559,7 +559,7 @@ static int target_soft_reset_halt_imp(struct target_s *target) return target->type->soft_reset_halt_imp(target); } -static int target_run_algorithm_imp(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) +static int target_run_algorithm_imp(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { if (!target_was_examined(target)) { @@ -634,7 +634,7 @@ int target_step(struct target_s *target, int target_run_algorithm(struct target_s *target, - int num_mem_params, mem_param_t *mem_params, + int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) diff --git a/src/target/target.h b/src/target/target.h index f5b6eb22..691a0001 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -360,7 +360,7 @@ int target_step(struct target_s *target, * This routine is a wrapper for target->type->run_algorithm. */ int target_run_algorithm(struct target_s *target, - int num_mem_params, mem_param_t *mem_params, + int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/target_type.h b/src/target/target_type.h index dd469db1..f8c78e20 100644 --- a/src/target/target_type.h +++ b/src/target/target_type.h @@ -144,12 +144,12 @@ struct target_type_s int (*remove_watchpoint)(struct target_s *target, watchpoint_t *watchpoint); /* target algorithm support */ - int (*run_algorithm_imp)(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); + int (*run_algorithm_imp)(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); /** * Target algorithm support. Do @b not call this method directly, * use target_run_algorithm() instead. */ - int (*run_algorithm)(struct target_s *target, int num_mem_params, mem_param_t *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); + int (*run_algorithm)(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); int (*register_commands)(struct command_context_s *cmd_ctx); |