This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8929

-- gerrit

commit cbce1a93ed2ce90f1273bf4c181c770488f9c217
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Wed May 21 15:19:28 2025 +0200

    startup.tcl: extend the file search in vendor folders
    
    To help the dispatching of configuration files in vendor specific
    folders, extend the search of files in vendor folders too.
    
    This feature should be removed later on to prevent clashing on
    files with the same name.
    
    Change-Id: If4793fef27dc570d5df4ff4d77a5e36004f394f6
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl
index e6e76e68fd..112815299c 100644
--- a/src/helper/startup.tcl
+++ b/src/helper/startup.tcl
@@ -7,7 +7,8 @@
 
 # Try flipping / and \ to find file if the filename does not
 # match the precise spelling
-proc find {filename} {
+# lappend _telnet_autocomplete_skip _find_internal
+proc _find_internal {filename} {
        if {[catch {ocd_find $filename} t]==0} {
                return $t
        }
@@ -20,6 +21,23 @@ proc find {filename} {
        # make sure error message matches original input string
        return -code error "Can't find $filename"
 }
+
+proc find {filename} {
+       if {[catch {_find_internal $filename} t]==0} {
+               return $t
+       }
+
+       # Check in vendor specific folder
+       foreach v {nordic ti st} {
+               regsub {([/\\])([^/\\]*$)} $filename "\\1$v\\1\\2" f
+               if {[catch {_find_internal $f} t]==0} {
+                       echo "WARNING: '$filename' is deprecated, use '$f' 
instead"
+                       return $t
+               }
+       }
+
+       return -code error "Can't find $filename"
+}
 add_usage_text find "<file>"
 add_help_text find "print full path to file according to OpenOCD search rules"
 

-- 

Reply via email to