OpenOCD Search path

This is taken from OpenOCD User’s manual

Configuration files and scripts are searched for in

  1. the current directory,
  2. any search dir specified on the command line using the -s option,
  3. any search dir specified using the add_script_search_dir command,
  4. a directory in the OPENOCD_SCRIPTS environment variable (if set),
  5. %APPDATA%/OpenOCD (only on Windows :wine_glass:),
  6. $HOME/Library/Preferences/org.openocd (only on Darwin :apple:),
  7. $XDG_CONFIG_HOME/openocd ( $XDG_CONFIG_HOME defaults to $HOME/.config ),
  8. $HOME/.openocd ,
  9. the site wide script library $pkgdatadir/site ( $pkgdatadir is compile time variable and usually set to /usr/share/openocd/ , and
  10. the OpenOCD-supplied script library $pkgdatadir/scripts .

The first found file with a matching file name will be used.