Fix build.

Change-Id: I1ef6978fed7de7fa0b82f07d5bcb2f0264fda037
Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
Tim Newsome 2021-08-30 15:32:30 -07:00
parent a1146731a8
commit dc1e8484e2
8 changed files with 27 additions and 27 deletions

View File

@ -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))) if (!command_can_run(cmd_ctx, c, Jim_GetString(argv[0], NULL)))
return JIM_ERR; return JIM_ERR;
target_call_timer_callbacks_now(NULL); target_call_timer_callbacks_now();
/* /*
* Black magic of overridden current target: * Black magic of overridden current target:
@ -1177,7 +1177,7 @@ COMMAND_HANDLER(handle_sleep_command)
if (!busy) { if (!busy) {
int64_t then = timeval_ms(); int64_t then = timeval_ms();
while (timeval_ms() - then < (int64_t)duration) { while (timeval_ms() - then < (int64_t)duration) {
target_call_timer_callbacks_now(NULL); target_call_timer_callbacks_now();
usleep(1000); usleep(1000);
} }
} else } else

View File

@ -110,11 +110,11 @@ static int cortex_m_stacking(struct rtos *rtos, const struct rtos_register_stack
return retval; return retval;
} }
if ((LR_svc & 0x10) == 0) if ((LR_svc & 0x10) == 0)
*stacking = &rtos_standard_Cortex_M4F_FPU_stacking; *stacking = &rtos_standard_cortex_m4f_fpu_stacking;
else else
*stacking = &rtos_standard_Cortex_M4F_stacking; *stacking = &rtos_standard_cortex_m4f_stacking;
} else { } else {
*stacking = &rtos_standard_Cortex_M3_stacking; *stacking = &rtos_standard_cortex_m3_stacking;
} }
return ERROR_OK; 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, static int nds32_stacking(struct rtos *rtos, const struct rtos_register_stacking **stacking,
target_addr_t stack_ptr) target_addr_t stack_ptr)
{ {
*stacking = &rtos_standard_NDS32_N1068_stacking; *stacking = &rtos_standard_nds32_n1068_stacking;
return ERROR_OK; return ERROR_OK;
} }

View File

@ -153,7 +153,7 @@ static const struct stack_register_offset rtos_standard_nds32_n1068_stack_offset
{ 35, 0x10, 32 }, /* IFC_LP */ { 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 /* zero isn't on the stack. By making its offset -1 we leave the value at 0
* inside rtos_generic_stack_read(). */ * inside rtos_generic_stack_read(). */
{ GDB_REGNO_ZERO, -1, 32 }, { 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 }, { 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 /* zero isn't on the stack. By making its offset -1 we leave the value at 0
* inside rtos_generic_stack_read(). */ * inside rtos_generic_stack_read(). */
{ GDB_REGNO_ZERO, -1, 64 }, { 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 }, { 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 /* zero isn't on the stack. By making its offset -1 we leave the value at 0
* inside rtos_generic_stack_read(). */ * inside rtos_generic_stack_read(). */
{ GDB_REGNO_ZERO, -1, 32 }, { 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 }, { 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 /* zero isn't on the stack. By making its offset -1 we leave the value at 0
* inside rtos_generic_stack_read(). */ * inside rtos_generic_stack_read(). */
{ GDB_REGNO_ZERO, -1, 64 }, { 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) .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_registers_size = (32 + 2) * 4,
.stack_growth_direction = -1, .stack_growth_direction = -1,
.num_output_registers = 33, .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) .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_registers_size = (32 + 2) * 8,
.stack_growth_direction = -1, .stack_growth_direction = -1,
.num_output_registers = 33, .num_output_registers = 33,

View File

@ -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, target_addr_t rtos_generic_stack_align8(struct target *target,
const uint8_t *stack_data, const struct rtos_register_stacking *stacking, const uint8_t *stack_data, const struct rtos_register_stacking *stacking,
target_addr_t stack_ptr); 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, const uint8_t *stack_data, const struct rtos_register_stacking *stacking,
target_addr_t stack_ptr, size_t xpsr_offset); 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_rv32_stacking;
extern const struct rtos_register_stacking rtos_standard_RV64_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_rv32_stacking;
extern const struct rtos_register_stacking rtos_metal_RV64_stacking; extern const struct rtos_register_stacking rtos_metal_rv64_stacking;
#endif /* OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H */ #endif /* OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H */

View File

@ -67,7 +67,7 @@ static const struct stack_register_offset rtos_ucos_iii_esi_risc_stack_offsets[]
{ ESIRISC_CAS, 0x08, 32 }, /* CAS */ { 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_registers_size = 0x40,
.stack_growth_direction = -1, .stack_growth_direction = -1,
.num_output_registers = ARRAY_SIZE(rtos_ucos_iii_cortex_m_stack_offsets), .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 .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_registers_size = 0x4c,
.stack_growth_direction = -1, .stack_growth_direction = -1,
.num_output_registers = ARRAY_SIZE(rtos_ucos_iii_esi_risc_stack_offsets), .num_output_registers = ARRAY_SIZE(rtos_ucos_iii_esi_risc_stack_offsets),

View File

@ -2675,13 +2675,13 @@ static int gdb_query_packet(struct connection *connection,
/* We want to print all debug output to GDB connection */ /* We want to print all debug output to GDB connection */
log_add_callback(gdb_log_callback, 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 /* some commands need to know the GDB connection, make note of current
* GDB connection. */ * GDB connection. */
current_gdb_connection = gdb_connection; current_gdb_connection = gdb_connection;
command_run_line(cmd_ctx, cmd); command_run_line(cmd_ctx, cmd);
current_gdb_connection = NULL; current_gdb_connection = NULL;
target_call_timer_callbacks_now(NULL); target_call_timer_callbacks_now();
log_remove_callback(gdb_log_callback, connection); log_remove_callback(gdb_log_callback, connection);
free(cmd); free(cmd);
} }

View File

@ -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 */ /* 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) { for (target = all_targets; target; target = target->next) {
target->type->check_reset(target); 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); 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; 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() 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 */ /* invoke periodic callbacks immediately */
int target_call_timer_callbacks_now() 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) int64_t target_timer_next_event(void)
@ -3163,7 +3163,7 @@ COMMAND_HANDLER(handle_reg_command)
reg->valid = 0; reg->valid = 0;
if (reg->valid == 0) { if (reg->valid == 0) {
retval = reg->type->get(reg); int retval = reg->type->get(reg);
if (retval != ERROR_OK) { if (retval != ERROR_OK) {
LOG_DEBUG("Couldn't get register %s.", reg->name); LOG_DEBUG("Couldn't get register %s.", reg->name);
return retval; return retval;

View File

@ -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), int target_register_timer_callback(int (*callback)(void *priv),
unsigned int time_ms, enum target_timer_type type, 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_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 * Invoke this to ensure that e.g. polling timer callbacks happen before
* a synchronous command completes. * a synchronous command completes.