Browse Source

Remove whitespace at end of lines, step 2.

- Replace '\s*$' with ''.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
tags/v0.2.0
zwelch 14 years ago
parent
commit
c97caebccd
40 changed files with 700 additions and 700 deletions
  1. +3
    -3
      src/helper/binarybuffer.h
  2. +1
    -1
      src/helper/command.c
  3. +28
    -28
      src/helper/fileio.c
  4. +13
    -13
      src/helper/jim-eventloop.c
  5. +7
    -7
      src/helper/jim-eventloop.h
  6. +158
    -158
      src/helper/jim.c
  7. +35
    -35
      src/helper/jim.h
  8. +8
    -8
      src/helper/log.h
  9. +10
    -10
      src/helper/options.c
  10. +4
    -4
      src/helper/replacements.c
  11. +12
    -12
      src/helper/time_support.c
  12. +3
    -3
      src/jtag/arm-jtag-ew.c
  13. +4
    -4
      src/jtag/core.c
  14. +11
    -11
      src/jtag/ft2232.c
  15. +1
    -1
      src/jtag/minidriver.h
  16. +2
    -2
      src/jtag/presto.c
  17. +56
    -56
      src/server/server.c
  18. +1
    -1
      src/server/tcl_server.c
  19. +10
    -10
      src/svf/svf.c
  20. +1
    -1
      src/xsvf/xsvf.c
  21. +18
    -18
      testing/examples/AT91R40008Test/inc/typedefs.h
  22. +24
    -24
      testing/examples/AT91R40008Test/src/main.c
  23. +18
    -18
      testing/examples/LPC2148Test/inc/typedefs.h
  24. +24
    -24
      testing/examples/LPC2148Test/src/main.c
  25. +18
    -18
      testing/examples/LPC2294Test/inc/typedefs.h
  26. +24
    -24
      testing/examples/LPC2294Test/src/main.c
  27. +1
    -1
      testing/examples/PIC32/BlinkingLeds.c
  28. +18
    -18
      testing/examples/SAM7S256Test/inc/typedefs.h
  29. +22
    -22
      testing/examples/SAM7S256Test/src/main.c
  30. +18
    -18
      testing/examples/SAM7X256Test/inc/typedefs.h
  31. +22
    -22
      testing/examples/SAM7X256Test/src/main.c
  32. +18
    -18
      testing/examples/STR710JtagSpeed/inc/typedefs.h
  33. +21
    -21
      testing/examples/STR710JtagSpeed/src/main.c
  34. +18
    -18
      testing/examples/STR710Test/inc/typedefs.h
  35. +22
    -22
      testing/examples/STR710Test/src/main.c
  36. +18
    -18
      testing/examples/STR912Test/inc/typedefs.h
  37. +22
    -22
      testing/examples/STR912Test/src/main.c
  38. +1
    -1
      testing/examples/cortex/test.c
  39. +3
    -3
      testing/examples/ledtest-imx27ads/test.c
  40. +2
    -2
      testing/examples/ledtest-imx31pdk/test.c

+ 3
- 3
src/helper/binarybuffer.h View File

@@ -41,7 +41,7 @@ static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int
} else } else
{ {
unsigned int i; unsigned int i;
for (i = first; i < first + num; i++) for (i = first; i < first + num; i++)
{ {
if (((value >> (i-first))&1) == 1) if (((value >> (i-first))&1) == 1)
@@ -60,13 +60,13 @@ static inline uint32_t buf_get_u32(const uint8_t* buffer, unsigned int first, un
{ {
uint32_t result = 0; uint32_t result = 0;
unsigned int i; unsigned int i;
for (i = first; i < first + num; i++) for (i = first; i < first + num; i++)
{ {
if (((buffer[i/8]>>(i%8))&1) == 1) if (((buffer[i/8]>>(i%8))&1) == 1)
result |= 1 << (i-first); result |= 1 << (i-first);
} }
return result; return result;
} }
} }


+ 1
- 1
src/helper/command.c View File

@@ -896,7 +896,7 @@ DEFINE_PARSE_NUM_TYPE(_llong, long long, strtoll, LLONG_MIN, LLONG_MAX)
return ERROR_COMMAND_ARGUMENT_UNDERFLOW; \ return ERROR_COMMAND_ARGUMENT_UNDERFLOW; \
*ul = n; \ *ul = n; \
return ERROR_OK; \ return ERROR_OK; \
}
}


#define DEFINE_PARSE_ULONG(name, type, min, max) \ #define DEFINE_PARSE_ULONG(name, type, min, max) \
DEFINE_PARSE_WRAPPER(name, type, min, max, unsigned long, _ulong) DEFINE_PARSE_WRAPPER(name, type, min, max, unsigned long, _ulong)


+ 28
- 28
src/helper/fileio.c View File

@@ -34,7 +34,7 @@
static inline int fileio_open_local(fileio_t *fileio) static inline int fileio_open_local(fileio_t *fileio)
{ {
char access[4]; char access[4];
switch (fileio->access) switch (fileio->access)
{ {
case FILEIO_READ: case FILEIO_READ:
@@ -47,16 +47,16 @@ static inline int fileio_open_local(fileio_t *fileio)
strcpy(access, "w+"); strcpy(access, "w+");
break; break;
case FILEIO_APPEND: case FILEIO_APPEND:
strcpy(access, "a");
strcpy(access, "a");
break; break;
case FILEIO_APPENDREAD: case FILEIO_APPENDREAD:
strcpy(access, "a+");
strcpy(access, "a+");
break; break;
default: default:
LOG_ERROR("BUG: access neither read, write nor readwrite"); LOG_ERROR("BUG: access neither read, write nor readwrite");
return ERROR_INVALID_ARGUMENTS; return ERROR_INVALID_ARGUMENTS;
} }
/* win32 always opens in binary mode */ /* win32 always opens in binary mode */
#ifndef _WIN32 #ifndef _WIN32
if (fileio->type == FILEIO_BINARY) if (fileio->type == FILEIO_BINARY)
@@ -64,26 +64,26 @@ static inline int fileio_open_local(fileio_t *fileio)
{ {
strcat(access, "b"); strcat(access, "b");
} }
if (!(fileio->file = open_file_from_path (fileio->url, access))) if (!(fileio->file = open_file_from_path (fileio->url, access)))
{ {
LOG_ERROR("couldn't open %s", fileio->url); LOG_ERROR("couldn't open %s", fileio->url);
return ERROR_FILEIO_OPERATION_FAILED; return ERROR_FILEIO_OPERATION_FAILED;
} }
if ((fileio->access != FILEIO_WRITE) || (fileio->access == FILEIO_READWRITE)) if ((fileio->access != FILEIO_WRITE) || (fileio->access == FILEIO_READWRITE))
{ {
/* NB! Here we use fseek() instead of stat(), since stat is a /* NB! Here we use fseek() instead of stat(), since stat is a
* more advanced operation that might not apply to e.g. a disk path * more advanced operation that might not apply to e.g. a disk path
* that refers to e.g. a tftp client */ * that refers to e.g. a tftp client */
int result, result2; int result, result2;
result = fseek(fileio->file, 0, SEEK_END); result = fseek(fileio->file, 0, SEEK_END);


fileio->size = ftell(fileio->file); fileio->size = ftell(fileio->file);
result2 = fseek(fileio->file, 0, SEEK_SET);
result2 = fseek(fileio->file, 0, SEEK_SET);
if ((fileio->size < 0)||(result < 0)||(result2 < 0)) if ((fileio->size < 0)||(result < 0)||(result2 < 0))
{ {
fileio_close(fileio); fileio_close(fileio);
@@ -94,7 +94,7 @@ static inline int fileio_open_local(fileio_t *fileio)
{ {
fileio->size = 0x0; fileio->size = 0x0;
} }
return ERROR_OK; return ERROR_OK;
} }


@@ -105,7 +105,7 @@ int fileio_open(fileio_t *fileio, const char *url, enum fileio_access access, en
fileio->type = type; fileio->type = type;
fileio->access = access; fileio->access = access;
fileio->url = strdup(url); fileio->url = strdup(url);
retval = fileio_open_local(fileio); retval = fileio_open_local(fileio);


return retval; return retval;
@@ -127,19 +127,19 @@ static inline int fileio_close_local(fileio_t *fileio)


return ERROR_FILEIO_OPERATION_FAILED; return ERROR_FILEIO_OPERATION_FAILED;
} }
return ERROR_OK; return ERROR_OK;
} }


int fileio_close(fileio_t *fileio) int fileio_close(fileio_t *fileio)
{ {
int retval; int retval;
retval = fileio_close_local(fileio); retval = fileio_close_local(fileio);
free(fileio->url); free(fileio->url);
fileio->url = NULL; fileio->url = NULL;
return retval; return retval;
} }


@@ -151,14 +151,14 @@ int fileio_seek(fileio_t *fileio, uint32_t position)
LOG_ERROR("couldn't seek file %s: %s", fileio->url, strerror(errno)); LOG_ERROR("couldn't seek file %s: %s", fileio->url, strerror(errno));
return ERROR_FILEIO_OPERATION_FAILED; return ERROR_FILEIO_OPERATION_FAILED;
} }
return ERROR_OK; return ERROR_OK;
} }


static inline int fileio_local_read(fileio_t *fileio, uint32_t size, uint8_t *buffer, uint32_t *size_read) static inline int fileio_local_read(fileio_t *fileio, uint32_t size, uint8_t *buffer, uint32_t *size_read)
{ {
*size_read = fread(buffer, 1, size, fileio->file); *size_read = fread(buffer, 1, size, fileio->file);
return ERROR_OK; return ERROR_OK;
} }


