int nbytes = count * size;
uint32_t data;
+ if (target->state != TARGET_HALTED)
+ {
+ LOG_WARNING("target not halted");
+ return ERROR_TARGET_NOT_HALTED;
+ }
+
/* save registers r0 and r1, we are going to corrupt them */
retval = cortex_a9_dap_read_coreregister_u32(target, &saved_r0, 0);
if (retval != ERROR_OK)
int nbytes = count * size;
uint32_t data;
+ if (target->state != TARGET_HALTED)
+ {
+ LOG_WARNING("target not halted");
+ return ERROR_TARGET_NOT_HALTED;
+ }
+
/* save registers r0 and r1, we are going to corrupt them */
retval = cortex_a9_dap_read_coreregister_u32(target, &saved_r0, 0);
if (retval != ERROR_OK)