When configuring a board with multiple Cortex-M chips the reset config is only set for the first one, the others are left at the default (vectreset).
Steps to reproduce:
- Create multiple targets inside a tcl config file (i.e. two or more instance of target/stm32f1x.cfg)
- Select each target and print the reset config using "cortex_m reset_config"
Result:
The first target is configured for sysresetreq, the others are left at the cortex_m default. The expected result would be that each target is configured to use sysresetreq.
To be precise, the reset_config of the FIRST target is set to sysresetreq, each time a NEW target is created. That is the new target must be selected in the target configs before setting the reset_config, could be done like in the workaround.
Workaround after creating the target:
set _PREV [target current]
targets $_TARGETNAME
cortex_m reset_config sysresetreq
targets $_PREV
Thank you for the report and the analysis, please see http://openocd.zylin.com/2142 .
Hi Michael,
Current HEAD should have a fix for the issue you've reported. Please reopen if anything's still missing.