Browse Source

SCRIPT: add add_script_search_dir cmd

Add a add_script_search_dir cmd so that adding search
dir's can be added to cfg scripts.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
tags/v0.5.0-rc1
Spencer Oliver 14 years ago
parent
commit
3ad171cd53
3 changed files with 31 additions and 1 deletions
  1. +9
    -1
      NEWS
  2. +5
    -0
      doc/openocd.texi
  3. +17
    -0
      src/openocd.c

+ 9
- 1
NEWS View File

@@ -16,6 +16,11 @@ JTAG Layer:
Boundary Scan: Boundary Scan:


Target Layer: Target Layer:
MIPS:
- "ejtag_srst" variant removed. The same functionality is
obtained by using "reset_config none".
- added PIC32MX software reset support, this means srst is not
required to be connected anymore.


Flash Layer: Flash Layer:
New "stellaris recover" command, implements the procedure New "stellaris recover" command, implements the procedure
@@ -23,12 +28,15 @@ Flash Layer:
state to the factory defaults, including erasing state to the factory defaults, including erasing
the flash and its protection bits, and possibly the flash and its protection bits, and possibly
re-enabling hardware debugging). re-enabling hardware debugging).

PIC32MX now uses algorithm for flash programming, this
has increased the performance by approx 96%.


Board, Target, and Interface Configuration Scripts: Board, Target, and Interface Configuration Scripts:
Support IAR LPC1768 kickstart board (by Olimex) Support IAR LPC1768 kickstart board (by Olimex)


Core Jim/TCL Scripting: Core Jim/TCL Scripting:
New "add_script_search_dir" command, behaviour is the same
as the "-s" cmd line option.


Documentation: Documentation:




+ 5
- 0
doc/openocd.texi View File

@@ -590,6 +590,7 @@ Configuration files and scripts are searched for in
@enumerate @enumerate
@item the current directory, @item the current directory,
@item any search dir specified on the command line using the @option{-s} option, @item any search dir specified on the command line using the @option{-s} option,
@item any search dir specified using the @command{add_script_search_dir} command,
@item @file{$HOME/.openocd} (not on Windows), @item @file{$HOME/.openocd} (not on Windows),
@item the site wide script library @file{$pkgdatadir/site} and @item the site wide script library @file{$pkgdatadir/site} and
@item the OpenOCD-supplied script library @file{$pkgdatadir/scripts}. @item the OpenOCD-supplied script library @file{$pkgdatadir/scripts}.
@@ -5396,6 +5397,10 @@ Redirect logging to @var{filename};
the initial log output channel is stderr. the initial log output channel is stderr.
@end deffn @end deffn


@deffn Command add_script_search_dir [directory]
Add @var{directory} to the file/script search path.
@end deffn

@anchor{Target State handling} @anchor{Target State handling}
@section Target State handling @section Target State handling
@cindex reset @cindex reset


+ 17
- 0
src/openocd.c View File

@@ -159,6 +159,16 @@ COMMAND_HANDLER(handle_init_command)
return ERROR_OK; return ERROR_OK;
} }


COMMAND_HANDLER(handle_add_script_search_dir_command)
{
if (CMD_ARGC != 1)
return ERROR_COMMAND_SYNTAX_ERROR;

add_script_search_dir(CMD_ARGV[0]);

return ERROR_OK;
}

static const struct command_registration openocd_command_handlers[] = { static const struct command_registration openocd_command_handlers[] = {
{ {
.name = "version", .name = "version",
@@ -181,6 +191,13 @@ static const struct command_registration openocd_command_handlers[] = {
"Unless 'noinit' is called, this command is " "Unless 'noinit' is called, this command is "
"called automatically at the end of startup.", "called automatically at the end of startup.",


},
{
.name = "add_script_search_dir",
.handler = &handle_add_script_search_dir_command,
.mode = COMMAND_ANY,
.help = "dir to search for config files and scripts",

}, },
COMMAND_REGISTRATION_DONE COMMAND_REGISTRATION_DONE
}; };


Loading…
Cancel
Save