X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Ftarget.c;h=ed1a2cc4c4400c48c9607ff02f58c027bbbcf250;hb=refs%2Fchanges%2F14%2F1214%2F2;hp=db676b970537a032f353cd083083dfe0a14feae2;hpb=9b6de72c2ba149ac6f3e11d6d0dd3030bf7b19f9;p=openocd.git diff --git a/src/target/target.c b/src/target/target.c index db676b9705..ed1a2cc4c4 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -80,6 +80,7 @@ extern struct target_type dragonite_target; extern struct target_type xscale_target; extern struct target_type cortexm3_target; extern struct target_type cortexa8_target; +extern struct target_type cortexr4_target; extern struct target_type arm11_target; extern struct target_type mips_m4k_target; extern struct target_type avr_target; @@ -103,6 +104,7 @@ static struct target_type *target_types[] = { &xscale_target, &cortexm3_target, &cortexa8_target, + &cortexr4_target, &arm11_target, &mips_m4k_target, &avr_target, @@ -968,10 +970,10 @@ int target_write_phys_memory(struct target *target, return target->type->write_phys_memory(target, address, size, count, buffer); } -int target_bulk_write_memory(struct target *target, +static int target_bulk_write_memory_default(struct target *target, uint32_t address, uint32_t count, const uint8_t *buffer) { - return target->type->bulk_write_memory(target, address, count, buffer); + return target_write_memory(target, address, 4, count, buffer); } int target_add_breakpoint(struct target *target, @@ -1119,6 +1121,9 @@ static int target_init_one(struct command_context *cmd_ctx, if (target->type->write_buffer == NULL) target->type->write_buffer = target_write_buffer_default; + if (target->type->bulk_write_memory == NULL) + target->type->bulk_write_memory = target_bulk_write_memory_default; + return ERROR_OK; }