diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2017-11-04 09:47:02 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2020-03-12 09:43:55 +0000 |
commit | 9f4659ae6b246bcab77d915cee288b2307a926b3 (patch) | |
tree | 90fe7ca0767abdb1998586bbeb575d944641bbc8 /tcl | |
parent | 69f0105324f2fdcd0499ae07ada15d340762d061 (diff) |
target: add examine-fail event
A configuration script may want to check the reason why examine fails
e.g. device has security lock engaged.
tcl/target/kx.cfg and klx.cfg is modified to use the new event
for testing of the security lock of Kinetis MCU
Change-Id: Id1d3a79d24e84b513f4ea35586cd2ab0437ff9b3
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4289
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'tcl')
-rw-r--r-- | tcl/target/klx.cfg | 6 | ||||
-rw-r--r-- | tcl/target/kx.cfg | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/tcl/target/klx.cfg b/tcl/target/klx.cfg index 36b6ed59..84f6535e 100644 --- a/tcl/target/klx.cfg +++ b/tcl/target/klx.cfg @@ -56,9 +56,9 @@ if {[using_hla]} { echo " it without mass erase. Don't set write protection on the first block." echo "!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!" echo "" -} { - # Detect secured MCU or boot lock-up in RESET/WDOG loop - $_CHIPNAME.cpu configure -event examine-start { +} else { + # Detect secured MCU + $_TARGETNAME configure -event examine-fail { kinetis mdm check_security } diff --git a/tcl/target/kx.cfg b/tcl/target/kx.cfg index 0ff5b0c5..1dd5d316 100644 --- a/tcl/target/kx.cfg +++ b/tcl/target/kx.cfg @@ -58,9 +58,13 @@ if {[using_hla]} { echo " it without mass erase. Don't set write protection on the first block." echo "!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!" echo "" -} { +} else { # Detect secured MCU or boot lock-up in RESET/WDOG loop - $_CHIPNAME.cpu configure -event examine-start { + $_TARGETNAME configure -event examine-fail { + kinetis mdm check_security + } + # During RESET/WDOG loop the target is sometimes falsely examined + $_TARGETNAME configure -event examine-end { kinetis mdm check_security } |