This is an automated email from Gerrit. Tomas Vanek ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4729
-- gerrit commit b3e1bca8ec510a13c01e1bf36fb95c730a0abe61 Author: Tomas Vanek <[email protected]> Date: Thu Oct 18 16:08:10 2018 +0200 target/startup.tcl: force reconnect of all daps during reset Reconnect is forced if srst is used and srst_gates_jtag Change-Id: I3289d81404a228b36dbf96ea9d9ede685cab1527 Signed-off-by: Tomas Vanek <[email protected]> diff --git a/src/target/startup.tcl b/src/target/startup.tcl index e5d3855..78adb24 100644 --- a/src/target/startup.tcl +++ b/src/target/startup.tcl @@ -36,6 +36,13 @@ proc arp_is_tap_enabled { target } { return [jtag tapisenabled [$target cget -chain-position]] } +proc arp_is_tap_enabled_by_dap { dap } { + if (![using_jtag]) { + return 1 + } + return [jtag tapisenabled [$dap chain_position]] +} + # duplicate of target_examine_one(), keep in sync proc arp_examine_one { target } { if [arp_is_tap_enabled $target] { @@ -49,6 +56,16 @@ proc arp_examine_one { target } { } } +proc arp_dap_reconnect { MODE } { + if { [reset_config_includes srst] && ![reset_config_includes srst_nogate]} { + set daps [dap names] + foreach d $daps { + if [arp_is_tap_enabled_by_dap $d] { + $d force_reconnect + } + } + } +} proc arp_reset_plan_no_srst { phase target { secondary_core 0 } } { global arp_reset_mode @@ -125,11 +142,6 @@ proc arp_reset_plan_srst_dbg_cleared { phase target { secondary_core 0 } } { } } post { - if { ! $secondary_core } { - if { ! [catch { set dap [$target cget -dap] }]} { - $dap force_reconnect - } - } arp_examine_one $target $target arp_reset post_deassert $arp_reset_mode } @@ -236,6 +248,7 @@ proc ocd_process_reset_inner { MODE } { if { !$early_reset_init } { if [using_jtag] { jtag arp_init } } + arp_dap_reconnect $MODE foreach t $targets { $t invoke-event reset-deassert-post -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