@@ -172,11 +172,11 @@ int fileio_read_u32(fileio_t *fileio, uint32_t *data)
uint8_t buf[4]; uint8_t buf[4];
uint32_t size_read; uint32_t size_read;
int retval; int retval;
if ((retval = fileio_local_read(fileio, 4, buf, &size_read)) != ERROR_OK) if ((retval = fileio_local_read(fileio, 4, buf, &size_read)) != ERROR_OK)
return retval; return retval;
*data = be_to_h_u32(buf); *data = be_to_h_u32(buf);
return ERROR_OK; return ERROR_OK;
} }


@@ -184,7 +184,7 @@ static inline int fileio_local_fgets(fileio_t *fileio, uint32_t size, char *buff
{ {
if (fgets(buffer, size, fileio->file) == NULL) if (fgets(buffer, size, fileio->file) == NULL)
return ERROR_FILEIO_OPERATION_FAILED; return ERROR_FILEIO_OPERATION_FAILED;
return ERROR_OK; return ERROR_OK;
} }


@@ -196,19 +196,19 @@ int fileio_fgets(fileio_t *fileio, uint32_t size, char *buffer)
static inline int fileio_local_write(fileio_t *fileio, uint32_t size, const uint8_t *buffer, uint32_t *size_written) static inline int fileio_local_write(fileio_t *fileio, uint32_t size, const uint8_t *buffer, uint32_t *size_written)
{ {
*size_written = fwrite(buffer, 1, size, fileio->file); *size_written = fwrite(buffer, 1, size, fileio->file);
return ERROR_OK; return ERROR_OK;
} }


int fileio_write(fileio_t *fileio, uint32_t size, const uint8_t *buffer, uint32_t *size_written) int fileio_write(fileio_t *fileio, uint32_t size, const uint8_t *buffer, uint32_t *size_written)
{ {
int retval; int retval;
retval = fileio_local_write(fileio, size, buffer, size_written); retval = fileio_local_write(fileio, size, buffer, size_written);
if (retval == ERROR_OK) if (retval == ERROR_OK)
fileio->size += *size_written; fileio->size += *size_written;
return retval;; return retval;;
} }


@@ -217,11 +217,11 @@ int fileio_write_u32(fileio_t *fileio, uint32_t data)
uint8_t buf[4]; uint8_t buf[4];
uint32_t size_written; uint32_t size_written;
int retval; int retval;
h_u32_to_be(buf, data); h_u32_to_be(buf, data);
if ((retval = fileio_local_write(fileio, 4, buf, &size_written)) != ERROR_OK) if ((retval = fileio_local_write(fileio, 4, buf, &size_written)) != ERROR_OK)
return retval; return retval;
return ERROR_OK; return ERROR_OK;
} }

+ 13
- 13
src/helper/jim-eventloop.c View File

@@ -2,25 +2,25 @@
* *
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
* Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net>
* Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
* Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
* Copyright 2008 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com * Copyright 2008 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com
* Copyright 2008 Andrew Lunn <andrew@lunn.ch> * Copyright 2008 Andrew Lunn <andrew@lunn.ch>
* Copyright 2008 Duane Ellis <openocd@duaneellis.com> * Copyright 2008 Duane Ellis <openocd@duaneellis.com>
* Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de> * Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de>
*
*
* The FreeBSD license * The FreeBSD license
*
*
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
*
*
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above * 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following * copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials * disclaimer in the documentation and/or other materials
* provided with the distribution. * provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -33,7 +33,7 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* The views and conclusions contained in the software and documentation * The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing * are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the Jim Tcl Project. * official policies, either expressed or implied, of the Jim Tcl Project.
@@ -133,12 +133,12 @@ void Jim_DeleteFileHandler(Jim_Interp *interp, void *handle)
} }


// The same for signals. // The same for signals.
void Jim_CreateSignalHandler(Jim_Interp *interp, int signum,
void Jim_CreateSignalHandler(Jim_Interp *interp, int signum,
Jim_FileProc *proc, void *clientData, Jim_FileProc *proc, void *clientData,
Jim_EventFinalizerProc *finalizerProc) Jim_EventFinalizerProc *finalizerProc)
{ {
} }
void Jim_DeleteSignalHandler(Jim_Interp *interp, int signum)
void Jim_DeleteSignalHandler(Jim_Interp *interp, int signum)
{ {
} }


@@ -192,7 +192,7 @@ jim_wide Jim_DeleteTimeHandler(Jim_Interp *interp, jim_wide id)
JimGetTime(&cur_sec, &cur_ms); JimGetTime(&cur_sec, &cur_ms);


