stlink: fix arm semihosting support

Add missing arm cmd handlers that enable semi hosting support to work as
expected.

Change-Id: I063d82c48b82b4f6aed4efc4b08ea752d78e9047
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/734
Tested-by: jenkins
Reviewed-by: Alan Bowman <alan.michael.bowman@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
Spencer Oliver 2012-07-03 15:50:24 +01:00 committed by Freddie Chopin
parent 1df6e59178
commit 24c0f9470a
1 changed files with 9 additions and 0 deletions

View File

@ -586,6 +586,7 @@ static int stm32_stlink_resume(struct target *target, int current,
return res;
target->state = TARGET_RUNNING;
target->debug_reason = DBG_REASON_NOTHALTED;
target_call_event_callbacks(target, TARGET_EVENT_RESUMED);
@ -754,12 +755,20 @@ static int stm32_stlink_bulk_write_memory(struct target *target,
return stm32_stlink_write_memory(target, address, 4, count, buffer);
}
static const struct command_registration stm32_stlink_command_handlers[] = {
{
.chain = arm_command_handlers,
},
COMMAND_REGISTRATION_DONE
};
struct target_type stm32_stlink_target = {
.name = "stm32_stlink",
.init_target = stm32_stlink_init_target,
.target_create = stm32_stlink_target_create,
.examine = cortex_m3_examine,
.commands = stm32_stlink_command_handlers,
.poll = stm32_stlink_poll,
.arch_state = armv7m_arch_state,