From 24c0f9470a77e3396102272b041810b45baba47b Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Tue, 3 Jul 2012 15:50:24 +0100 Subject: [PATCH] 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 Reviewed-on: http://openocd.zylin.com/734 Tested-by: jenkins Reviewed-by: Alan Bowman Reviewed-by: Freddie Chopin Reviewed-by: Andreas Fritiofson --- src/target/stm32_stlink.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/target/stm32_stlink.c b/src/target/stm32_stlink.c index b6d4ffa24..e1324fd46 100644 --- a/src/target/stm32_stlink.c +++ b/src/target/stm32_stlink.c @@ -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, -- 2.11.4.GIT