te = eventLoop->timeEventHead; te = eventLoop->timeEventHead;
if (id >= eventLoop->timeEventNextId)
if (id >= eventLoop->timeEventNextId)
return -2; /* wrong event ID */ return -2; /* wrong event ID */
while (te) { while (te) {
if (te->id == id) { if (te->id == id) {
@@ -271,7 +271,7 @@ int Jim_ProcessEvents(Jim_Interp *interp, int flags)
while (fe != NULL) { while (fe != NULL) {
int fd = fileno((FILE*)fe->handle); int fd = fileno((FILE*)fe->handle);


if (fe->mask & JIM_EVENT_READABLE)
if (fe->mask & JIM_EVENT_READABLE)
FD_SET(fd, &rfds); FD_SET(fd, &rfds);
if (fe->mask & JIM_EVENT_WRITABLE) FD_SET(fd, &wfds); if (fe->mask & JIM_EVENT_WRITABLE) FD_SET(fd, &wfds);
if (fe->mask & JIM_EVENT_EXCEPTION) FD_SET(fd, &efds); if (fe->mask & JIM_EVENT_EXCEPTION) FD_SET(fd, &efds);
@@ -419,7 +419,7 @@ void JimELAssocDataDeleProc(Jim_Interp *interp, void *data)
Jim_Free(data); Jim_Free(data);
} }


static int JimELVwaitCommand(Jim_Interp *interp, int argc,
static int JimELVwaitCommand(Jim_Interp *interp, int argc,
Jim_Obj *const *argv) Jim_Obj *const *argv)
{ {
Jim_Obj *oldValue; Jim_Obj *oldValue;
@@ -461,7 +461,7 @@ void JimAfterTimeEventFinalizer(Jim_Interp *interp, void *clientData)
Jim_DecrRefCount(interp, objPtr); Jim_DecrRefCount(interp, objPtr);
} }


static int JimELAfterCommand(Jim_Interp *interp, int argc,
static int JimELAfterCommand(Jim_Interp *interp, int argc,
Jim_Obj *const *argv) Jim_Obj *const *argv)
{ {
jim_wide ms, id; jim_wide ms, id;
@@ -510,7 +510,7 @@ static int JimELAfterCommand(Jim_Interp *interp, int argc,
} }
default: default:
fprintf(stderr,"unserviced option to after %d\n",option); fprintf(stderr,"unserviced option to after %d\n",option);
}
}
return JIM_OK; return JIM_OK;
} }




+ 7
- 7
src/helper/jim-eventloop.h View File

@@ -2,25 +2,25 @@
* *
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
* Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net>
* Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
* Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
* Copyright 2008 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com * Copyright 2008 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com
* Copyright 2008 Andrew Lunn <andrew@lunn.ch> * Copyright 2008 Andrew Lunn <andrew@lunn.ch>
* Copyright 2008 Duane Ellis <openocd@duaneellis.com> * Copyright 2008 Duane Ellis <openocd@duaneellis.com>
* Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de> * Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de>
*
*
* The FreeBSD license * The FreeBSD license
*
*
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
*
*
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above * 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following * copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials * disclaimer in the documentation and/or other materials
* provided with the distribution. * provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -33,7 +33,7 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* The views and conclusions contained in the software and documentation * The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing * are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the Jim Tcl Project. * official policies, either expressed or implied, of the Jim Tcl Project.
@@ -64,7 +64,7 @@ typedef void Jim_EventFinalizerProc(Jim_Interp *interp, void *clientData);
#define JIM_EVENT_FEOF 8 #define JIM_EVENT_FEOF 8


#define JIM_API(x) x #define JIM_API(x) x
#define JIM_STATIC
#define JIM_STATIC


JIM_STATIC int Jim_EventLoopOnLoad(Jim_Interp *interp); JIM_STATIC int Jim_EventLoopOnLoad(Jim_Interp *interp);




+ 158
- 158
src/helper/jim.c
File diff suppressed because it is too large
View File


+ 35
- 35
src/helper/jim.h View File

@@ -2,25 +2,25 @@
* *
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
* Copyright 2005 Clemens Hintze <c.hintze@gmx.net> * Copyright 2005 Clemens Hintze <c.hintze@gmx.net>
* Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
* Copyright 2005 patthoyts - Pat Thoyts <patthoyts@users.sf.net>
* Copyright 2008 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com * Copyright 2008 oharboe - Øyvind Harboe - oyvind.harboe@zylin.com
* Copyright 2008 Andrew Lunn <andrew@lunn.ch> * Copyright 2008 Andrew Lunn <andrew@lunn.ch>
* Copyright 2008 Duane Ellis <openocd@duaneellis.com> * Copyright 2008 Duane Ellis <openocd@duaneellis.com>
* Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de> * Copyright 2008 Uwe Klein <uklein@klein-messgeraete.de>
*
*
* The FreeBSD license * The FreeBSD license
*
*
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
*
*
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above * 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following * copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials * disclaimer in the documentation and/or other materials
* provided with the distribution. * provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -33,12 +33,12 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* The views and conclusions contained in the software and documentation * The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing * are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the Jim Tcl Project. * official policies, either expressed or implied, of the Jim Tcl Project.
* *
*--- Inline Header File Documentation ---
*--- Inline Header File Documentation ---
* [By Duane Ellis, openocd@duaneellis.com, 8/18/8] * [By Duane Ellis, openocd@duaneellis.com, 8/18/8]
* *
* Belief is "Jim" would greatly benifit if Jim Internals where * Belief is "Jim" would greatly benifit if Jim Internals where
@@ -403,7 +403,7 @@ typedef void (Jim_FreeInternalRepProc)(struct Jim_Interp *interp,
typedef void (Jim_DupInternalRepProc)(struct Jim_Interp *interp, typedef void (Jim_DupInternalRepProc)(struct Jim_Interp *interp,
struct Jim_Obj *srcPtr, Jim_Obj *dupPtr); struct Jim_Obj *srcPtr, Jim_Obj *dupPtr);
typedef void (Jim_UpdateStringProc)(struct Jim_Obj *objPtr); typedef void (Jim_UpdateStringProc)(struct Jim_Obj *objPtr);
typedef struct Jim_ObjType { typedef struct Jim_ObjType {
const char *name; /* The name of the type. */ const char *name; /* The name of the type. */
Jim_FreeInternalRepProc *freeIntRepProc; Jim_FreeInternalRepProc *freeIntRepProc;
@@ -449,7 +449,7 @@ typedef struct Jim_Var {
Jim_Obj *objPtr; Jim_Obj *objPtr;
struct Jim_CallFrame *linkFramePtr; struct Jim_CallFrame *linkFramePtr;
} Jim_Var; } Jim_Var;
/* The cmd structure. */ /* The cmd structure. */
typedef int (*Jim_CmdProc)(struct Jim_Interp *interp, int argc, typedef int (*Jim_CmdProc)(struct Jim_Interp *interp, int argc,
Jim_Obj *const *argv); Jim_Obj *const *argv);
@@ -591,7 +591,7 @@ typedef struct Jim_Reference {
* }; * };
* *
* Jim_Nvp *result * Jim_Nvp *result
* e = Jim_Nvp_name2value(interp, yn, "y", &result);
* e = Jim_Nvp_name2value(interp, yn, "y", &result);
* returns &yn[0]; * returns &yn[0];
* e = Jim_Nvp_name2value(interp, yn, "n", &result); * e = Jim_Nvp_name2value(interp, yn, "n", &result);
* returns &yn[1]; * returns &yn[1];
@@ -605,7 +605,7 @@ typedef struct {
const char *name; const char *name;
int value; int value;
} Jim_Nvp; } Jim_Nvp;


/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Exported API prototypes. * Exported API prototypes.
@@ -628,7 +628,7 @@ typedef struct {
#define Jim_FreeHashTableIterator(iter) Jim_Free(iter) #define Jim_FreeHashTableIterator(iter) Jim_Free(iter)


#ifdef DOXYGEN #ifdef DOXYGEN
#define JIM_STATIC
#define JIM_STATIC
#define JIM_API(X) X #define JIM_API(X) X
#else #else
#ifndef __JIM_CORE__ #ifndef __JIM_CORE__
@@ -758,15 +758,15 @@ JIM_STATIC void * JIM_API(Jim_SetStderr) (Jim_Interp *interp, void *fp);


/* commands */ /* commands */
JIM_STATIC void JIM_API(Jim_RegisterCoreCommands) (Jim_Interp *interp); JIM_STATIC void JIM_API(Jim_RegisterCoreCommands) (Jim_Interp *interp);
JIM_STATIC int JIM_API(Jim_CreateCommand) (Jim_Interp *interp,
JIM_STATIC int JIM_API(Jim_CreateCommand) (Jim_Interp *interp,
const char *cmdName, Jim_CmdProc cmdProc, void *privData, const char *cmdName, Jim_CmdProc cmdProc, void *privData,
Jim_DelCmdProc delProc); Jim_DelCmdProc delProc);
JIM_STATIC int JIM_API(Jim_CreateProcedure) (Jim_Interp *interp,
JIM_STATIC int JIM_API(Jim_CreateProcedure) (Jim_Interp *interp,
const char *cmdName, Jim_Obj *argListObjPtr, Jim_Obj *staticsListObjPtr, const char *cmdName, Jim_Obj *argListObjPtr, Jim_Obj *staticsListObjPtr,
Jim_Obj *bodyObjPtr, int arityMin, int arityMax); Jim_Obj *bodyObjPtr, int arityMin, int arityMax);
JIM_STATIC int JIM_API(Jim_DeleteCommand) (Jim_Interp *interp, JIM_STATIC int JIM_API(Jim_DeleteCommand) (Jim_Interp *interp,
const char *cmdName); const char *cmdName);
JIM_STATIC int JIM_API(Jim_RenameCommand) (Jim_Interp *interp,
JIM_STATIC int JIM_API(Jim_RenameCommand) (Jim_Interp *interp,
const char *oldName, const char *newName); const char *oldName, const char *newName);
JIM_STATIC Jim_Cmd * JIM_API(Jim_GetCommand) (Jim_Interp *interp, JIM_STATIC Jim_Cmd * JIM_API(Jim_GetCommand) (Jim_Interp *interp,
Jim_Obj *objPtr, int flags); Jim_Obj *objPtr, int flags);
@@ -865,7 +865,7 @@ JIM_STATIC void JIM_API(Jim_SetDouble)(Jim_Interp *interp, Jim_Obj *objPtr,
JIM_STATIC Jim_Obj * JIM_API(Jim_NewDoubleObj)(Jim_Interp *interp, double doubleValue); JIM_STATIC Jim_Obj * JIM_API(Jim_NewDoubleObj)(Jim_Interp *interp, double doubleValue);


/* shared strings */ /* shared strings */
JIM_STATIC const char * JIM_API(Jim_GetSharedString) (Jim_Interp *interp,
JIM_STATIC const char * JIM_API(Jim_GetSharedString) (Jim_Interp *interp,
const char *str); const char *str);
JIM_STATIC void JIM_API(Jim_ReleaseSharedString) (Jim_Interp *interp, JIM_STATIC void JIM_API(Jim_ReleaseSharedString) (Jim_Interp *interp,
const char *str); const char *str);
@@ -875,9 +875,9 @@ JIM_STATIC void JIM_API(Jim_WrongNumArgs) (Jim_Interp *interp, int argc,
Jim_Obj *const *argv, const char *msg); Jim_Obj *const *argv, const char *msg);
JIM_STATIC int JIM_API(Jim_GetEnum) (Jim_Interp *interp, Jim_Obj *objPtr, JIM_STATIC int JIM_API(Jim_GetEnum) (Jim_Interp *interp, Jim_Obj *objPtr,
const char * const *tablePtr, int *indexPtr, const char *name, int flags); const char * const *tablePtr, int *indexPtr, const char *name, int flags);
JIM_STATIC int JIM_API(Jim_GetNvp) (Jim_Interp *interp,
JIM_STATIC int JIM_API(Jim_GetNvp) (Jim_Interp *interp,
Jim_Obj *objPtr, Jim_Obj *objPtr,
const Jim_Nvp *nvp_table,
const Jim_Nvp *nvp_table,
const Jim_Nvp **result); const Jim_Nvp **result);
JIM_STATIC int JIM_API(Jim_ScriptIsComplete) (const char *s, int len, JIM_STATIC int JIM_API(Jim_ScriptIsComplete) (const char *s, int len,
char *stateCharPtr); char *stateCharPtr);
@@ -892,7 +892,7 @@ JIM_STATIC int JIM_API(Jim_DeleteAssocData)(Jim_Interp *interp, const char *key)
/* API import/export functions */ /* API import/export functions */
JIM_STATIC int JIM_API(Jim_GetApi) (Jim_Interp *interp, const char *funcname, JIM_STATIC int JIM_API(Jim_GetApi) (Jim_Interp *interp, const char *funcname,
void *targetPtrPtr); void *targetPtrPtr);
JIM_STATIC int JIM_API(Jim_RegisterApi) (Jim_Interp *interp,
JIM_STATIC int JIM_API(Jim_RegisterApi) (Jim_Interp *interp,
const char *funcname, void *funcptr); const char *funcname, void *funcptr);


/* Packages C API */ /* Packages C API */
@@ -932,20 +932,20 @@ JIM_STATIC int JIM_API(Jim_Nvp_name2value_obj_nocase)(Jim_Interp *interp, const
JIM_STATIC int JIM_API(Jim_Nvp_value2name_obj)(Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *value_obj, Jim_Nvp **result); JIM_STATIC int JIM_API(Jim_Nvp_value2name_obj)(Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *value_obj, Jim_Nvp **result);


/** prints a nice 'unknown' parameter error message to the 'result' */ /** prints a nice 'unknown' parameter error message to the 'result' */
JIM_STATIC void JIM_API(Jim_SetResult_NvpUnknown)(Jim_Interp *interp,
JIM_STATIC void JIM_API(Jim_SetResult_NvpUnknown)(Jim_Interp *interp,
Jim_Obj *param_name, Jim_Obj *param_name,
Jim_Obj *param_value, Jim_Obj *param_value,
const Jim_Nvp *nvp_table); const Jim_Nvp *nvp_table);




/** Debug: convert argc/argv into a printable string for printf() debug /** Debug: convert argc/argv into a printable string for printf() debug
*
*
* \param interp - the interpeter * \param interp - the interpeter
* \param argc - arg count * \param argc - arg count
* \param argv - the objects * \param argv - the objects
* *
* \returns string pointer holding the text. * \returns string pointer holding the text.
*
*
* Note, next call to this function will free the old (last) string. * Note, next call to this function will free the old (last) string.
* *
* For example might want do this: * For example might want do this:
@@ -958,11 +958,11 @@ JIM_STATIC void JIM_API(Jim_SetResult_NvpUnknown)(Jim_Interp *interp,
JIM_STATIC const char *JIM_API(Jim_Debug_ArgvString)(Jim_Interp *interp, int argc, Jim_Obj *const *argv); JIM_STATIC const char *JIM_API(Jim_Debug_ArgvString)(Jim_Interp *interp, int argc, Jim_Obj *const *argv);




/** A TCL -ish GetOpt like code.
/** A TCL -ish GetOpt like code.
* *
* Some TCL objects have various "configuration" values. * Some TCL objects have various "configuration" values.
* For example - in Tcl/Tk the "buttons" have many options. * For example - in Tcl/Tk the "buttons" have many options.
*
*
* Usefull when dealing with command options. * Usefull when dealing with command options.
* that may come in any order... * that may come in any order...
* *
@@ -972,7 +972,7 @@ JIM_STATIC const char *JIM_API(Jim_Debug_ArgvString)(Jim_Interp *interp, int arg


typedef struct jim_getopt { typedef struct jim_getopt {
Jim_Interp *interp; Jim_Interp *interp;
int argc;
int argc;
Jim_Obj * const * argv; Jim_Obj * const * argv;
int isconfigure; /* non-zero if configure */ int isconfigure; /* non-zero if configure */
} Jim_GetOptInfo; } Jim_GetOptInfo;
@@ -981,7 +981,7 @@ typedef struct jim_getopt {
* *
* Example (short and incomplete): * Example (short and incomplete):
* \code * \code
* Jim_GetOptInfo goi;
* Jim_GetOptInfo goi;
* *
* Jim_GetOpt_Setup(&goi, interp, argc, argv); * Jim_GetOpt_Setup(&goi, interp, argc, argv);
* *
@@ -1016,10 +1016,10 @@ typedef struct jim_getopt {
* } * }
* *
* \endcode * \endcode
*
*
*/ */


/** Setup GETOPT
/** Setup GETOPT
* *
* \param goi - get opt info to be initialized * \param goi - get opt info to be initialized
* \param interp - jim interp * \param interp - jim interp
@@ -1028,14 +1028,14 @@ typedef struct jim_getopt {
* *
* \code * \code
* Jim_GetOptInfo goi; * Jim_GetOptInfo goi;
*
*
* Jim_GetOptSetup(&goi, interp, argc, argv); * Jim_GetOptSetup(&goi, interp, argc, argv);
* \endcode * \endcode
*/ */


JIM_STATIC int JIM_API(Jim_GetOpt_Setup)(Jim_GetOptInfo *goi,
Jim_Interp *interp,
int argc,
JIM_STATIC int JIM_API(Jim_GetOpt_Setup)(Jim_GetOptInfo *goi,
Jim_Interp *interp,
int argc,
Jim_Obj * const * argv); Jim_Obj * const * argv);




@@ -1050,7 +1050,7 @@ JIM_STATIC void JIM_API(Jim_GetOpt_Debug)(Jim_GetOptInfo *goi);
* *
* \param goi - get opt info * \param goi - get opt info
* \param puthere - where param is put * \param puthere - where param is put
*
*
*/ */
JIM_STATIC int JIM_API(Jim_GetOpt_Obj)(Jim_GetOptInfo *goi, Jim_Obj **puthere); JIM_STATIC int JIM_API(Jim_GetOpt_Obj)(Jim_GetOptInfo *goi, Jim_Obj **puthere);


@@ -1103,7 +1103,7 @@ JIM_STATIC int JIM_API(Jim_GetOpt_Nvp)(Jim_GetOptInfo *goi, const Jim_Nvp *looku
* \code * \code
* *
* while (goi.argc) { * while (goi.argc) {
* // Get the next option
* // Get the next option
* e = Jim_GetOpt_Nvp(&goi, cmd_options, &n); * e = Jim_GetOpt_Nvp(&goi, cmd_options, &n);
* if (e != JIM_OK) { * if (e != JIM_OK) {
* // option was not recognized * // option was not recognized
@@ -1281,7 +1281,7 @@ static void Jim_InitExtension(Jim_Interp *interp)
JIM_GET_API(Nvp_name2value); JIM_GET_API(Nvp_name2value);
JIM_GET_API(Nvp_name2value_nocase); JIM_GET_API(Nvp_name2value_nocase);
JIM_GET_API(Nvp_name2value_simple); JIM_GET_API(Nvp_name2value_simple);
JIM_GET_API(Nvp_value2name); JIM_GET_API(Nvp_value2name);
JIM_GET_API(Nvp_value2name_simple); JIM_GET_API(Nvp_value2name_simple);




+ 8
- 8
src/helper/log.h View File

@@ -28,12 +28,12 @@


#include "command.h" #include "command.h"


/* logging priorities
* LOG_LVL_SILENT - turn off all output. In lieu of try + catch this can be used as a
/* logging priorities
* LOG_LVL_SILENT - turn off all output. In lieu of try + catch this can be used as a
* feeble ersatz. * feeble ersatz.
* LOG_LVL_USER - user messages. Could be anything from information
* LOG_LVL_USER - user messages. Could be anything from information
* to progress messags. These messages do not represent * to progress messags. These messages do not represent
* incorrect or unexpected behaviour, just normal execution.
* incorrect or unexpected behaviour, just normal execution.
* LOG_LVL_ERROR - fatal errors, that are likely to cause program abort * LOG_LVL_ERROR - fatal errors, that are likely to cause program abort
* LOG_LVL_WARNING - non-fatal errors, that may be resolved later * LOG_LVL_WARNING - non-fatal errors, that may be resolved later
* LOG_LVL_INFO - state information, etc. * LOG_LVL_INFO - state information, etc.
@@ -50,11 +50,11 @@ enum log_levels
LOG_LVL_DEBUG = 3 LOG_LVL_DEBUG = 3
}; };


extern void log_printf(enum log_levels level, const char *file, int line,
const char *function, const char *format, ...)
extern void log_printf(enum log_levels level, const char *file, int line,
const char *function, const char *format, ...)
__attribute__ ((format (printf, 5, 6))); __attribute__ ((format (printf, 5, 6)));
extern void log_printf_lf(enum log_levels level, const char *file, int line, extern void log_printf_lf(enum log_levels level, const char *file, int line,
const char *function, const char *format, ...)
const char *function, const char *format, ...)
__attribute__ ((format (printf, 5, 6))); __attribute__ ((format (printf, 5, 6)));
extern int log_register_commands(struct command_context_s *cmd_ctx); extern int log_register_commands(struct command_context_s *cmd_ctx);
extern int log_init(struct command_context_s *cmd_ctx); extern int log_init(struct command_context_s *cmd_ctx);
@@ -118,7 +118,7 @@ extern int debug_level;
#define ERROR_INVALID_ARGUMENTS ERROR_COMMAND_SYNTAX_ERROR #define ERROR_INVALID_ARGUMENTS ERROR_COMMAND_SYNTAX_ERROR
#define ERROR_NO_CONFIG_FILE (-2) #define ERROR_NO_CONFIG_FILE (-2)
#define ERROR_BUF_TOO_SMALL (-3) #define ERROR_BUF_TOO_SMALL (-3)
/* see "Error:" log entry for meaningful message to the user. The caller should
/* see "Error:" log entry for meaningful message to the user. The caller should
* make no assumptions about what went wrong and try to handle the problem. * make no assumptions about what went wrong and try to handle the problem.
*/ */
#define ERROR_FAIL (-4) #define ERROR_FAIL (-4)


+ 10
- 10
src/helper/options.c View File

@@ -58,7 +58,7 @@ int add_default_dirs(void)
#ifdef _WIN32 #ifdef _WIN32
/* Add the parent of the directory where openocd.exe resides to the /* Add the parent of the directory where openocd.exe resides to the
* config script search path. * config script search path.
* Directory layout:
* Directory layout:
* bin\openocd.exe * bin\openocd.exe
* lib\openocd * lib\openocd
* event\at91eb40a_reset.cfg * event\at91eb40a_reset.cfg
@@ -68,7 +68,7 @@ int add_default_dirs(void)
char strExePath [MAX_PATH]; char strExePath [MAX_PATH];
GetModuleFileName (NULL, strExePath, MAX_PATH); GetModuleFileName (NULL, strExePath, MAX_PATH);
/* Either this code will *always* work or it will SEGFAULT giving /* Either this code will *always* work or it will SEGFAULT giving
* excellent information on the culprit.
* excellent information on the culprit.
*/ */
*strrchr(strExePath, '\\') = 0; *strrchr(strExePath, '\\') = 0;
strcat(strExePath, "\\.."); strcat(strExePath, "\\..");
@@ -115,16 +115,16 @@ int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]
char command_buffer[128]; char command_buffer[128];


while (1) while (1)
{
{
/* getopt_long stores the option index here. */ /* getopt_long stores the option index here. */
int option_index = 0; int option_index = 0;
c = getopt_long(argc, argv, "hvd::l:f:s:c:p", long_options, &option_index); c = getopt_long(argc, argv, "hvd::l:f:s:c:p", long_options, &option_index);
/* Detect the end of the options. */ /* Detect the end of the options. */
if (c == -1) if (c == -1)
break; break;
switch (c) switch (c)
{ {
case 0: case 0:
@@ -156,13 +156,13 @@ int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]
{ {
snprintf(command_buffer, 128, "log_output %s", optarg); snprintf(command_buffer, 128, "log_output %s", optarg);
command_run_line(cmd_ctx, command_buffer); command_run_line(cmd_ctx, command_buffer);
}
}
break; break;
case 'c': /* --command | -c */ case 'c': /* --command | -c */
if (optarg) if (optarg)
{ {
add_config_command(optarg); add_config_command(optarg);
}
}
break; break;
case 'p': /* --pipe | -p */ case 'p': /* --pipe | -p */
#if BUILD_ECOSBOARD == 1 #if BUILD_ECOSBOARD == 1
@@ -187,7 +187,7 @@ int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]
LOG_OUTPUT("--command | -c\trun <command>\n"); LOG_OUTPUT("--command | -c\trun <command>\n");
LOG_OUTPUT("--pipe | -p\tuse pipes for gdb communication\n"); LOG_OUTPUT("--pipe | -p\tuse pipes for gdb communication\n");
exit(-1); exit(-1);
}
}


if (version_flag) if (version_flag)
{ {
@@ -195,6 +195,6 @@ int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]
// It is not an error to request the VERSION number. // It is not an error to request the VERSION number.
exit(0); exit(0);
} }
return ERROR_OK; return ERROR_OK;
} }

+ 4
- 4
src/helper/replacements.c View File

@@ -27,7 +27,7 @@


#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
/*
/*
* clear_malloc * clear_malloc
* *
* will alloc memory and clear it * will alloc memory and clear it
@@ -203,11 +203,11 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time
FD_ZERO(&aread); FD_ZERO(&aread);
FD_ZERO(&awrite); FD_ZERO(&awrite);
FD_ZERO(&aexcept); FD_ZERO(&aexcept);
limit = GetTickCount() + ms_total; limit = GetTickCount() + ms_total;
do { do {
retcode = 0; retcode = 0;
if (sock_max_fd >= 0) { if (sock_max_fd >= 0) {
/* overwrite the zero'd sets here; the select call /* overwrite the zero'd sets here; the select call
* will clear those that are not active */ * will clear those that are not active */
@@ -245,7 +245,7 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time
if (SAFE_FD_ISSET(handle_slot_to_fd[i], rfds)) { if (SAFE_FD_ISSET(handle_slot_to_fd[i], rfds)) {
DWORD dwBytes; DWORD dwBytes;
long handle = _get_osfhandle(handle_slot_to_fd[i]); long handle = _get_osfhandle(handle_slot_to_fd[i]);
if (PeekNamedPipe((HANDLE)handle, NULL, 0, NULL, &dwBytes, NULL)) if (PeekNamedPipe((HANDLE)handle, NULL, 0, NULL, &dwBytes, NULL))
{ {
/* check to see if gdb pipe has data available */ /* check to see if gdb pipe has data available */


+ 12
- 12
src/helper/time_support.c View File

@@ -57,15 +57,15 @@ int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *
int timeval_add(struct timeval *result, struct timeval *x, struct timeval *y) int timeval_add(struct timeval *result, struct timeval *x, struct timeval *y)
{ {
result->tv_sec = x->tv_sec + y->tv_sec; result->tv_sec = x->tv_sec + y->tv_sec;
result->tv_usec = x->tv_usec + y->tv_usec; result->tv_usec = x->tv_usec + y->tv_usec;
while (result->tv_usec > 1000000) while (result->tv_usec > 1000000)
{ {
result->tv_usec -= 1000000; result->tv_usec -= 1000000;
result->tv_sec++; result->tv_sec++;
} }
return 0; return 0;
} }


@@ -73,13 +73,13 @@ int timeval_add_time(struct timeval *result, int sec, int usec)
{ {
result->tv_sec += sec; result->tv_sec += sec;
result->tv_usec += usec; result->tv_usec += usec;
while (result->tv_usec > 1000000) while (result->tv_usec > 1000000)
{ {
result->tv_usec -= 1000000; result->tv_usec -= 1000000;
result->tv_sec++; result->tv_sec++;
} }
return 0; return 0;
} }


@@ -91,11 +91,11 @@ void duration_start_measure(duration_t *duration)
int duration_stop_measure(duration_t *duration, char **text) int duration_stop_measure(duration_t *duration, char **text)
{ {
struct timeval end; struct timeval end;
gettimeofday(&end, NULL); gettimeofday(&end, NULL);
timeval_subtract(&duration->duration, &end, &duration->start); timeval_subtract(&duration->duration, &end, &duration->start);
if (text) if (text)
{ {
float t; float t;
@@ -104,18 +104,18 @@ int duration_stop_measure(duration_t *duration, char **text)
*text = malloc(100); *text = malloc(100);
snprintf(*text, 100, "%fs", t); snprintf(*text, 100, "%fs", t);
} }
return ERROR_OK; return ERROR_OK;
} }


long long timeval_ms() long long timeval_ms()
{ {
struct timeval now;
struct timeval now;
long long t = 0; long long t = 0;
gettimeofday(&now, NULL); gettimeofday(&now, NULL);
t += now.tv_usec/1000; t += now.tv_usec/1000;
t += now.tv_sec*1000; t += now.tv_sec*1000;
return t; return t;
} }

+ 3
- 3
src/jtag/arm-jtag-ew.c View File

@@ -470,13 +470,13 @@ static int armjtagew_get_status(void)
if (result == 0) if (result == 0)
{ {
unsigned int u_tg = buf_get_u32(usb_in_buffer, 0, 16); unsigned int u_tg = buf_get_u32(usb_in_buffer, 0, 16);
LOG_INFO("U_tg = %d mV, U_aux = %d mV, U_tgpwr = %d mV, I_tgpwr = %d mA, D1 = %d, Target power %s %s\n",
LOG_INFO("U_tg = %d mV, U_aux = %d mV, U_tgpwr = %d mV, I_tgpwr = %d mA, D1 = %d, Target power %s %s\n",
(int)(buf_get_u32(usb_in_buffer + 0, 0, 16)), (int)(buf_get_u32(usb_in_buffer + 0, 0, 16)),
(int)(buf_get_u32(usb_in_buffer + 2, 0, 16)), (int)(buf_get_u32(usb_in_buffer + 2, 0, 16)),
(int)(buf_get_u32(usb_in_buffer + 4, 0, 16)), (int)(buf_get_u32(usb_in_buffer + 4, 0, 16)),
(int)(buf_get_u32(usb_in_buffer + 6, 0, 16)), (int)(buf_get_u32(usb_in_buffer + 6, 0, 16)),
usb_in_buffer[9],
usb_in_buffer[11] ? "OVERCURRENT" : "OK",
usb_in_buffer[9],
usb_in_buffer[11] ? "OVERCURRENT" : "OK",
usb_in_buffer[10] ? "enabled" : "disabled"); usb_in_buffer[10] ? "enabled" : "disabled");


if (u_tg < 1500) if (u_tg < 1500)


+ 4
- 4
src/jtag/core.c View File

@@ -864,10 +864,10 @@ static void jtag_examine_chain_display(enum log_levels level, const char *msg,
log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__, log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__,
"JTAG tap: %s %16.16s: 0x%08x " "JTAG tap: %s %16.16s: 0x%08x "
"(mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)", "(mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
name, msg,
name, msg,
(unsigned int)idcode, (unsigned int)idcode,
(unsigned int)EXTRACT_MFG(idcode),
(unsigned int)EXTRACT_PART(idcode),
(unsigned int)EXTRACT_MFG(idcode),
(unsigned int)EXTRACT_PART(idcode),
(unsigned int)EXTRACT_VER(idcode)); (unsigned int)EXTRACT_VER(idcode));
} }


@@ -1111,7 +1111,7 @@ void jtag_tap_free(jtag_tap_t *tap)
{ {
jtag_unregister_event_callback(&jtag_reset_callback, tap); jtag_unregister_event_callback(&jtag_reset_callback, tap);


/// @todo is anything missing? no memory leaks please
/// @todo is anything missing? no memory leaks please
free((void *)tap->expected_ids); free((void *)tap->expected_ids);
free((void *)tap->chip); free((void *)tap->chip);
free((void *)tap->tapname); free((void *)tap->tapname);


+ 11
- 11
src/jtag/ft2232.c View File

@@ -411,8 +411,8 @@ static int ft2232_read(uint8_t* buf, uint32_t size, uint32_t* bytes_read)


if (*bytes_read < size) if (*bytes_read < size)
{ {
LOG_ERROR("couldn't read the requested number of bytes from FT2232 device (%i < %i)",
(unsigned int)(*bytes_read),
LOG_ERROR("couldn't read the requested number of bytes from FT2232 device (%i < %i)",
(unsigned int)(*bytes_read),
(unsigned int)size); (unsigned int)size);
return ERROR_JTAG_DEVICE_ERROR; return ERROR_JTAG_DEVICE_ERROR;
} }
@@ -965,7 +965,7 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
LOG_ERROR("couldn't write MPSSE commands to FT2232"); LOG_ERROR("couldn't write MPSSE commands to FT2232");
exit(-1); exit(-1);
} }
LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
ft2232_buffer_size, (int)bytes_written); ft2232_buffer_size, (int)bytes_written);
ft2232_buffer_size = 0; ft2232_buffer_size = 0;


@@ -1019,8 +1019,8 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
LOG_ERROR("couldn't write MPSSE commands to FT2232"); LOG_ERROR("couldn't write MPSSE commands to FT2232");
exit(-1); exit(-1);
} }
LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
ft2232_buffer_size,
LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
ft2232_buffer_size,
(int)bytes_written); (int)bytes_written);
ft2232_buffer_size = 0; ft2232_buffer_size = 0;


