}
if ((target->state == TARGET_RUNNING) || (target->state == TARGET_RESET))
{
- int check_pc = 0;
- if (target->state == TARGET_RESET)
- {
- if (target->reset_halt)
- {
- enum reset_types jtag_reset_config = jtag_get_reset_config();
- if ((jtag_reset_config & RESET_SRST_PULLS_TRST) == 0)
- {
- check_pc = 1;
- }
- }
- }
-
target->state = TARGET_HALTED;
if ((retval = arm7_9_debug_entry(target)) != ERROR_OK)
return retval;
- if (check_pc)
- {
- struct reg *reg = register_get_by_name(target->reg_cache, "pc", 1);
- uint32_t t=*((uint32_t *)reg->value);
- if (t != 0)
- {
- LOG_ERROR("PC was not 0. Does this target need srst_pulls_trst?");
- }
- }
-
if (arm_semihosting(target, &retval) != 0)
return retval;
}
}
break;
- default:
- LOG_ERROR("BUG: we shouldn't get here");
- exit(-1);
- break;
}
if (!is_arm_mode(armv4_5->core_mode))
num_accesses += thisrun_accesses;
}
break;
- default:
- LOG_ERROR("BUG: we shouldn't get here");
- exit(-1);
- break;
}
/* Re-Set DBGACK */
0xeafffff9 /* b w */
};
-extern int armv4_5_run_algorithm_inner(struct target *target,
- int num_mem_params, struct mem_param *mem_params,
- int num_reg_params, struct reg_param *reg_params,
- uint32_t entry_point, uint32_t exit_point,
- int timeout_ms, void *arch_info,
- int (*run_it)(struct target *target, uint32_t exit_point,
- int timeout_ms, void *arch_info));
-
int arm7_9_bulk_write_memory(struct target *target, uint32_t address, uint32_t count, uint8_t *buffer)
{
int retval;
COMMAND_PARSE_ENABLE(CMD_ARGV[0], semihosting);
+ if (!target_was_examined(target))
+ {
+ LOG_ERROR("Target not examined yet");
+ return ERROR_FAIL;
+ }
+
if (arm7_9->has_vector_catch) {
struct reg *vector_catch = &arm7_9->eice_cache
->reg_list[EICE_VEC_CATCH];
static const struct command_registration arm7_9_any_command_handlers[] = {
{
"dbgrq",
- .handler = &handle_arm7_9_dbgrq_command,
+ .handler = handle_arm7_9_dbgrq_command,
.mode = COMMAND_ANY,
- .usage = "<enable|disable>",
+ .usage = "['enable'|'disable']",
.help = "use EmbeddedICE dbgrq instead of breakpoint "
"for target halt requests",
},
{
"fast_memory_access",
- .handler = &handle_arm7_9_fast_memory_access_command,
+ .handler = handle_arm7_9_fast_memory_access_command,
.mode = COMMAND_ANY,
- .usage = "<enable|disable>",
+ .usage = "['enable'|'disable']",
.help = "use fast memory accesses instead of slower "
"but potentially safer accesses",
},
{
"dcc_downloads",
- .handler = &handle_arm7_9_dcc_downloads_command,
+ .handler = handle_arm7_9_dcc_downloads_command,
.mode = COMMAND_ANY,
- .usage = "<enable | disable>",
+ .usage = "['enable'|'disable']",
.help = "use DCC downloads for larger memory writes",
},
{
"semihosting",
- .handler = &handle_arm7_9_semihosting_command,
+ .handler = handle_arm7_9_semihosting_command,
.mode = COMMAND_EXEC,
- .usage = "<enable | disable>",
+ .usage = "['enable'|'disable']",
.help = "activate support for semihosting operations",
},
COMMAND_REGISTRATION_DONE