Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cortex_m: set C_DEBUGEN in soft_reset_halt
The command "soft_reset_halt" is deprecated since mid 2013 with the commit 146dfe3 ("cortex_m: deprecate soft_reset_halt"). Nevertheless it is still extremely useful with multicore chips where it allows to reset only one of the cores, option not available through asserting the chip-wide srst. Without a better replacement of the command, it's worth fixing it. Accordingly to ARM DDI 0403E.d, chapter C1.4.1 "Entering Debug state on leaving reset state", to halt the core at reset both bits DHCSR.C_DEBUGEN and DEMCR.VC_CORERESET must be set. Current code only sets the latter bit, relying on having C_DEBUGEN already set through other commands, e.g. "halt". This prevents the command "soft_reset_halt" to work if issued as very first command. Set the bit C_DEBUGEN in command "soft_reset_halt". Change-Id: I66bfd6a0da1fca5049dea037b4d258cf6f842966 Signed-off-by: Antonio Borneo <[email protected]> Reviewed-on: http:https://openocd.zylin.com/4987 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <[email protected]> Reviewed-by: Tomas Vanek <[email protected]>
- Loading branch information