summaryrefslogtreecommitdiff
path: root/src/target/mips_m4k.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-01-02 23:58:16 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-01-02 23:58:16 +0000
commitad751bb7a4c73268fb38181b603215300490d201 (patch)
treee04a22dc6526d96887da6ede87fd5a4710657531 /src/target/mips_m4k.c
parent9d75343e451cb9a11bade2deb575794cb6aecad3 (diff)
downloadopenocd_libswd-ad751bb7a4c73268fb38181b603215300490d201.tar.gz
openocd_libswd-ad751bb7a4c73268fb38181b603215300490d201.tar.bz2
openocd_libswd-ad751bb7a4c73268fb38181b603215300490d201.tar.xz
openocd_libswd-ad751bb7a4c73268fb38181b603215300490d201.zip
John McCarthy <jgmcc@magma.ca> pic32mx flash wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1296 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/mips_m4k.c')
-rw-r--r--src/target/mips_m4k.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index 7e7733e9..09766594 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -50,6 +50,7 @@ int mips_m4k_target_create(struct target_s *target, Jim_Interp *interp);
int mips_m4k_examine(struct target_s *target);
int mips_m4k_assert_reset(target_t *target);
int mips_m4k_deassert_reset(target_t *target);
+int mips_m4k_checksum_memory(target_t *target, u32 address, u32 size, u32 *checksum);
target_type_t mips_m4k_target =
{
@@ -73,7 +74,7 @@ target_type_t mips_m4k_target =
.read_memory = mips_m4k_read_memory,
.write_memory = mips_m4k_write_memory,
.bulk_write_memory = mips_m4k_bulk_write_memory,
- .checksum_memory = NULL,
+ .checksum_memory = mips_m4k_checksum_memory,
.blank_check_memory = NULL,
.run_algorithm = mips32_run_algorithm,
@@ -766,7 +767,8 @@ int mips_m4k_examine(struct target_s *target)
if (!target->type->examined)
{
mips_ejtag_get_idcode(ejtag_info, &idcode, NULL);
-
+ ejtag_info->idcode = idcode;
+
if (((idcode >> 1) & 0x7FF) == 0x29)
{
/* we are using a pic32mx so select ejtag port
@@ -790,3 +792,8 @@ int mips_m4k_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buf
{
return mips_m4k_write_memory(target, address, 4, count, buffer);
}
+
+int mips_m4k_checksum_memory(target_t *target, u32 address, u32 size, u32 *checksum)
+{
+ return ERROR_FAIL; /* use bulk read method */
+}