"cortex_m3 vector_catch" ... traps certain hardware faults
without tying up breakpoint resources
If you're willing to help debug it: VERY EARLY Cortex-A8 support
"cortex_m3 vector_catch" ... traps certain hardware faults
without tying up breakpoint resources
If you're willing to help debug it: VERY EARLY Cortex-A8 support
- New commands for use with XScale processors: "xscale vector_table"
+ New commands for use with XScale processors: "xscale vector_table"
+ ARM11 single stepping support for i.MX31
Flash Layer:
The lpc2000 driver handles the new NXP LPC1700 (Cortex-M3) chips
Flash Layer:
The lpc2000 driver handles the new NXP LPC1700 (Cortex-M3) chips
uint32_t arm11_vcr = 0;
bool arm11_config_memrw_no_increment = false;
bool arm11_config_step_irq_enable = false;
uint32_t arm11_vcr = 0;
bool arm11_config_memrw_no_increment = false;
bool arm11_config_step_irq_enable = false;
+bool arm11_config_hardware_step = false;
#define ARM11_HANDLER(x) \
.x = arm11_##x
#define ARM11_HANDLER(x) \
.x = arm11_##x
int arm11_step(struct target_s *target, int current, uint32_t address, int handle_breakpoints)
{
FNC_INFO;
int arm11_step(struct target_s *target, int current, uint32_t address, int handle_breakpoints)
{
FNC_INFO;
LOG_DEBUG("target->state: %s",
target_state_name(target));
LOG_DEBUG("target->state: %s",
target_state_name(target));
LOG_DEBUG("STEP PC %08" PRIx32 "%s", R(PC), !current ? "!" : "");
LOG_DEBUG("STEP PC %08" PRIx32 "%s", R(PC), !current ? "!" : "");
- /* TODO: to implement single stepping on arm11 devices that can't
- * do single stepping in hardware we need to calculate the next
- * pc and set up breakpoints accordingingly. */
- uint32_t next_pc;
- retval = arm11_simulate_step(target, &next_pc);
- if (retval != ERROR_OK)
- return retval;
-
-
/** \todo TODO: Thumb not supported here */
uint32_t next_instruction;
/** \todo TODO: Thumb not supported here */
uint32_t next_instruction;
brp[0].write = 1;
brp[0].address = ARM11_SC7_BVR0;
brp[0].write = 1;
brp[0].address = ARM11_SC7_BVR0;
brp[1].write = 1;
brp[1].address = ARM11_SC7_BCR0;
brp[1].write = 1;
brp[1].address = ARM11_SC7_BCR0;
- brp[1].value = 0x1 | (3 << 1) | (0x0F << 5) | (0 << 14) | (0 << 16) | (0 << 20) | (2 << 21);
+
+ if (arm11_config_hardware_step)
+ {
+ /* hardware single stepping be used if possible or is it better to
+ * always use the same code path? Hardware single stepping is not supported
+ * on all hardware
+ */
+ brp[0].value = R(PC);
+ brp[1].value = 0x1 | (3 << 1) | (0x0F << 5) | (0 << 14) | (0 << 16) | (0 << 20) | (2 << 21);
+ } else
+ {
+ /* sets a breakpoint on the next PC(calculated by simulation),
+ */
+ uint32_t next_pc;
+ int retval;
+ retval = arm11_simulate_step(target, &next_pc);
+ if (retval != ERROR_OK)
+ return retval;
+
+ brp[0].value = next_pc;
+ brp[1].value = 0x1 | (3 << 1) | (0x0F << 5) | (0 << 14) | (0 << 16) | (0 << 20) | (0 << 21);
+ }
CHECK_RETVAL(arm11_sc7_run(arm11, brp, asizeof(brp)));
CHECK_RETVAL(arm11_sc7_run(arm11, brp, asizeof(brp)));
CHECK_RETVAL(target_call_event_callbacks(target, TARGET_EVENT_HALTED));
CHECK_RETVAL(target_call_event_callbacks(target, TARGET_EVENT_HALTED));
- if (R(PC) != next_pc)
- {
- LOG_WARNING("next pc != simulated address %08" PRIx32 "!=%08" PRIx32, R(PC), next_pc);
- }
-
BOOL_WRAPPER(memwrite_error_fatal, "fatal error mode for memory writes")
BOOL_WRAPPER(memrw_no_increment, "\"no increment\" mode for memory transfers")
BOOL_WRAPPER(step_irq_enable, "IRQs while stepping")
BOOL_WRAPPER(memwrite_error_fatal, "fatal error mode for memory writes")
BOOL_WRAPPER(memrw_no_increment, "\"no increment\" mode for memory transfers")
BOOL_WRAPPER(step_irq_enable, "IRQs while stepping")
+BOOL_WRAPPER(hardware_step, "hardware single step")
int arm11_handle_vcr(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int arm11_handle_vcr(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
RC_FINAL_BOOL("no_increment", "Don't increment address on multi-read/-write (default: disabled)",
memrw_no_increment)
RC_FINAL_BOOL("no_increment", "Don't increment address on multi-read/-write (default: disabled)",
memrw_no_increment)
- RC_FINAL_BOOL("step_irq_enable", "Enable interrupts while stepping (default: disabled)",
- step_irq_enable)
+RC_FINAL_BOOL("step_irq_enable", "Enable interrupts while stepping (default: disabled)",
+ step_irq_enable)
+RC_FINAL_BOOL("hardware_step", "hardware single stepping. By default use simulate + breakpoint. This command is only here to check if simulate + breakpoint implementation is broken.",
+ hardware_step)
RC_FINAL("vcr", "Control (Interrupt) Vector Catch Register",
arm11_handle_vcr)
RC_FINAL("vcr", "Control (Interrupt) Vector Catch Register",
arm11_handle_vcr)
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)