target = target->next;
}
+ if ((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ LOG_WARNING("JTAG communication failed while deasserting reset.");
+ retval = ERROR_OK;
+ }
+
if (jtag_reset_config & RESET_SRST_PULLS_TRST)
{
/* If TRST was asserted we need to set up registers again */
if ((retval = target_examine(cmd_ctx)) != ERROR_OK)
return retval;
- }
+ }
- if ((retval = jtag_execute_queue()) != ERROR_OK)
- {
- LOG_WARNING("JTAG communication failed while deasserting reset.");
- retval = ERROR_OK;
- }
LOG_DEBUG("Waiting for halted stated as approperiate");
(((now.tv_sec >= callback->when.tv_sec) && (now.tv_usec >= callback->when.tv_usec))
|| (now.tv_sec > callback->when.tv_sec)))
{
- callback->callback(callback->priv);
- if (callback->periodic)
+ if(callback->callback != NULL)
{
- int time_ms = callback->time_ms;
- callback->when.tv_usec = now.tv_usec + (time_ms % 1000) * 1000;
- time_ms -= (time_ms % 1000);
- callback->when.tv_sec = now.tv_sec + time_ms / 1000;
- if (callback->when.tv_usec > 1000000)
+ callback->callback(callback->priv);
+ if (callback->periodic)
{
- callback->when.tv_usec = callback->when.tv_usec - 1000000;
- callback->when.tv_sec += 1;
+ int time_ms = callback->time_ms;
+ callback->when.tv_usec = now.tv_usec + (time_ms % 1000) * 1000;
+ time_ms -= (time_ms % 1000);
+ callback->when.tv_sec = now.tv_sec + time_ms / 1000;
+ if (callback->when.tv_usec > 1000000)
+ {
+ callback->when.tv_usec = callback->when.tv_usec - 1000000;
+ callback->when.tv_sec += 1;
+ }
}
+ else
+ target_unregister_timer_callback(callback->callback, callback->priv);
}
- else
- target_unregister_timer_callback(callback->callback, callback->priv);
}
callback = next_callback;
return retval;
}
+int target_blank_check_memory(struct target_s *target, u32 address, u32 size, u32* blank)
+{
+ int retval;
+ if (!target->type->examined)
+ {
+ LOG_ERROR("Target not examined yet");
+ return ERROR_FAIL;
+ }
+
+ if (target->type->blank_check_memory == 0)
+ return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
+
+ retval = target->type->blank_check_memory(target, address, size, blank);
+
+ return retval;
+}
+
int target_read_u32(struct target_s *target, u32 address, u32 *value)
{
u8 value_buf[4];
while (watchpoint)
{
- command_print(cmd_ctx, "address: 0x%8.8x, mask: 0x%8.8x, r/w/a: %i, value: 0x%8.8x, mask: 0x%8.8x", watchpoint->address, watchpoint->length, watchpoint->rw, watchpoint->value, watchpoint->mask);
+ command_print(cmd_ctx, "address: 0x%8.8x, len: 0x%8.8x, r/w/a: %i, value: 0x%8.8x, mask: 0x%8.8x", watchpoint->address, watchpoint->length, watchpoint->rw, watchpoint->value, watchpoint->mask);
watchpoint = watchpoint->next;
}
}