This is an automated email from Gerrit.

"zapb <d...@zapb.de>" just uploaded a new patch set to Gerrit, which you can 
find at https://review.openocd.org/c/openocd/+/8255

-- gerrit

commit 444e9dd6035aa3fd2fc9cac11eab3b4f8ff44b62
Author: Marc Schink <d...@zapb.de>
Date:   Sun May 5 15:20:07 2024 +0200

    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 <d...@zapb.de>

diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg
index 0c82c5758a..a9121d3561 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"
                }
        }
 }

-- 

Reply via email to