@@ -1031,8 +1031,8 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
LOG_ERROR("couldn't read from FT2232"); LOG_ERROR("couldn't read from FT2232");
exit(-1); exit(-1);
} }
LOG_DEBUG("thisrun_read: %i, bytes_read: %i",
thisrun_read,
LOG_DEBUG("thisrun_read: %i, bytes_read: %i",
thisrun_read,
(int)bytes_read); (int)bytes_read);
receive_pointer += bytes_read; receive_pointer += bytes_read;
} }
@@ -1129,8 +1129,8 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
LOG_ERROR("couldn't write MPSSE commands to FT2232"); LOG_ERROR("couldn't write MPSSE commands to FT2232");
exit(-1); exit(-1);
} }
LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
ft2232_buffer_size,
LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
ft2232_buffer_size,
(int)bytes_written); (int)bytes_written);
ft2232_buffer_size = 0; ft2232_buffer_size = 0;


@@ -1141,8 +1141,8 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
LOG_ERROR("couldn't read from FT2232"); LOG_ERROR("couldn't read from FT2232");
exit(-1); exit(-1);
} }
LOG_DEBUG("thisrun_read: %i, bytes_read: %i",
thisrun_read,
LOG_DEBUG("thisrun_read: %i, bytes_read: %i",
thisrun_read,
(int)bytes_read); (int)bytes_read);
receive_pointer += bytes_read; receive_pointer += bytes_read;
} }


