aboutsummaryrefslogtreecommitdiff
path: root/src/target/target_request.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-02-28 08:11:18 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-02-28 08:11:18 +0000
commit0689e3dd6752f45f493eceb3edf040fbc7849846 (patch)
tree57c2d288e4ea01551e0ea7806957cd1f5a2165dc /src/target/target_request.c
parentb70e262867b724f7d265f0c6b206801a29ba284b (diff)
downloadriscv-openocd-0689e3dd6752f45f493eceb3edf040fbc7849846.zip
riscv-openocd-0689e3dd6752f45f493eceb3edf040fbc7849846.tar.gz
riscv-openocd-0689e3dd6752f45f493eceb3edf040fbc7849846.tar.bz2
- Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This
provides a better impeadance match for debug output char fn's, e.g. eCos. - Line endings are now added at the caller site of command_print*(). command_print() still adds a line ending - echo of commands in scripts are now available via debug_level instead of forced echo - Added a USER_SAMELINE() for printing without a lineend. git-svn-id: svn://svn.berlios.de/openocd/trunk@364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target_request.c')
-rw-r--r--src/target/target_request.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/target/target_request.c b/src/target/target_request.c
index e23a0f7..020ee79 100644
--- a/src/target/target_request.c
+++ b/src/target/target_request.c
@@ -53,6 +53,13 @@ int target_asciimsg(target_t *target, u32 length)
return ERROR_OK;
}
+int target_charmsg(target_t *target, u8 msg)
+{
+ USER_SAMELINE("%c", msg);
+
+ return ERROR_OK;
+}
+
int target_hexmsg(target_t *target, int size, u32 length)
{
u8 *data = malloc(CEIL(length * size, 4) * 4);
@@ -122,6 +129,9 @@ int target_request(target_t *target, u32 request)
target_hexmsg(target, (request & 0xff00) >> 8, (request & 0xffff0000) >> 16);
}
break;
+ case TARGET_REQ_DEBUGCHAR:
+ target_charmsg(target, (request & 0x00ff0000) >> 16);
+ break;
/* case TARGET_REQ_SEMIHOSTING:
* break;
*/