diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-02-26 23:30:30 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-02-28 22:48:44 +0000 |
commit | 8d13a4662647c33901592f699fcf544d88cfe443 (patch) | |
tree | 218e586c8988850daceca7b62092c7629cfde5b4 /src/target/cortex_m3.c | |
parent | 9d6ede25ddb0863873f84b6a55f4300891429049 (diff) |
semihosting: add armv7m semihosting support
do_semihosting and arm_semihosting now check the core type and
use the generic arm structure.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/target/cortex_m3.c')
-rw-r--r-- | src/target/cortex_m3.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 0aa7ac13..aecf3718 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -38,7 +38,7 @@ #include "arm_disassembler.h" #include "register.h" #include "arm_opcodes.h" - +#include "arm_semihosting.h" /* NOTE: most of this should work fine for the Cortex-M1 and * Cortex-M0 cores too, although they're ARMv6-M not ARMv7-M. @@ -495,6 +495,9 @@ static int cortex_m3_poll(struct target *target) if ((retval = cortex_m3_debug_entry(target)) != ERROR_OK) return retval; + if (arm_semihosting(target, &retval) != 0) + return retval; + target_call_event_callbacks(target, TARGET_EVENT_HALTED); } if (prev_target_state == TARGET_DEBUG_RUNNING) |