+ 1
- 1
src/jtag/minidriver.h View File

@@ -38,7 +38,7 @@
* - jtag_add_callback * - jtag_add_callback
* - jtag_add_callback4 * - jtag_add_callback4
* - interface_jtag_add_dr_out * - interface_jtag_add_dr_out
*
*
* The following core functions are declared in this file for use by * The following core functions are declared in this file for use by
* the minidriver and do @b not need to be defined by an implementation: * the minidriver and do @b not need to be defined by an implementation:
* - default_interface_jtag_execute_queue() * - default_interface_jtag_execute_queue()


+ 2
- 2
src/jtag/presto.c View File

@@ -150,7 +150,7 @@ static int presto_write(uint8_t *buf, uint32_t size)


if (ftbytes != size) if (ftbytes != size)
{ {
LOG_ERROR("couldn't write the requested number of bytes to PRESTO (%u < %u)",
LOG_ERROR("couldn't write the requested number of bytes to PRESTO (%u < %u)",
(unsigned)ftbytes, (unsigned)size); (unsigned)ftbytes, (unsigned)size);
return ERROR_JTAG_DEVICE_ERROR; return ERROR_JTAG_DEVICE_ERROR;
} }
@@ -193,7 +193,7 @@ static int presto_read(uint8_t* buf, uint32_t size)
if (ftbytes != size) if (ftbytes != size)
{ {
/* this is just a warning, there might have been timeout when detecting PRESTO, which is not fatal */ /* this is just a warning, there might have been timeout when detecting PRESTO, which is not fatal */
LOG_WARNING("couldn't read the requested number of bytes from PRESTO (%u < %u)",
LOG_WARNING("couldn't read the requested number of bytes from PRESTO (%u < %u)",
(unsigned)ftbytes, (unsigned)size); (unsigned)ftbytes, (unsigned)size);
return ERROR_JTAG_DEVICE_ERROR; return ERROR_JTAG_DEVICE_ERROR;
} }


