riscv-openocd/src
Antonio Borneo 6ea43726a8 cortex_m: set C_DEBUGEN in soft_reset_halt
The command "soft_reset_halt" is deprecated since mid 2013 with
the commit 146dfe3295 ("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 <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4987
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2019-06-20 19:51:01 +01:00
..
flash flash/stm32h7x: fix register names to comply with RM0399 Rev2 and RM0433 Rev6 2019-06-13 12:40:16 +01:00
helper helper/options: simplify the code using command_run_linef() 2019-06-20 19:50:38 +01:00
jtag jtag: fix error on TCL command "return" in jtag event handler 2019-06-13 12:40:51 +01:00
pld helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
rtos ARMv8: Update rtos_reg storage from 8 to 16 bytes 2019-06-12 15:15:15 +01:00
server gdb_server: remove call to jtag_execute_queue() 2019-06-06 16:33:41 +01:00
svf helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
target cortex_m: set C_DEBUGEN in soft_reset_halt 2019-06-20 19:51:01 +01:00
transport helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
xsvf helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
Makefile.am Convert to non-recursive make 2016-12-08 16:23:10 +00:00
hello.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
openocd.c armv8: valgrind memleak fixes 2018-04-10 09:13:02 +01:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00