From fc74ccda52eced1f7be9fc99f071b0f47a7044ea Mon Sep 17 00:00:00 2001 From: Tarek BOCHKATI Date: Sun, 29 Aug 2021 22:09:46 +0100 Subject: [PATCH] tcl/target/stm32(f7/h7)x: do not assume presence of the reset do not force the presence of the reset line, since some custom boards may do not contain the reset line. Change-Id: I031ab34012b34a1b49def9db16461f9de0ae29cc Signed-off-by: Tarek BOCHKATI Reported-by: Fleck Fixes: https://sourceforge.net/p/openocd/tickets/316/ Reviewed-on: https://review.openocd.org/c/openocd/+/6506 Reviewed-by: Antonio Borneo Reviewed-by: Tomas Vanek Tested-by: jenkins --- tcl/board/stm327x6g_eval.cfg | 2 ++ tcl/board/stm32f723e-disco.cfg | 2 ++ tcl/board/stm32f746g-disco.cfg | 2 ++ tcl/board/stm32f769i-disco.cfg | 2 ++ tcl/board/stm32f7discovery.cfg | 2 ++ tcl/board/stm32h735g-disco.cfg | 2 ++ tcl/board/stm32h745i-disco.cfg | 2 ++ tcl/board/stm32h747i-disco.cfg | 2 ++ tcl/board/stm32h750b-disco.cfg | 2 ++ tcl/board/stm32h7b3i-disco.cfg | 2 ++ tcl/target/stm32f7x.cfg | 2 +- tcl/target/stm32h7x.cfg | 2 +- 12 files changed, 22 insertions(+), 2 deletions(-) diff --git a/tcl/board/stm327x6g_eval.cfg b/tcl/board/stm327x6g_eval.cfg index a5e5896b32..3d522f59d4 100644 --- a/tcl/board/stm327x6g_eval.cfg +++ b/tcl/board/stm327x6g_eval.cfg @@ -8,3 +8,5 @@ set WORKAREASIZE 0x40000 source [find target/stm32f7x.cfg] + +reset_config srst_only diff --git a/tcl/board/stm32f723e-disco.cfg b/tcl/board/stm32f723e-disco.cfg index 3c04d86f01..b809c5e46c 100644 --- a/tcl/board/stm32f723e-disco.cfg +++ b/tcl/board/stm32f723e-disco.cfg @@ -14,6 +14,8 @@ set QUADSPI 1 source [find target/stm32f7x.cfg] +reset_config srst_only + # QUADSPI initialization proc qspi_init { } { global a diff --git a/tcl/board/stm32f746g-disco.cfg b/tcl/board/stm32f746g-disco.cfg index 14e89e162e..5d2c1a4653 100644 --- a/tcl/board/stm32f746g-disco.cfg +++ b/tcl/board/stm32f746g-disco.cfg @@ -14,6 +14,8 @@ set QUADSPI 1 source [find target/stm32f7x.cfg] +reset_config srst_only + # QUADSPI initialization proc qspi_init { } { global a diff --git a/tcl/board/stm32f769i-disco.cfg b/tcl/board/stm32f769i-disco.cfg index cc4334bf4d..75dffd8db7 100644 --- a/tcl/board/stm32f769i-disco.cfg +++ b/tcl/board/stm32f769i-disco.cfg @@ -14,6 +14,8 @@ set QUADSPI 1 source [find target/stm32f7x.cfg] +reset_config srst_only + # QUADSPI initialization proc qspi_init { } { global a diff --git a/tcl/board/stm32f7discovery.cfg b/tcl/board/stm32f7discovery.cfg index 7d1bc9665c..d6cbff465b 100644 --- a/tcl/board/stm32f7discovery.cfg +++ b/tcl/board/stm32f7discovery.cfg @@ -10,3 +10,5 @@ transport select hla_swd set WORKAREASIZE 0x40000 source [find target/stm32f7x.cfg] + +reset_config srst_only diff --git a/tcl/board/stm32h735g-disco.cfg b/tcl/board/stm32h735g-disco.cfg index 405e47024a..cb5caa4af7 100644 --- a/tcl/board/stm32h735g-disco.cfg +++ b/tcl/board/stm32h735g-disco.cfg @@ -17,6 +17,8 @@ if {![info exists OCTOSPI1]} { source [find target/stm32h7x.cfg] +reset_config srst_only + # OCTOSPI initialization # octo: 8-line mode proc octospi_init { octo } { diff --git a/tcl/board/stm32h745i-disco.cfg b/tcl/board/stm32h745i-disco.cfg index 5adcfea164..5a587ae8c5 100644 --- a/tcl/board/stm32h745i-disco.cfg +++ b/tcl/board/stm32h745i-disco.cfg @@ -16,6 +16,8 @@ if {![info exists QUADSPI]} { source [find target/stm32h7x_dual_bank.cfg] +reset_config srst_only + source [find board/stm32h7x_dual_qspi.cfg] $_CHIPNAME.cpu0 configure -event reset-init { diff --git a/tcl/board/stm32h747i-disco.cfg b/tcl/board/stm32h747i-disco.cfg index 22fd74aeae..698ef58846 100644 --- a/tcl/board/stm32h747i-disco.cfg +++ b/tcl/board/stm32h747i-disco.cfg @@ -16,6 +16,8 @@ if {![info exists QUADSPI]} { source [find target/stm32h7x_dual_bank.cfg] +reset_config srst_only + # QUADSPI initialization # qpi: 4-line mode proc qspi_init { qpi } { diff --git a/tcl/board/stm32h750b-disco.cfg b/tcl/board/stm32h750b-disco.cfg index e6062035ae..609cf38537 100644 --- a/tcl/board/stm32h750b-disco.cfg +++ b/tcl/board/stm32h750b-disco.cfg @@ -16,6 +16,8 @@ if {![info exists QUADSPI]} { source [find target/stm32h7x.cfg] +reset_config srst_only + source [find board/stm32h7x_dual_qspi.cfg] $_CHIPNAME.cpu0 configure -event reset-init { diff --git a/tcl/board/stm32h7b3i-disco.cfg b/tcl/board/stm32h7b3i-disco.cfg index e5512eade0..0c4cc23beb 100644 --- a/tcl/board/stm32h7b3i-disco.cfg +++ b/tcl/board/stm32h7b3i-disco.cfg @@ -17,6 +17,8 @@ if {![info exists OCTOSPI1]} { source [find target/stm32h7x_dual_bank.cfg] +reset_config srst_only + # OCTOSPI initialization # octo: 8-line mode proc octospi_init { octo } { diff --git a/tcl/target/stm32f7x.cfg b/tcl/target/stm32f7x.cfg index 3c7679de25..91ab2891ba 100644 --- a/tcl/target/stm32f7x.cfg +++ b/tcl/target/stm32f7x.cfg @@ -82,7 +82,7 @@ if {[using_jtag]} { # # This target is compatible with connect_assert_srst, which may be set in a # board file. -reset_config srst_only srst_nogate +reset_config srst_nogate if {![using_hla]} { # if srst is not fitted use SYSRESETREQ to diff --git a/tcl/target/stm32h7x.cfg b/tcl/target/stm32h7x.cfg index 877976c1ac..f2a5c42c6d 100644 --- a/tcl/target/stm32h7x.cfg +++ b/tcl/target/stm32h7x.cfg @@ -142,7 +142,7 @@ if {[using_jtag]} { # usage does not work with HLA, so is not done by default. That change could be # made in a local configuration file if connect_assert_srst mode is needed for # a specific application and a non-HLA adapter is in use. -reset_config srst_only srst_nogate +reset_config srst_nogate if {![using_hla]} { # if srst is not fitted use SYSRESETREQ to -- 2.30.2