+ 56
- 56
src/server/server.c View File

@@ -52,7 +52,7 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
connection_t *c, **p; connection_t *c, **p;
int retval; int retval;
int flag = 1; int flag = 1;
c = malloc(sizeof(connection_t)); c = malloc(sizeof(connection_t));
c->fd = -1; c->fd = -1;
memset(&c->sin, 0, sizeof(c->sin)); memset(&c->sin, 0, sizeof(c->sin));
@@ -65,9 +65,9 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
if (service->type == CONNECTION_TCP) if (service->type == CONNECTION_TCP)
{ {
address_size = sizeof(c->sin); address_size = sizeof(c->sin);
c->fd = accept(service->fd, (struct sockaddr *)&service->sin, &address_size); c->fd = accept(service->fd, (struct sockaddr *)&service->sin, &address_size);
/* This increases performance dramatically for e.g. GDB load which /* This increases performance dramatically for e.g. GDB load which
* does not have a sliding window protocol. */ * does not have a sliding window protocol. */
retval = setsockopt(c->fd, /* socket affected */ retval = setsockopt(c->fd, /* socket affected */
@@ -75,7 +75,7 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
TCP_NODELAY, /* name of option */ TCP_NODELAY, /* name of option */
(char *)&flag, /* the cast is historical cruft */ (char *)&flag, /* the cast is historical cruft */
sizeof(int)); /* length of option value */ sizeof(int)); /* length of option value */
LOG_INFO("accepting '%s' connection from %i", service->name, c->sin.sin_port); LOG_INFO("accepting '%s' connection from %i", service->name, c->sin.sin_port);
if ((retval = service->new_connection(c)) != ERROR_OK) if ((retval = service->new_connection(c)) != ERROR_OK)
{ {
@@ -88,10 +88,10 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
else if (service->type == CONNECTION_PIPE) else if (service->type == CONNECTION_PIPE)
{ {
c->fd = service->fd; c->fd = service->fd;
/* do not check for new connections again on stdin */ /* do not check for new connections again on stdin */
service->fd = -1; service->fd = -1;
LOG_INFO("accepting '%s' connection from pipe", service->name); LOG_INFO("accepting '%s' connection from pipe", service->name);
if ((retval = service->new_connection(c)) != ERROR_OK) if ((retval = service->new_connection(c)) != ERROR_OK)
{ {
@@ -100,13 +100,13 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
return retval; return retval;
} }
} }
/* add to the end of linked list */ /* add to the end of linked list */
for (p = &service->connections; *p; p = &(*p)->next); for (p = &service->connections; *p; p = &(*p)->next);
*p = c; *p = c;
service->max_connections--; service->max_connections--;
return ERROR_OK; return ERROR_OK;
} }


@@ -114,29 +114,29 @@ int remove_connection(service_t *service, connection_t *connection)
{ {
connection_t **p = &service->connections; connection_t **p = &service->connections;
connection_t *c; connection_t *c;
/* find connection */ /* find connection */
while ((c = *p)) while ((c = *p))
{
{
if (c->fd == connection->fd) if (c->fd == connection->fd)
{
{
service->connection_closed(c); service->connection_closed(c);
if (service->type == CONNECTION_TCP) if (service->type == CONNECTION_TCP)
close_socket(c->fd); close_socket(c->fd);
command_done(c->cmd_ctx); command_done(c->cmd_ctx);
/* delete connection */ /* delete connection */
*p = c->next; *p = c->next;
free(c); free(c);
service->max_connections++; service->max_connections++;
break; break;
} }
/* redirect p to next list pointer */ /* redirect p to next list pointer */
p = &(*p)->next;
p = &(*p)->next;
} }
return ERROR_OK; return ERROR_OK;
} }


@@ -144,9 +144,9 @@ int add_service(char *name, enum connection_type type, unsigned short port, int
{ {
service_t *c, **p; service_t *c, **p;
int so_reuseaddr_option = 1; int so_reuseaddr_option = 1;
c = malloc(sizeof(service_t)); c = malloc(sizeof(service_t));
c->name = strdup(name); c->name = strdup(name);
c->type = type; c->type = type;
c->port = port; c->port = port;
@@ -158,7 +158,7 @@ int add_service(char *name, enum connection_type type, unsigned short port, int
c->connection_closed = connection_closed_handler; c->connection_closed = connection_closed_handler;
c->priv = priv; c->priv = priv;
c->next = NULL; c->next = NULL;
if (type == CONNECTION_TCP) if (type == CONNECTION_TCP)
{ {
if ((c->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) if ((c->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
@@ -166,35 +166,35 @@ int add_service(char *name, enum connection_type type, unsigned short port, int
LOG_ERROR("error creating socket: %s", strerror(errno)); LOG_ERROR("error creating socket: %s", strerror(errno));
exit(-1); exit(-1);
} }
setsockopt(c->fd, SOL_SOCKET, SO_REUSEADDR, (void*)&so_reuseaddr_option, sizeof(int)); setsockopt(c->fd, SOL_SOCKET, SO_REUSEADDR, (void*)&so_reuseaddr_option, sizeof(int));
socket_nonblock(c->fd); socket_nonblock(c->fd);
memset(&c->sin, 0, sizeof(c->sin)); memset(&c->sin, 0, sizeof(c->sin));
c->sin.sin_family = AF_INET; c->sin.sin_family = AF_INET;
c->sin.sin_addr.s_addr = INADDR_ANY; c->sin.sin_addr.s_addr = INADDR_ANY;
c->sin.sin_port = htons(port); c->sin.sin_port = htons(port);
if (bind(c->fd, (struct sockaddr *)&c->sin, sizeof(c->sin)) == -1) if (bind(c->fd, (struct sockaddr *)&c->sin, sizeof(c->sin)) == -1)
{ {
LOG_ERROR("couldn't bind to socket: %s", strerror(errno)); LOG_ERROR("couldn't bind to socket: %s", strerror(errno));
exit(-1); exit(-1);
} }
#ifndef _WIN32 #ifndef _WIN32
int segsize = 65536; int segsize = 65536;
setsockopt(c->fd, IPPROTO_TCP, TCP_MAXSEG, &segsize, sizeof(int)); setsockopt(c->fd, IPPROTO_TCP, TCP_MAXSEG, &segsize, sizeof(int));
#endif #endif
int window_size = 128 * 1024;
int window_size = 128 * 1024;
/* These setsockopt()s must happen before the listen() */ /* These setsockopt()s must happen before the listen() */
setsockopt(c->fd, SOL_SOCKET, SO_SNDBUF, setsockopt(c->fd, SOL_SOCKET, SO_SNDBUF,
(char *)&window_size, sizeof(window_size)); (char *)&window_size, sizeof(window_size));
setsockopt(c->fd, SOL_SOCKET, SO_RCVBUF, setsockopt(c->fd, SOL_SOCKET, SO_RCVBUF,
(char *)&window_size, sizeof(window_size)); (char *)&window_size, sizeof(window_size));
if (listen(c->fd, 1) == -1) if (listen(c->fd, 1) == -1)
{ {
LOG_ERROR("couldn't listen on socket: %s", strerror(errno)); LOG_ERROR("couldn't listen on socket: %s", strerror(errno));
@@ -205,7 +205,7 @@ int add_service(char *name, enum connection_type type, unsigned short port, int
{ {
/* use stdin */ /* use stdin */
c->fd = STDIN_FILENO; c->fd = STDIN_FILENO;
#ifdef _WIN32 #ifdef _WIN32
/* for win32 set stdin/stdout to binary mode */ /* for win32 set stdin/stdout to binary mode */
if (_setmode(_fileno(stdout), _O_BINARY) < 0) if (_setmode(_fileno(stdout), _O_BINARY) < 0)
@@ -223,11 +223,11 @@ int add_service(char *name, enum connection_type type, unsigned short port, int
LOG_ERROR("unknown connection type: %d", type); LOG_ERROR("unknown connection type: %d", type);
exit(1); exit(1);
} }
/* add to the end of linked list */ /* add to the end of linked list */
for (p = &services; *p; p = &(*p)->next); for (p = &services; *p; p = &(*p)->next);
*p = c; *p = c;
return ERROR_OK; return ERROR_OK;
} }


@@ -235,18 +235,18 @@ int remove_service(unsigned short port)
{ {
service_t **p = &services; service_t **p = &services;
service_t *c; service_t *c;
/* find service */ /* find service */
while ((c = *p)) while ((c = *p))
{
{
if (c->port == port) if (c->port == port)
{
{
if (c->name) if (c->name)
free(c->name); free(c->name);
if (c->priv) if (c->priv)
free(c->priv); free(c->priv);
/* delete service */ /* delete service */
*p = c->next; *p = c->next;
free(c); free(c);
@@ -255,7 +255,7 @@ int remove_service(unsigned short port)
/* redirect p to next list pointer */ /* redirect p to next list pointer */
p = &(*p)->next; p = &(*p)->next;
} }
return ERROR_OK; return ERROR_OK;
} }


@@ -282,7 +282,7 @@ int remove_services(void)
} }


services = NULL; services = NULL;
return ERROR_OK; return ERROR_OK;
} }


@@ -297,10 +297,10 @@ int server_loop(command_context_t *command_context)
fd_set read_fds; fd_set read_fds;
struct timeval tv; struct timeval tv;
int fd_max; int fd_max;
/* used in accept() */ /* used in accept() */
int retval; int retval;
#ifndef _WIN32 #ifndef _WIN32
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
LOG_ERROR("couldn't set SIGPIPE to SIG_IGN"); LOG_ERROR("couldn't set SIGPIPE to SIG_IGN");
@@ -309,7 +309,7 @@ int server_loop(command_context_t *command_context)
/* do regular tasks after at most 10ms */ /* do regular tasks after at most 10ms */
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 10000; tv.tv_usec = 10000;
while (!shutdown_openocd) while (!shutdown_openocd)
{ {
/* monitor sockets for acitvity */ /* monitor sockets for acitvity */
@@ -327,11 +327,11 @@ int server_loop(command_context_t *command_context)
if (service->fd > fd_max) if (service->fd > fd_max)
fd_max = service->fd; fd_max = service->fd;
} }
if (service->connections) if (service->connections)
{ {
connection_t *c; connection_t *c;
for (c = service->connections; c; c = c->next) for (c = service->connections; c; c = c->next)
{ {
/* check for activity on the connection */ /* check for activity on the connection */
@@ -341,7 +341,7 @@ int server_loop(command_context_t *command_context)
} }
} }
} }
#ifndef _WIN32 #ifndef _WIN32
#if BUILD_ECOSBOARD == 0 #if BUILD_ECOSBOARD == 0
if (server_use_pipes == 0) if (server_use_pipes == 0)
@@ -354,7 +354,7 @@ int server_loop(command_context_t *command_context)


openocd_sleep_prelude(); openocd_sleep_prelude();
kept_alive(); kept_alive();
/* Only while we're sleeping we'll let others run */ /* Only while we're sleeping we'll let others run */
retval = socket_select(fd_max + 1, &read_fds, NULL, NULL, &tv); retval = socket_select(fd_max + 1, &read_fds, NULL, NULL, &tv);
openocd_sleep_postlude(); openocd_sleep_postlude();
@@ -385,7 +385,7 @@ int server_loop(command_context_t *command_context)
} }
#endif #endif
} }
target_call_timer_callbacks(); target_call_timer_callbacks();
process_jim_events (); process_jim_events ();


@@ -396,12 +396,12 @@ int server_loop(command_context_t *command_context)
tv.tv_usec = 10000; tv.tv_usec = 10000;
FD_ZERO(&read_fds); /* eCos leaves read_fds unchanged in this case! */ FD_ZERO(&read_fds); /* eCos leaves read_fds unchanged in this case! */
} }
for (service = services; service; service = service->next) for (service = services; service; service = service->next)
{ {
/* handle new connections on listeners */ /* handle new connections on listeners */
if ((service->fd != -1)
&& (FD_ISSET(service->fd, &read_fds)))
if ((service->fd != -1)
&& (FD_ISSET(service->fd, &read_fds)))
{ {
if (service->max_connections > 0) if (service->max_connections > 0)
{ {
@@ -420,12 +420,12 @@ int server_loop(command_context_t *command_context)
LOG_INFO("rejected '%s' connection, no more connections allowed", service->name); LOG_INFO("rejected '%s' connection, no more connections allowed", service->name);
} }
} }
/* handle activity on connections */ /* handle activity on connections */
if (service->connections) if (service->connections)
{ {
connection_t *c; connection_t *c;
for (c = service->connections; c;) for (c = service->connections; c;)
{ {
if ((FD_ISSET(c->fd, &read_fds)) || c->input_pending) if ((FD_ISSET(c->fd, &read_fds)) || c->input_pending)
@@ -448,7 +448,7 @@ int server_loop(command_context_t *command_context)
} }
} }
} }
#ifndef _WIN32 #ifndef _WIN32
#if BUILD_ECOSBOARD == 0 #if BUILD_ECOSBOARD == 0
/* check for data on stdin if not using pipes */ /* check for data on stdin if not using pipes */
@@ -472,7 +472,7 @@ int server_loop(command_context_t *command_context)
} }
#endif #endif
} }
return ERROR_OK; return ERROR_OK;
} }


