You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the riscv_run_algorithm function, the single_hart parameter of riscv_resume is true. then at old_or_new_riscv_poll since both the halted and running variables are not equal to 0, then a call to riscv_ halt is then called to terminate the newly running algorithm.
static int riscv_run_algorithm(struct target *target, int num_mem_params,
struct mem_param *mem_params, int num_reg_params,
struct reg_param *reg_params, target_addr_t entry_point,
target_addr_t exit_point, int timeout_ms, void *arch_info)
{
...
/* Run algorithm */
LOG_TARGET_DEBUG(target, "Resume at 0x%" TARGET_PRIxADDR, entry_point);
if (riscv_resume(target, 0, entry_point, 0, 1, true) != ERROR_OK)
return ERROR_FAIL;
...
}
int riscv_openocd_poll(struct target *target)
{
...
if (should_remain_halted) {
LOG_TARGET_DEBUG(target, "halt all; should_remain_halted=%d",
should_remain_halted);
riscv_halt(target);
} else if (should_resume) {
LOG_TARGET_DEBUG(target, "resume all");
riscv_resume(target, true, 0, 0, 0, false);
} else if (halted && running) {
LOG_TARGET_DEBUG(target, "halt all; halted=%d",
halted);
riscv_halt(target);
} else {
/* For targets that were discovered to be halted, call the
* appropriate callback. */
foreach_smp_target(entry, targets)
{
struct target *t = entry->target;
struct riscv_info *info = riscv_info(t);
if (info->halted_needs_event_callback) {
target_call_event_callbacks(t, info->halted_callback_event);
info->halted_needs_event_callback = false;
}
}
}
...
}
The text was updated successfully, but these errors were encountered:
In the
riscv_run_algorithm
function, the single_hart parameter ofriscv_resume
is true. then atold_or_new_riscv_poll
since both thehalted
andrunning
variables are not equal to 0, then a call toriscv_ halt
is then called to terminate the newly running algorithm.The text was updated successfully, but these errors were encountered: