diff options
author | Marc Schink <dev@zapb.de> | 2024-05-05 15:20:07 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2024-05-26 09:54:17 +0000 |
commit | 1a00c67e101015ba23b8213604b9cc5725bc1d52 (patch) | |
tree | f7a58b4baf8a977d9af827ad39cdf7af1e5758df /tcl | |
parent | be1aebd8183c5b6b3bbecfc065a84b7e10bd8f8e (diff) | |
download | riscv-openocd-1a00c67e101015ba23b8213604b9cc5725bc1d52.zip riscv-openocd-1a00c67e101015ba23b8213604b9cc5725bc1d52.tar.gz riscv-openocd-1a00c67e101015ba23b8213604b9cc5725bc1d52.tar.bz2 |
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 <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8255
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: <post@frankplowman.com>
Diffstat (limited to 'tcl')
-rw-r--r-- | tcl/target/nrf52.cfg | 9 |
1 files changed, 3 insertions, 6 deletions
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" } } } |