@@ -518,7 +518,7 @@ int server_init(void)
signal(SIGBREAK, sig_handler); signal(SIGBREAK, sig_handler);
signal(SIGABRT, sig_handler); signal(SIGABRT, sig_handler);
#endif #endif
return ERROR_OK; return ERROR_OK;
} }


@@ -538,7 +538,7 @@ int server_register_commands(command_context_t *context)
{ {
register_command(context, NULL, "shutdown", handle_shutdown_command, register_command(context, NULL, "shutdown", handle_shutdown_command,
COMMAND_ANY, "shut the server down"); COMMAND_ANY, "shut the server down");
return ERROR_OK; return ERROR_OK;
} }




+ 1
- 1
src/server/tcl_server.c View File

@@ -141,7 +141,7 @@ static int tcl_input(connection_t *connection)
if (memchr(result, '\n', reslen) == NULL) if (memchr(result, '\n', reslen) == NULL)
tcl_output(connection, "\n", 1); tcl_output(connection, "\n", 1);
} }
tclc->tc_lineoffset = 0; tclc->tc_lineoffset = 0;
tclc->tc_linedrop = 0; tclc->tc_linedrop = 0;
} }


+ 10
- 10
src/svf/svf.c View File

@@ -98,24 +98,24 @@ typedef struct
tap_state_t paths[8]; tap_state_t paths[8];
}svf_statemove_t; }svf_statemove_t;


