From dc1e8484e21bd080399e267f39d085d1c7ab9955 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 30 Aug 2021 15:32:30 -0700 Subject: [PATCH] Fix build. Change-Id: I1ef6978fed7de7fa0b82f07d5bcb2f0264fda037 Signed-off-by: Tim Newsome --- src/helper/command.c | 4 ++-- src/rtos/FreeRTOS.c | 8 ++++---- src/rtos/rtos_standard_stackings.c | 12 ++++++------ src/rtos/rtos_standard_stackings.h | 10 +++++----- src/rtos/rtos_ucos_iii_stackings.c | 4 ++-- src/server/gdb_server.c | 4 ++-- src/target/target.c | 10 +++++----- src/target/target.h | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/helper/command.c b/src/helper/command.c index 0430dc895..e5529d97f 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -982,7 +982,7 @@ static int jim_command_dispatch(Jim_Interp *interp, int argc, Jim_Obj * const *a if (!command_can_run(cmd_ctx, c, Jim_GetString(argv[0], NULL))) return JIM_ERR; - target_call_timer_callbacks_now(NULL); + target_call_timer_callbacks_now(); /* * Black magic of overridden current target: @@ -1177,7 +1177,7 @@ COMMAND_HANDLER(handle_sleep_command) if (!busy) { int64_t then = timeval_ms(); while (timeval_ms() - then < (int64_t)duration) { - target_call_timer_callbacks_now(NULL); + target_call_timer_callbacks_now(); usleep(1000); } } else diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c index 27a70fe77..c3b5ed8d7 100644 --- a/src/rtos/FreeRTOS.c +++ b/src/rtos/FreeRTOS.c @@ -110,11 +110,11 @@ static int cortex_m_stacking(struct rtos *rtos, const struct rtos_register_stack return retval; } if ((LR_svc & 0x10) == 0) - *stacking = &rtos_standard_Cortex_M4F_FPU_stacking; + *stacking = &rtos_standard_cortex_m4f_fpu_stacking; else - *stacking = &rtos_standard_Cortex_M4F_stacking; + *stacking = &rtos_standard_cortex_m4f_stacking; } else { - *stacking = &rtos_standard_Cortex_M3_stacking; + *stacking = &rtos_standard_cortex_m3_stacking; } return ERROR_OK; @@ -123,7 +123,7 @@ static int cortex_m_stacking(struct rtos *rtos, const struct rtos_register_stack static int nds32_stacking(struct rtos *rtos, const struct rtos_register_stacking **stacking, target_addr_t stack_ptr) { - *stacking = &rtos_standard_NDS32_N1068_stacking; + *stacking = &rtos_standard_nds32_n1068_stacking; return ERROR_OK; } diff --git a/src/rtos/rtos_standard_stackings.c b/src/rtos/rtos_standard_stackings.c index d775786b6..589811be2 100644 --- a/src/rtos/rtos_standard_stackings.c +++ b/src/rtos/rtos_standard_stackings.c @@ -153,7 +153,7 @@ static const struct stack_register_offset rtos_standard_nds32_n1068_stack_offset { 35, 0x10, 32 }, /* IFC_LP */ }; -static const struct stack_register_offset rtos_metal_RV32_stack_offsets[] = { +static const struct stack_register_offset rtos_metal_rv32_stack_offsets[] = { /* zero isn't on the stack. By making its offset -1 we leave the value at 0 * inside rtos_generic_stack_read(). */ { GDB_REGNO_ZERO, -1, 32 }, @@ -194,7 +194,7 @@ static const struct stack_register_offset rtos_metal_RV32_stack_offsets[] = { { GDB_REGNO_MSTATUS, 0x84, 32 }, }; -static const struct stack_register_offset rtos_metal_RV64_stack_offsets[] = { +static const struct stack_register_offset rtos_metal_rv64_stack_offsets[] = { /* zero isn't on the stack. By making its offset -1 we leave the value at 0 * inside rtos_generic_stack_read(). */ { GDB_REGNO_ZERO, -1, 64 }, @@ -235,7 +235,7 @@ static const struct stack_register_offset rtos_metal_RV64_stack_offsets[] = { { GDB_REGNO_MSTATUS, 2 * 0x84, 64 }, }; -static const struct stack_register_offset rtos_standard_RV32_stack_offsets[] = { +static const struct stack_register_offset rtos_standard_rv32_stack_offsets[] = { /* zero isn't on the stack. By making its offset -1 we leave the value at 0 * inside rtos_generic_stack_read(). */ { GDB_REGNO_ZERO, -1, 32 }, @@ -276,7 +276,7 @@ static const struct stack_register_offset rtos_standard_RV32_stack_offsets[] = { { GDB_REGNO_MSTATUS, 29 * 4, 32 }, }; -static const struct stack_register_offset rtos_standard_RV64_stack_offsets[] = { +static const struct stack_register_offset rtos_standard_rv64_stack_offsets[] = { /* zero isn't on the stack. By making its offset -1 we leave the value at 0 * inside rtos_generic_stack_read(). */ { GDB_REGNO_ZERO, -1, 64 }, @@ -463,7 +463,7 @@ const struct rtos_register_stacking rtos_metal_rv32_stacking = { .total_register_count = ARRAY_SIZE(rtos_metal_rv32_stack_offsets) }; -const struct rtos_register_stacking rtos_standard_RV32_stacking = { +const struct rtos_register_stacking rtos_standard_rv32_stacking = { .stack_registers_size = (32 + 2) * 4, .stack_growth_direction = -1, .num_output_registers = 33, @@ -472,7 +472,7 @@ const struct rtos_register_stacking rtos_standard_RV32_stacking = { .total_register_count = ARRAY_SIZE(rtos_standard_rv32_stack_offsets) }; -const struct rtos_register_stacking rtos_metal_RV64_stacking = { +const struct rtos_register_stacking rtos_metal_rv64_stacking = { .stack_registers_size = (32 + 2) * 8, .stack_growth_direction = -1, .num_output_registers = 33, diff --git a/src/rtos/rtos_standard_stackings.h b/src/rtos/rtos_standard_stackings.h index 5001c8516..71118fd40 100644 --- a/src/rtos/rtos_standard_stackings.h +++ b/src/rtos/rtos_standard_stackings.h @@ -33,13 +33,13 @@ extern const struct rtos_register_stacking rtos_standard_nds32_n1068_stacking; target_addr_t rtos_generic_stack_align8(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr); -target_addr_t rtos_Cortex_M_stack_align(struct target *target, +target_addr_t rtos_cortex_m_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr, size_t xpsr_offset); -extern const struct rtos_register_stacking rtos_standard_RV32_stacking; -extern const struct rtos_register_stacking rtos_standard_RV64_stacking; -extern const struct rtos_register_stacking rtos_metal_RV32_stacking; -extern const struct rtos_register_stacking rtos_metal_RV64_stacking; +extern const struct rtos_register_stacking rtos_standard_rv32_stacking; +extern const struct rtos_register_stacking rtos_standard_rv64_stacking; +extern const struct rtos_register_stacking rtos_metal_rv32_stacking; +extern const struct rtos_register_stacking rtos_metal_rv64_stacking; #endif /* OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H */ diff --git a/src/rtos/rtos_ucos_iii_stackings.c b/src/rtos/rtos_ucos_iii_stackings.c index c11601b2e..0d533b55e 100644 --- a/src/rtos/rtos_ucos_iii_stackings.c +++ b/src/rtos/rtos_ucos_iii_stackings.c @@ -67,7 +67,7 @@ static const struct stack_register_offset rtos_ucos_iii_esi_risc_stack_offsets[] { ESIRISC_CAS, 0x08, 32 }, /* CAS */ }; -const struct rtos_register_stacking rtos_uCOS_III_Cortex_M_stacking = { +const struct rtos_register_stacking rtos_ucos_iii_cortex_m_stacking = { .stack_registers_size = 0x40, .stack_growth_direction = -1, .num_output_registers = ARRAY_SIZE(rtos_ucos_iii_cortex_m_stack_offsets), @@ -75,7 +75,7 @@ const struct rtos_register_stacking rtos_uCOS_III_Cortex_M_stacking = { .register_offsets = rtos_ucos_iii_cortex_m_stack_offsets }; -const struct rtos_register_stacking rtos_uCOS_III_eSi_RISC_stacking = { +const struct rtos_register_stacking rtos_ucos_iii_esi_risc_stacking = { .stack_registers_size = 0x4c, .stack_growth_direction = -1, .num_output_registers = ARRAY_SIZE(rtos_ucos_iii_esi_risc_stack_offsets), diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index b5d99a944..0dbbc498b 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2675,13 +2675,13 @@ static int gdb_query_packet(struct connection *connection, /* We want to print all debug output to GDB connection */ log_add_callback(gdb_log_callback, connection); - target_call_timer_callbacks_now(NULL); + target_call_timer_callbacks_now(); /* some commands need to know the GDB connection, make note of current * GDB connection. */ current_gdb_connection = gdb_connection; command_run_line(cmd_ctx, cmd); current_gdb_connection = NULL; - target_call_timer_callbacks_now(NULL); + target_call_timer_callbacks_now(); log_remove_callback(gdb_log_callback, connection); free(cmd); } diff --git a/src/target/target.c b/src/target/target.c index 5777b6a43..8194b3b9d 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -694,7 +694,7 @@ static int target_process_reset(struct command_invocation *cmd, enum target_rese } /* We want any events to be processed before the prompt */ - retval = target_call_timer_callbacks_now(NULL); + retval = target_call_timer_callbacks_now(); for (target = all_targets; target; target = target->next) { target->type->check_reset(target); @@ -1887,7 +1887,7 @@ static int target_call_timer_callback(struct target_timer_callback *cb, return target_unregister_timer_callback(cb->callback, cb->priv); } -static int target_call_timer_callbacks_check_time(int64_t *next_event, int checktime) +static int target_call_timer_callbacks_check_time(int checktime) { static bool callback_processing; @@ -1937,13 +1937,13 @@ static int target_call_timer_callbacks_check_time(int64_t *next_event, int check int target_call_timer_callbacks() { - return target_call_timer_callbacks_check_time(next_event, 1); + return target_call_timer_callbacks_check_time(1); } /* invoke periodic callbacks immediately */ int target_call_timer_callbacks_now() { - return target_call_timer_callbacks_check_time(next_event, 0); + return target_call_timer_callbacks_check_time(0); } int64_t target_timer_next_event(void) @@ -3163,7 +3163,7 @@ COMMAND_HANDLER(handle_reg_command) reg->valid = 0; if (reg->valid == 0) { - retval = reg->type->get(reg); + int retval = reg->type->get(reg); if (retval != ERROR_OK) { LOG_DEBUG("Couldn't get register %s.", reg->name); return retval; diff --git a/src/target/target.h b/src/target/target.h index 4fa8ed1c8..779d139ae 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -401,7 +401,7 @@ int target_call_trace_callbacks(struct target *target, size_t len, uint8_t *data int target_register_timer_callback(int (*callback)(void *priv), unsigned int time_ms, enum target_timer_type type, void *priv); int target_unregister_timer_callback(int (*callback)(void *priv), void *priv); -int target_call_timer_callbacks(int64_t *next_event); +int target_call_timer_callbacks(void); /** * Invoke this to ensure that e.g. polling timer callbacks happen before * a synchronous command completes.