summaryrefslogtreecommitdiff
path: root/lib/ccdbg-memory.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-04-06 11:31:49 -0700
committerKeith Packard <keithp@keithp.com>2009-04-06 11:32:21 -0700
commit2d9b8a83a2d9f495199033e43f519d26f27938fe (patch)
tree495a2cbf1573ac0b42d6331e9627e28448c65ef7 /lib/ccdbg-memory.c
parent24edd56155ed0fa02fdd8f66fdc7aa5a1021bf7d (diff)
Add support for a serial-connected custom debug dongle
This uses the cc1111 board as a custom debug dongle with faster methods for communicating with the debug target.
Diffstat (limited to 'lib/ccdbg-memory.c')
-rw-r--r--lib/ccdbg-memory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ccdbg-memory.c b/lib/ccdbg-memory.c
index 20a24799..878c5f97 100644
--- a/lib/ccdbg-memory.c
+++ b/lib/ccdbg-memory.c
@@ -50,6 +50,8 @@ ccdbg_write_memory(struct ccdbg *dbg, uint16_t addr, uint8_t *bytes, int nbytes)
int i, nl = 0;
struct ccstate state;
+ if (dbg->usb)
+ return cc_usb_write_memory(dbg->usb, addr, bytes, nbytes);
ccdbg_state_save(dbg, &state, CC_STATE_ACC | CC_STATE_PSW | CC_STATE_DP);
memory_init[HIGH_START] = addr >> 8;
memory_init[LOW_START] = addr;
@@ -83,6 +85,8 @@ ccdbg_read_memory(struct ccdbg *dbg, uint16_t addr, uint8_t *bytes, int nbytes)
ccdbg_rom_replace_xmem(dbg, addr, bytes, nbytes);
return 0;
}
+ if (dbg->usb)
+ return cc_usb_read_memory(dbg->usb, addr, bytes, nbytes);
ccdbg_state_save(dbg, &state, CC_STATE_ACC | CC_STATE_PSW | CC_STATE_DP);
memory_init[HIGH_START] = addr >> 8;
memory_init[LOW_START] = addr;