svf_statemove_t svf_statemoves[] =
svf_statemove_t svf_statemoves[] =
{ {
// from to num_of_moves, paths[8] // from to num_of_moves, paths[8]
// {TAP_RESET, TAP_RESET, 1, {TAP_RESET}}, // {TAP_RESET, TAP_RESET, 1, {TAP_RESET}},
{TAP_RESET, TAP_IDLE, 2, {TAP_RESET, TAP_IDLE}}, {TAP_RESET, TAP_IDLE, 2, {TAP_RESET, TAP_IDLE}},
{TAP_RESET, TAP_DRPAUSE, 6, {TAP_RESET, TAP_IDLE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}}, {TAP_RESET, TAP_DRPAUSE, 6, {TAP_RESET, TAP_IDLE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}},
{TAP_RESET, TAP_IRPAUSE, 7, {TAP_RESET, TAP_IDLE, TAP_DRSELECT, TAP_IRSELECT, TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE}}, {TAP_RESET, TAP_IRPAUSE, 7, {TAP_RESET, TAP_IDLE, TAP_DRSELECT, TAP_IRSELECT, TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE}},
// {TAP_IDLE, TAP_RESET, 4, {TAP_IDLE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}}, // {TAP_IDLE, TAP_RESET, 4, {TAP_IDLE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}},
{TAP_IDLE, TAP_IDLE, 1, {TAP_IDLE}}, {TAP_IDLE, TAP_IDLE, 1, {TAP_IDLE}},
{TAP_IDLE, TAP_DRPAUSE, 5, {TAP_IDLE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}}, {TAP_IDLE, TAP_DRPAUSE, 5, {TAP_IDLE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}},
{TAP_IDLE, TAP_IRPAUSE, 6, {TAP_IDLE, TAP_DRSELECT, TAP_IRSELECT, TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE}}, {TAP_IDLE, TAP_IRPAUSE, 6, {TAP_IDLE, TAP_DRSELECT, TAP_IRSELECT, TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE}},
// {TAP_DRPAUSE, TAP_RESET, 6, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}}, // {TAP_DRPAUSE, TAP_RESET, 6, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}},
{TAP_DRPAUSE, TAP_IDLE, 4, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_IDLE}}, {TAP_DRPAUSE, TAP_IDLE, 4, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_IDLE}},
{TAP_DRPAUSE, TAP_DRPAUSE, 7, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}}, {TAP_DRPAUSE, TAP_DRPAUSE, 7, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}},
{TAP_DRPAUSE, TAP_IRPAUSE, 8, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE}}, {TAP_DRPAUSE, TAP_IRPAUSE, 8, {TAP_DRPAUSE, TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_IRCAPTURE, TAP_IREXIT1, TAP_IRPAUSE}},
// {TAP_IRPAUSE, TAP_RESET, 6, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}}, // {TAP_IRPAUSE, TAP_RESET, 6, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE, TAP_DRSELECT, TAP_IRSELECT, TAP_RESET}},
{TAP_IRPAUSE, TAP_IDLE, 4, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE, TAP_IDLE}}, {TAP_IRPAUSE, TAP_IDLE, 4, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE, TAP_IDLE}},
{TAP_IRPAUSE, TAP_DRPAUSE, 7, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}}, {TAP_IRPAUSE, TAP_DRPAUSE, 7, {TAP_IRPAUSE, TAP_IREXIT2, TAP_IRUPDATE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DREXIT1, TAP_DRPAUSE}},
@@ -304,7 +304,7 @@ static int svf_add_statemove(tap_state_t state_to)


for (index = 0; index < dimof(svf_statemoves); index++) for (index = 0; index < dimof(svf_statemoves); index++)
{ {
if ((svf_statemoves[index].from == state_from)
if ((svf_statemoves[index].from == state_from)
&& (svf_statemoves[index].to == state_to)) && (svf_statemoves[index].to == state_to))
{ {
if (TAP_RESET == state_from) if (TAP_RESET == state_from)
@@ -746,7 +746,7 @@ static int svf_check_tdo(void)
{ {
index = svf_check_tdo_para[i].buffer_offset; index = svf_check_tdo_para[i].buffer_offset;
len = svf_check_tdo_para[i].bit_len; len = svf_check_tdo_para[i].bit_len;
if ((svf_check_tdo_para[i].enabled)
if ((svf_check_tdo_para[i].enabled)
&& buf_cmp_mask(&svf_tdi_buffer[index], &svf_tdo_buffer[index], &svf_mask_buffer[index], len)) && buf_cmp_mask(&svf_tdi_buffer[index], &svf_tdo_buffer[index], &svf_mask_buffer[index], len))
{ {
unsigned bitmask; unsigned bitmask;
@@ -756,11 +756,11 @@ static int svf_check_tdo(void)
memcpy(&received, svf_tdi_buffer + index, sizeof(unsigned)); memcpy(&received, svf_tdi_buffer + index, sizeof(unsigned));
memcpy(&expected, svf_tdo_buffer + index, sizeof(unsigned)); memcpy(&expected, svf_tdo_buffer + index, sizeof(unsigned));
memcpy(&tapmask, svf_mask_buffer + index, sizeof(unsigned)); memcpy(&tapmask, svf_mask_buffer + index, sizeof(unsigned));
LOG_ERROR("tdo check error at line %d",
LOG_ERROR("tdo check error at line %d",
svf_check_tdo_para[i].line_num); svf_check_tdo_para[i].line_num);
LOG_ERROR("read = 0x%X, want = 0x%X, mask = 0x%X",
received & bitmask,
expected & bitmask,
LOG_ERROR("read = 0x%X, want = 0x%X, mask = 0x%X",
received & bitmask,
expected & bitmask,
tapmask & bitmask); tapmask & bitmask);
return ERROR_FAIL; return ERROR_FAIL;
} }


+ 1
- 1
src/xsvf/xsvf.c View File

@@ -620,7 +620,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
field.in_value = NULL; field.in_value = NULL;






if (tap == NULL) if (tap == NULL)
jtag_add_plain_ir_scan(1, &field, my_end_state); jtag_add_plain_ir_scan(1, &field, my_end_state);


+ 18
- 18
testing/examples/AT91R40008Test/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 24
- 24
testing/examples/AT91R40008Test/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -39,8 +39,8 @@
* I use the include only, to show * I use the include only, to show
* how to setup a include dir in the makefile * how to setup a include dir in the makefile
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include "typedefs.h" #include "typedefs.h"


/*=========================================================================*/ /*=========================================================================*/
@@ -71,22 +71,22 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
a = a + d; a = a + d;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 18
- 18
testing/examples/LPC2148Test/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 24
- 24
testing/examples/LPC2148Test/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -39,8 +39,8 @@
* I use the include only, to show * I use the include only, to show
* how to setup a include dir in the makefile * how to setup a include dir in the makefile
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include "typedefs.h" #include "typedefs.h"


/*=========================================================================*/ /*=========================================================================*/
@@ -71,22 +71,22 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
a = a + d; a = a + d;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 18
- 18
testing/examples/LPC2294Test/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 24
- 24
testing/examples/LPC2294Test/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -39,8 +39,8 @@
* I use the include only, to show * I use the include only, to show
* how to setup a include dir in the makefile * how to setup a include dir in the makefile
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include "typedefs.h" #include "typedefs.h"


/*=========================================================================*/ /*=========================================================================*/
@@ -71,22 +71,22 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
a = a + d; a = a + d;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 1
- 1
testing/examples/PIC32/BlinkingLeds.c View File

@@ -8,7 +8,7 @@ int main(void)
mPORTDSetPinsDigitalOut(BIT_1); mPORTDSetPinsDigitalOut(BIT_1);
mPORTDClearBits(BIT_2); mPORTDClearBits(BIT_2);
mPORTDSetPinsDigitalOut(BIT_2); mPORTDSetPinsDigitalOut(BIT_2);
while (1) while (1)
{ {
for (i = 0; i < 500000; i++) for (i = 0; i < 500000; i++)


+ 18
- 18
testing/examples/SAM7S256Test/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 22
- 22
testing/examples/SAM7S256Test/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -69,22 +69,22 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
a = a + d; a = a + d;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 18
- 18
testing/examples/SAM7X256Test/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 22
- 22
testing/examples/SAM7X256Test/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -69,22 +69,22 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
a = a + d; a = a + d;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 18
- 18
testing/examples/STR710JtagSpeed/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 21
- 21
testing/examples/STR710JtagSpeed/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -70,20 +70,20 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 18
- 18
testing/examples/STR710Test/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 22
- 22
testing/examples/STR710Test/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -69,22 +69,22 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
a = a + d; a = a + d;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 18
- 18
testing/examples/STR912Test/inc/typedefs.h View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************


+ 22
- 22
testing/examples/STR912Test/src/main.c View File

@@ -1,30 +1,30 @@
/**************************************************************************** /****************************************************************************
* Copyright (c) 2006 by Michael Fischer. All rights reserved. * Copyright (c) 2006 by Michael Fischer. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: * are met:
*
* 1. Redistributions of source code must retain the above copyright
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
**************************************************************************** ****************************************************************************
@@ -69,22 +69,22 @@ int main (void)
DWORD a = 1; DWORD a = 1;
DWORD b = 2; DWORD b = 2;
DWORD c = 0; DWORD c = 0;
a = a + d; a = a + d;
while (1) while (1)
{ {
a++; a++;
b++; b++;
c = a + b; c = a + b;
} }
/* /*
* This return here make no sense. * This return here make no sense.
* But to prevent the compiler warning: * But to prevent the compiler warning:
* "return type of 'main' is not 'int' * "return type of 'main' is not 'int'
* we use an int as return :-) * we use an int as return :-)
*/
*/
return(0); return(0);
} }




+ 1
- 1
testing/examples/cortex/test.c View File

@@ -1,4 +1,4 @@
/* simple app.
/* simple app.


modify test.ld to change address. modify test.ld to change address.




+ 3
- 3
testing/examples/ledtest-imx27ads/test.c View File

@@ -25,12 +25,12 @@ void delay()
} }


/* MAIN ARM FUNTION */ /* MAIN ARM FUNTION */
int main (void)
int main (void)
{ {
int i;
int i;
volatile unsigned char *ledoff = ((volatile unsigned char *)0xD4000008); volatile unsigned char *ledoff = ((volatile unsigned char *)0xD4000008);
volatile unsigned char *ledon = ((volatile unsigned char *)0xD400000C); volatile unsigned char *ledon = ((volatile unsigned char *)0xD400000C);
for (i = 0; i < 10000; i++) for (i = 0; i < 10000; i++)
{ {
*ledon = 0x30; *ledon = 0x30;


+ 2
- 2
testing/examples/ledtest-imx31pdk/test.c View File

@@ -25,10 +25,10 @@ void delay()
} }


/* MAIN ARM FUNTION */ /* MAIN ARM FUNTION */
int main (void)
int main (void)
{ {
volatile unsigned char *led = ((volatile unsigned char *)0xB6020000); volatile unsigned char *led = ((volatile unsigned char *)0xB6020000);
while (1) while (1)
{ {
*led = 0xFF; *led = 0xFF;


Loading…
Cancel
Save