summaryrefslogtreecommitdiff
path: root/src/target/target.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-08-06 11:20:42 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-08-06 11:20:42 +0000
commitfbf5bec7f3ea9f4a9584099a12e71681cb55ce35 (patch)
tree576fd656bbf5ba38fc42fbc99109a5082eed6887 /src/target/target.c
parent7d244761461701e1161df32c2f1d4cd50ae2bb26 (diff)
downloadopenocd_libswd-fbf5bec7f3ea9f4a9584099a12e71681cb55ce35.tar.gz
openocd_libswd-fbf5bec7f3ea9f4a9584099a12e71681cb55ce35.tar.bz2
openocd_libswd-fbf5bec7f3ea9f4a9584099a12e71681cb55ce35.tar.xz
openocd_libswd-fbf5bec7f3ea9f4a9584099a12e71681cb55ce35.zip
- fixed a minor problem with the GDB server that could drop the first packet (non-fatal)
- fixed some small memory leaks (thanks to Spencer Oliver) - verify chip- and buswidth of cfi flash configurations - added support for ARM966E based systems (tested only with ST micro STR9, thanks to Spencer Oliver) git-svn-id: svn://svn.berlios.de/openocd/trunk@81 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target.c')
-rw-r--r--src/target/target.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/target/target.c b/src/target/target.c
index 8b9939af..e88fb196 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#include "replacements.h"
#include "target.h"
#include "log.h"
@@ -74,6 +75,7 @@ extern target_type_t arm7tdmi_target;
extern target_type_t arm720t_target;
extern target_type_t arm9tdmi_target;
extern target_type_t arm920t_target;
+extern target_type_t arm966e_target;
target_type_t *target_types[] =
{
@@ -81,6 +83,7 @@ target_type_t *target_types[] =
&arm9tdmi_target,
&arm920t_target,
&arm720t_target,
+ &arm966e_target,
NULL,
};
@@ -692,6 +695,7 @@ int target_read_buffer(struct target_s *target, u32 address, u32 size, u8 *buffe
if ((retval = target->type->read_memory(target, address, 1, unaligned, buffer)) != ERROR_OK)
return retval;
+ buffer += unaligned;
address += unaligned;
size -= unaligned;
}
@@ -704,6 +708,7 @@ int target_read_buffer(struct target_s *target, u32 address, u32 size, u8 *buffe
if ((retval = target->type->read_memory(target, address, 4, aligned / 4, buffer)) != ERROR_OK)
return retval;
+ buffer += aligned;
address += aligned;
size -= aligned;
}