From 1a00c67e101015ba23b8213604b9cc5725bc1d52 Mon Sep 17 00:00:00 2001 From: Marc Schink Date: Sun, 5 May 2024 15:20:07 +0200 Subject: tcl/target/nrf52: Use 'error' instead of 'echo' Use 'error' instead of 'echo' for error messages. Otherwise, capturing is always started, for example with an unsupported device. While at it, make the error messages more consistent and clear. Change-Id: I83c9abfb4514e6b638c4be14651e67f768af8bad Signed-off-by: Marc Schink Reviewed-on: https://review.openocd.org/c/openocd/+/8255 Tested-by: jenkins Reviewed-by: Antonio Borneo Reviewed-by: --- tcl/target/nrf52.cfg | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tcl') diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg index 0c82c57..a9121d3 100644 --- a/tcl/target/nrf52.cfg +++ b/tcl/target/nrf52.cfg @@ -133,8 +133,7 @@ proc _proc_pre_enable_$_CHIPNAME.tpiu {_targetname _chipname} { 0x52832 { if { [$_chipname.tpiu cget -protocol] eq "sync" } { if { [$_chipname.tpiu cget -port-width] != 4 } { - echo "Error. Device only supports 4-bit sync traces." - return + error "Device only supports 4-bit sync traces" } # Set TRACECONFIG.TRACEMUX to enable synchronous trace @@ -154,12 +153,10 @@ proc _proc_pre_enable_$_CHIPNAME.tpiu {_targetname _chipname} { 0x52811 - 0x52810 - 0x52805 { - echo "Error: Device does not support TPIU" - return + error "Device does not support TPIU" } default { - echo "Error: Unknown device" - return + error "Unknown device, cannot configure TPIU" } } } -- cgit v1.1