- fix incorrectly registered function openocd_array2mem

- removed unused variables
- reformatted lpc288x.[ch]
- fixed helper/Makefile.am dependencies
- add correct svn props to added files

git-svn-id: svn://svn.berlios.de/openocd/trunk@829 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
ntfreak
2008-07-18 11:38:23 +00:00
parent 722fcb8d61
commit 60ba4476df
11 changed files with 495 additions and 572 deletions
+6 -8
View File
@@ -1,4 +1,4 @@
INCLUDES = -I$(top_srcdir)/src $(all_includes)
INCLUDES = -I$(top_srcdir)/src $(all_includes) -I$(top_srcdir)/src/target
METASOURCES = AUTO
AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@
noinst_LIBRARIES = libhelper.a
@@ -10,20 +10,18 @@ CONFIGFILES = options.c jim.c
endif
libhelper_a_SOURCES = binarybuffer.c $(CONFIGFILES) configuration.c log.c command.c time_support.c \
replacements.c fileio.c
noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \
time_support.h replacements.h fileio.h \
jim.h
replacements.c fileio.c startup_tcl.c
libhelper_a_SOURCES += startup_tcl.c
noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \
time_support.h replacements.h fileio.h jim.h
noinst_PROGRAMS = bin2char
bin2char_SOURCES = bin2char.c
# Convert .tcl to cfile
startup_tcl.c: bin2char startup.tcl
./bin2char startup_tcl < $(srcdir)/startup.tcl > startup_tcl.c
startup_tcl.c: startup.tcl bin2char$(EXEEXT)
./bin2char$(EXEEXT) startup_tcl < $(srcdir)/$< > $@
# add startup_tcl.c to make clean list
CLEANFILES = startup_tcl.c
+5 -10
View File
@@ -25,8 +25,9 @@
#endif
#include "replacements.h"
#include "target.h"
#include "command.h"
#include "configuration.h"
#include "log.h"
#include "time_support.h"
@@ -44,6 +45,9 @@ Jim_Interp *interp = NULL;
int handle_sleep_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_fast_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int run_command(command_context_t *context, command_t *c, char *words[], int num_words);
static void tcl_output(void *privData, const char *file, int line, const char *function, const char *string)
{
Jim_Obj *tclOutput=(Jim_Obj *)privData;
@@ -178,7 +182,6 @@ command_t* register_command(command_context_t *context, command_t *parent, char
Jim_CreateCommand(interp, full_name, script_command, c, NULL);
free((void *)full_name);
/* accumulate help text in Tcl helptext list. */
Jim_Obj *helptext=Jim_GetGlobalVariableStr(interp, "ocd_helptext", JIM_ERRMSG);
if (Jim_IsShared(helptext))
@@ -207,7 +210,6 @@ int unregister_all_commands(command_context_t *context)
if (context == NULL)
return ERROR_OK;
while(NULL != context->commands)
{
c = context->commands;
@@ -277,7 +279,6 @@ int unregister_command(command_context_t *context, char *name)
return ERROR_OK;
}
void command_output_text(command_context_t *context, const char *data)
{
if( context && context->output_handler && data ){
@@ -435,7 +436,6 @@ int command_run_line(command_context_t *context, char *line)
return retval;
}
int command_run_linef(command_context_t *context, char *format, ...)
{
int retval=ERROR_FAIL;
@@ -451,8 +451,6 @@ int command_run_linef(command_context_t *context, char *format, ...)
return retval;
}
void command_set_output_handler(command_context_t* context, int (*output_handler)(struct command_context_s *context, const char* line), void *priv)
{
context->output_handler = output_handler;
@@ -476,7 +474,6 @@ int command_done(command_context_t *context)
return ERROR_OK;
}
/* find full path to file */
static int jim_find(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
@@ -502,8 +499,6 @@ static int jim_echo(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
return JIM_OK;
}
static size_t openocd_jim_fwrite(const void *_ptr, size_t size, size_t n, void *cookie)
{
size_t nbytes;
-2
View File
@@ -76,14 +76,12 @@ extern int command_run_line(command_context_t *context, char *line);
extern int command_run_linef(command_context_t *context, char *format, ...);
extern void command_output_text(command_context_t *context, const char *data);
#define ERROR_COMMAND_CLOSE_CONNECTION (-600)
#define ERROR_COMMAND_SYNTAX_ERROR (-601)
#define ERROR_COMMAND_NOTFOUND (-602)
extern int fast_and_dangerous;
/* Integrate the JIM TCL interpretor into the command processing. */
#include <stdarg.h>
#ifdef __ECOS
+1 -1
View File
@@ -970,7 +970,7 @@ static void Jim_InitExtension(Jim_Interp *interp)
#ifdef JIM_EMBEDDED
Jim_Interp *ExportedJimCreateInterp(void);
static void Jim_InitEmbedded(void) {
static inline void Jim_InitEmbedded(void) {
Jim_Interp *i = ExportedJimCreateInterp();
Jim_InitExtension(i);
Jim_FreeInterp(i);