Move sysdep.h from include/urjtag/ to the root dir, pending a private include dir

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1595 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent 603611e442
commit 951498a8df

@ -3,6 +3,10 @@
* src/tap/cable/*.c: convert return values, error handling, printfs
* src/**: globally remove \n or !\n from error detail msgs; sanitize
error prints a tiny bit
* include/urjtag/sysdep.h, include/urjtag/Makefile.am: sysdep.h should most
certainly not be in the directory of exported header files. Move it back
to the root dir in expectation of an include dir that is private to the
src tree
2009-05-12 Rutger Hofman <rfhh>
@ -14,8 +18,8 @@
Library commands that produce output (print routines) are equipped with
a urj_log_level_t parameter to control their verbosity.
* include/urjtag/error.h, many more files: introduce error values
URJ_ERROR_FTD, URJ_ERROR_USB. Handle URJ_ERROR_IO specially through macro
urj_error_IO_set that handles errno/strerror().
URJ_ERROR_FTD, URJ_ERROR_USB. Handle URJ_ERROR_IO specially through macro
urj_error_IO_set that handles errno/strerror().
2009-05-11 Arnim Laeuger <arniml>

@ -56,6 +56,3 @@ pkginclude_HEADERS = \
usbconn/libftdx.h \
usbconn/libusb.h \
xpcu.h
noinst_HEADERS = \
sysdep.h

@ -32,6 +32,9 @@
*
*/
// @@@@ RFHH candidate to move to internal include file, and
// @@@@ RFHH the definition of URJ_BIT(b) should go into types.h
#ifndef URJ_BITMASK_H
#define URJ_BITMASK_H

@ -33,7 +33,8 @@ typedef struct
{
char **path_list;
int debug;
} urj_bsdl_globs_t;
}
urj_bsdl_globs_t;
#define URJ_BSDL_GLOBS_INIT(bsdl) \
do { \

@ -33,14 +33,17 @@
extern urj_bus_t *urj_bus;
/* @@@@ RFHH return status */
void urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len);
/* @@@@ RFHH return status */
void urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len);
typedef struct
{
int len;
urj_bus_t **buses;
} urj_buses_t;
}
urj_buses_t;
extern urj_buses_t urj_buses;
extern const urj_bus_driver_t *urj_bus_drivers[];

@ -45,7 +45,8 @@ typedef struct
uint32_t start;
uint64_t length;
unsigned int width;
} urj_bus_area_t;
}
urj_bus_area_t;
struct urj_bus_driver
{

@ -86,6 +86,7 @@ typedef struct
{
urj_chain_t **chains;
int size; /* allocated chains array size */
} urj_chains_t;
}
urj_chains_t;
#endif /* URJ_CHAIN_H */

@ -24,13 +24,15 @@
#define URJ_ERROR_H
#include <stdio.h>
#include <errno.h>
#include "log.h"
/**
* Error types
*/
typedef enum urj_error {
typedef enum urj_error
{
URJ_ERROR_OK = 0,
URJ_ERROR_ALREADY,
URJ_ERROR_OUT_OF_MEMORY,
@ -57,7 +59,8 @@ typedef enum urj_error {
URJ_ERROR_FLASH_PROGRAM,
URJ_ERROR_FLASH_ERASE,
URJ_ERROR_FLASH_UNLOCK,
} urj_error_t;
}
urj_error_t;
/** Max length of message string that can be recorded. */
#define URJ_ERROR_MSG_LEN 256
@ -65,14 +68,16 @@ typedef enum urj_error {
/**
* Error state.
*/
typedef struct urj_error_state {
typedef struct urj_error_state
{
urj_error_t errnum; /**< error number */
int sys_errno; /**< errno if URJ_ERROR_IO */
const char *file; /**< file where error is set */
const char *function; /**< function --,,-- */
int line; /**< line no --,,-- */
char msg[URJ_ERROR_MSG_LEN]; /**< printf-style message */
} urj_error_state_t;
}
urj_error_state_t;
extern urj_error_state_t urj_error_state;
@ -97,25 +102,6 @@ extern const char *urj_error_string (urj_error_t error);
urj_error_state.line = __LINE__; \
snprintf (urj_error_state.msg, sizeof urj_error_state.msg, \
__VA_ARGS__); \
if (0 && urj_log_state.level < URJ_LOG_LEVEL_SILENT) \
{ \
urj_log (URJ_LOG_LEVEL_ERROR, "%s:%d %s() %s: ", __FILE__, \
__LINE__, __func__, urj_error_string (e)); \
urj_log (URJ_LOG_LEVEL_ERROR, __VA_ARGS__); \
urj_log (URJ_LOG_LEVEL_ERROR, "\n"); \
} \
} while (0)
#define urj_error_msg_append(...) \
do { \
if (urj_error_state.errnum == URJ_ERROR_OK) \
snprintf (urj_error_state.msg, sizeof urj_error_state.msg, \
__VA_ARGS__); \
else \
snprintf (urj_error_state.msg + strlen(urj_error_state.msg), \
sizeof urj_error_state.msg \
- strlen(urj_error_state.msg), \
__VA_ARGS__); \
} while (0)
/**

@ -57,7 +57,8 @@ typedef struct
int (*program) (urj_flash_cfi_array_t *cfi_array, uint32_t adr,
uint32_t *buffer, int count);
void (*readarray) (urj_flash_cfi_array_t *cfi_array);
} urj_flash_driver_t;
}
urj_flash_driver_t;
extern urj_flash_driver_t *urj_flash_flash_drivers[];
@ -73,6 +74,4 @@ int urj_flashmsbin (urj_bus_t *bus, FILE *f, int);
/** @return URJ_STATUS_OK on success; URJ_STATUS_FAIL on error */
int urj_flasherase (urj_bus_t *bus, uint32_t addr, int number);
/* end of original brux/flash.h */
#endif /* URJ_FLASH_H */

@ -16,6 +16,8 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
// @@@@ RFHH this has better be an internal include file
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1

@ -35,7 +35,7 @@
#define URJ_JIM_H 1
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
typedef enum jim_tap_state
{
@ -62,7 +62,8 @@ typedef struct
{
uint32_t *reg;
int len;
} urj_jim_shift_reg_t;
}
urj_jim_shift_reg_t;
typedef struct urj_jim_device urj_jim_device_t;

@ -28,9 +28,11 @@
#include "types.h"
extern int urj_big_endian;
/* @@@@ RFHH deprecate in favor of urj_log level */
extern int urj_debug_mode;
/** Register the application name with global/data_dir.
/**
* Register the application name with global/data_dir.
* @param argv0 is remembered as a pointer, it is not strdup()'ed.
*/
void urj_set_argv0(const char *argv0);

@ -30,11 +30,13 @@
/**
* Log state.
*/
typedef struct urj_log_state {
typedef struct urj_log_state
{
urj_log_level_t level; /**< logging level */
int (*out_vprintf) (const char *fmt, va_list ap);
int (*err_vprintf) (const char *fmt, va_list ap);
} urj_log_state_t;
}
urj_log_state_t;
extern urj_log_state_t urj_log_state;

@ -47,7 +47,8 @@ typedef struct
int (*get_status) (urj_parport_t *);
/** @return URJ_STATUS_OK on success; URJ_STATUS_FAIL on error */
int (*set_control) (urj_parport_t *, uint8_t);
} urj_parport_driver_t;
}
urj_parport_driver_t;
struct urj_parport
{

@ -29,9 +29,9 @@
struct urj_tap_register
{
char *data; /* (public, r/w) register data */
int len; /* (public, r/o) register length */
char *string; /* (private) string representation of register data */
char *data; /* (public, r/w) register data */
int len; /* (public, r/o) register length */
char *string; /* (private) string representation of register data */
};
urj_tap_register_t *urj_tap_register_alloc (int len);

@ -44,7 +44,8 @@ typedef struct urj_tap_register urj_tap_register_t;
/**
* Log levels
*/
typedef enum urj_log_level {
typedef enum urj_log_level
{
URJ_LOG_LEVEL_ALL, /**< every single bit as it is transmitted */
URJ_LOG_LEVEL_COMM, /**< low level communication details */
URJ_LOG_LEVEL_DEBUG, /**< more details of interest for developers */
@ -53,7 +54,8 @@ typedef enum urj_log_level {
URJ_LOG_LEVEL_WARNING, /**< unmissable warnings */
URJ_LOG_LEVEL_ERROR, /**< only fatal errors */
URJ_LOG_LEVEL_SILENT, /**< suppress logging output */
} urj_log_level_t;
}
urj_log_level_t;
#define URJ_STATUS_OK 0
#define URJ_STATUS_FAIL 1

@ -37,7 +37,8 @@ typedef struct
char *driver;
int32_t vid;
int32_t pid;
} urj_usbconn_cable_t;
}
urj_usbconn_cable_t;
typedef struct
{
@ -52,7 +53,8 @@ typedef struct
int (*read) (urj_usbconn_t *, uint8_t *, int);
/** @return bytes written on success; -1 on error */
int (*write) (urj_usbconn_t *, uint8_t *, int, int);
} urj_usbconn_driver_t;
}
urj_usbconn_driver_t;
struct urj_usbconn
{

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#ifndef SVN_REVISION
#define SVN_REVISION "0"

@ -22,17 +22,17 @@
*
*/
#include <sysdep.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#define __USE_GNU
// #define __USE_GNU 1
#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <urjtag/sysdep.h>
#include <urjtag/chain.h>
#include <urjtag/part.h>
#include <urjtag/cmd.h>
@ -82,11 +82,13 @@ urj_bsdl_msg (int proc_mode, int type, const char *format, ...)
printf ("-W- ");
break;
case BSDL_MSG_ERR:
// @@@@ RFHH set urj_error (but to what?)
if (!(proc_mode & URJ_BSDL_MODE_MSG_ERR))
return;
printf ("-E- ");
break;
case BSDL_MSG_FATAL:
// @@@@ RFHH set urj_error (but to what?)
if (!(proc_mode & URJ_BSDL_MODE_MSG_FATAL))
return;
printf ("-F- ");

@ -27,7 +27,7 @@
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <string.h>
#include <stdint.h>

@ -25,7 +25,7 @@
* AVR(R)32 32-Bit Microcontroller", Rev. 32003K-AVR32-10/07
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <string.h>
#include <stdint.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -22,7 +22,7 @@
* Written by Jie Zhang <jie.zhang@analog.com>, 2008.
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -24,7 +24,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdlib.h>

@ -27,7 +27,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -34,7 +34,7 @@
*/
//#define PRINT_DATA_DEBUG 1
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -22,12 +22,13 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <urjtag/log.h>
#include <urjtag/part.h>
#include <urjtag/bus.h>
#include <urjtag/chain.h>

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>

@ -23,7 +23,7 @@
*
*/
//#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -54,7 +54,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -32,7 +32,7 @@
* - use only to access flash devices
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -27,7 +27,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>
@ -110,7 +110,8 @@ mpc5200_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver,
bp->lpc_num_d = 16;
bp->muxed = 1;
}
printf ("%sMUXed %db address, %db data bus\n", (bp->muxed ? "" : "Non-"),
urj_log (URJ_LOG_LEVEL_NORMAL,
"%sMUXed %db address, %db data bus\n", (bp->muxed ? "" : "Non-"),
bp->lpc_num_ad, bp->lpc_num_d);
bus->chain = chain;

@ -27,7 +27,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>
@ -114,14 +114,12 @@ mpc824x_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver,
{
// BUS_WIDTH = 64; // Needs to fix, look at setup_data()
BUS_WIDTH = 32;
printf (_
(" Bus width 64 exists in mpc824x, but not supported by UrJTAG currently\n"));
printf (_(" Bus width 64 exists in mpc824x, but not supported by UrJTAG currently\n"));
dfltWidth = 1;
}
else
{
printf (_
(" Only 8,32 and 64 bus width are supported for Banks 0 and 1\n"));
printf (_(" Only 8,32 and 64 bus width are supported for Banks 0 and 1\n"));
return NULL;
}
}
@ -133,8 +131,7 @@ mpc824x_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver,
if (!strcmp ("help", cmd_params[i]))
{
printf (_
("Usage: initbus mpc824x [width=WIDTH] [revbits] [dbgAddr] [dbgData]\n\n"
printf (_("Usage: initbus mpc824x [width=WIDTH] [revbits] [dbgAddr] [dbgData]\n\n"
" WIDTH data bus width - 8, 32, 64 (default 8)\n"
" revbits reverse bits in data bus (default - no)\n"
" dbgAddr display address bus state (default - no)\n"

@ -20,7 +20,7 @@
* Modified by Wojtek Kaniewski <wojtekka@toxygen.net>, 2004.
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -19,7 +19,7 @@
* Written by Marcel Telka <marcel@telka.sk>, 2002, 2003.
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -23,7 +23,7 @@
* Modified from ppc405ep.c by Detrick Martin <jtag@detrickmartin.net>, 2008.
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>
@ -232,8 +232,7 @@ prototype_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver,
}
else
{
printf (_
("parameters alsb=<signal> and/or amsb=<signal> are not defined\n"));
printf (_("parameters alsb=<signal> and/or amsb=<signal> are not defined\n"));
failed = 1;
}
@ -292,8 +291,7 @@ prototype_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver,
}
else
{
printf (_
("parameters dlsb=<signal> and/or dmsb=<signal> are not defined\n"));
printf (_("parameters dlsb=<signal> and/or dmsb=<signal> are not defined\n"));
failed = 1;
}

@ -30,7 +30,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -28,15 +28,17 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <string.h>
#include <urjtag/log.h>
#include <urjtag/bus.h>
#include <urjtag/flash.h>
#include <urjtag/jtag.h>
// @@@@ RFHH return status
void
urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
{
@ -72,8 +74,8 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
addr = addr & (~(step - 1));
len = (len + step - 1) & (~(step - 1));
printf (_("address: 0x%08X\n"), addr);
printf (_("length: 0x%08X\n"), len);
urj_log (URJ_LOG_LEVEL_NORMAL, _("address: 0x%08X\n"), addr);
urj_log (URJ_LOG_LEVEL_NORMAL, _("length: 0x%08X\n"), len);
if (len == 0)
{
@ -83,7 +85,7 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
a = addr;
end = a + len;
printf (_("reading:\n"));
urj_log (URJ_LOG_LEVEL_NORMAL, _("reading:\n"));
URJ_BUS_READ_START (bus, addr);
for (a += step; a <= end; a += step)
{
@ -106,13 +108,12 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
if ((bc >= BSIZE) || (a >= end))
{
printf (_("addr: 0x%08X"), a);
printf ("\r");
fflush (stdout);
urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08X"), a);
urj_log (URJ_LOG_LEVEL_NORMAL, "\r");
fwrite (b, bc, 1, f);
bc = 0;
}
}
printf (_("\nDone.\n"));
urj_log (URJ_LOG_LEVEL_NORMAL, _("\nDone.\n"));
}

@ -52,7 +52,7 @@
=============================================================================*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>
@ -433,7 +433,8 @@ s3c4510_bus_write (urj_bus_t *bus, uint32_t adr, uint32_t data)
s3c4510_bus_setup_ctrl (bus, 0x01ffff); /* nOE=1, nRCS0 =1 */
urj_tap_chain_shift_data_registers (chain, 0);
DEBUG_LVL2 (printf ("URJ_BUS_WRITE %08x @ %08x\n", data, adr);)}
DEBUG_LVL2 (printf ("URJ_BUS_WRITE %08x @ %08x\n", data, adr);)
}
const urj_bus_driver_t urj_bus_s3c4510_bus = {
"s3c4510x",

@ -26,7 +26,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdlib.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdlib.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdlib.h>

@ -27,7 +27,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -26,7 +26,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -24,7 +24,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -21,15 +21,17 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <string.h>
#include <urjtag/log.h>
#include <urjtag/bus.h>
#include <urjtag/flash.h>
#include <urjtag/jtag.h>
// @@@@ RFHH return status
void
urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
{
@ -66,18 +68,18 @@ urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
addr = addr & (~(step - 1));
len = (len + step - 1) & (~(step - 1));
printf (_("address: 0x%08X\n"), addr);
printf (_("length: 0x%08X\n"), len);
urj_log (URJ_LOG_LEVEL_NORMAL, _("address: 0x%08X\n"), addr);
urj_log (URJ_LOG_LEVEL_NORMAL, _("length: 0x%08X\n"), len);
if (len == 0)
{
printf (_("length is 0.\n"));
urj_log (URJ_LOG_LEVEL_NORMAL, _("length is 0.\n"));
return;
}
a = addr;
end = a + len;
printf (_("writing:\n"));
urj_log (URJ_LOG_LEVEL_NORMAL, _("writing:\n"));
for (; a < end; a += step)
{
@ -87,8 +89,8 @@ urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
/* Read one block of data */
if (bc < step)
{
printf (_("addr: 0x%08X"), a);
printf ("\r");
urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08X"), a);
urj_log (URJ_LOG_LEVEL_NORMAL, "\r");
fflush (stdout);
if (bc != 0)
printf (_("Data not on word boundary, NOT SUPPORTED!"));
@ -128,5 +130,5 @@ urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len)
}
printf (_("\nDone.\n"));
urj_log (URJ_LOG_LEVEL_NORMAL, _("\nDone.\n"));
}

@ -54,7 +54,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdint.h>

@ -34,7 +34,7 @@
#ifndef URJ_SRC_CMD_H
#define URJ_SRC_CMD_H
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <urjtag/types.h>

@ -20,7 +20,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -78,10 +78,12 @@ cmd_addpart_run (urj_chain_t *chain, char *params[])
static void
cmd_addpart_help (void)
{
printf (_("Usage: %s IRLENGTH\n"
"Manually add a part to the end of the chain.\n"
"\n"
"IRLENGTH instruction register length\n"), "addpart");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s IRLENGTH\n"
"Manually add a part to the end of the chain.\n"
"\n"
"IRLENGTH instruction register length\n"),
"addpart");
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stddef.h>
#include <stdio.h>
@ -196,17 +196,19 @@ cmd_bit_run (urj_chain_t *chain, char *params[])
static void
cmd_bit_help (void)
{
printf (_("Usage: %s NUMBER TYPE DEFAULT SIGNAL [CBIT CVAL CSTATE]\n"
"Define new BSR (Boundary Scan Register) bit for SIGNAL, with\n"
"DEFAULT value.\n"
"\n"
"NUMBER Bit number in the BSR\n"
"TYPE Bit type, valid values are I, O, B, C, and X\n"
"DEFAULT Default (safe) bit value, valid values are 1, 0, ?\n"
"SIGNAL Associated signal name\n"
"CBIT Control bit number\n"
"CVAL Control value\n"
"CSTATE Control state, valid state is only Z\n"), "bit");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s NUMBER TYPE DEFAULT SIGNAL [CBIT CVAL CSTATE]\n"
"Define new BSR (Boundary Scan Register) bit for SIGNAL, with\n"
"DEFAULT value.\n"
"\n"
"NUMBER Bit number in the BSR\n"
"TYPE Bit type, valid values are I, O, B, C, and X\n"
"DEFAULT Default (safe) bit value, valid values are 1, 0, ?\n"
"SIGNAL Associated signal name\n"
"CBIT Control bit number\n"
"CVAL Control value\n"
"CSTATE Control state, valid state is only Z\n"),
"bit");
}
const urj_cmd_t urj_cmd_bit = {

@ -23,7 +23,7 @@
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -38,7 +38,7 @@
static int
cmd_bsdl_run (urj_chain_t *chain, char *params[])
{
int num_params, result = -1;
int num_params, result = -2;
urj_bsdl_globs_t *globs = &(chain->bsdl);
num_params = urj_cmd_params (params);
@ -106,6 +106,13 @@ cmd_bsdl_run (urj_chain_t *chain, char *params[])
}
}
if (result == -2)
{
urj_error_set (URJ_ERROR_SYNTAX, "unknown/malformed bsdl command '%s'",
params[1]);
return URJ_STATUS_FAIL;
}
return (result >= 0) ? URJ_STATUS_OK : URJ_STATUS_FAIL;
}
@ -113,14 +120,15 @@ cmd_bsdl_run (urj_chain_t *chain, char *params[])
static void
cmd_bsdl_help (void)
{
printf (_("Usage: %s path PATHLIST\n"
"Usage: %s test [FILE]\n"
"Usage: %s dump [FILE]\n"
"Usage: %s debug on|off\n"
"Manage BSDL files\n"
"\n"
"PATHLIST semicolon separated list of directory paths to search for BSDL files\n"
"FILE file containing part description in BSDL format\n"),
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s path PATHLIST\n"
"Usage: %s test [FILE]\n"
"Usage: %s dump [FILE]\n"
"Usage: %s debug on|off\n"
"Manage BSDL files\n"
"\n"
"PATHLIST semicolon separated list of directory paths to search for BSDL files\n"
"FILE file containing part description in BSDL format\n"),
"bsdl", "bsdl", "bsdl", "bsdl");
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -67,9 +67,11 @@ cmd_bus_run (urj_chain_t *chain, char *params[])
static void
cmd_bus_help (void)
{
printf (_("Usage: %s BUS\n"
"Change active bus.\n"
"\n" "BUS bus number\n"), "bus");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s BUS\n"
"Change active bus.\n"
"\n" "BUS bus number\n"),
"bus");
}
const urj_cmd_t urj_cmd_bus = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -145,17 +145,20 @@ cmd_cable_help (void)
{
int i;
printf (_("Usage: %s DRIVER [DRIVER_OPTS]\n"
"Select JTAG cable type.\n"
"\n"
"DRIVER name of cable\n"
"DRIVER_OPTS options for the selected cable\n"
"\n"
"Type \"cable DRIVER help\" for info about options for cable DRIVER.\n"
"\n" "List of supported cables:\n"), "cable");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s DRIVER [DRIVER_OPTS]\n"
"Select JTAG cable type.\n"
"\n"
"DRIVER name of cable\n"
"DRIVER_OPTS options for the selected cable\n"
"\n"
"Type \"cable DRIVER help\" for info about options for cable DRIVER.\n"
"\n" "List of supported cables:\n"),
"cable");
for (i = 0; urj_tap_cable_drivers[i]; i++)
printf (_("%-13s %s\n"), urj_tap_cable_drivers[i]->name,
urj_log (URJ_LOG_LEVEL_NORMAL,
_("%-13s %s\n"), urj_tap_cable_drivers[i]->name,
_(urj_tap_cable_drivers[i]->description));
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -62,9 +62,11 @@ cmd_debug_run (urj_chain_t *chain, char *params[])
static void
cmd_debug_help (void)
{
printf (_("Usage: %s n\n"
"Enabled debugging.\n"
"\n" "n =1 fileio, 2=tap commands, 4 =?\n"), "debug n");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s n\n"
"Enabled debugging.\n"
"\n" "n =1 fileio, 2=tap commands, 4 =?\n"),
"debug");
}
const urj_cmd_t urj_cmd_debug = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -58,11 +58,12 @@ cmd_detect_run (urj_chain_t *chain, char *params[])
static void
cmd_detect_help (void)
{
printf (_("Usage: %s\n"
"Detect parts on the JTAG chain.\n"
"\n"
"Output from this command is a list of the detected parts.\n"
"If no parts are detected other commands may not work properly.\n"),
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s\n"
"Detect parts on the JTAG chain.\n"
"\n"
"Output from this command is a list of the detected parts.\n"
"If no parts are detected other commands may not work properly.\n"),
"detect");
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
@ -62,10 +62,11 @@ cmd_detectflash_run (urj_chain_t *chain, char *params[])
static void
cmd_detectflash_help (void)
{
printf (_("Usage: %s ADDRESS\n"
"Detect flash memory type connected to a part.\n"
"\n"
"ADDRESS Base address for memory region\n"),
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ADDRESS\n"
"Detect flash memory type connected to a part.\n"
"\n"
"ADDRESS Base address for memory region\n"),
"detectflash");
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
@ -53,16 +53,17 @@ cmd_discovery_run (urj_chain_t *chain, char *params[])
static void
cmd_discovery_help (void)
{
printf (_("Usage: %s\n"
"Discovery of unknown parts in the JTAG chain.\n"
"\n"
"'%s' attempts to detect these parameters of an unknown JTAG\n"
"chain:\n"
" 1. IR (instruction register) length\n"
" 2. DR (data register) length for all possible instructions\n"
"\n"
"Warning: This may be dangerous for some parts (especially if the\n"
"part doesn't have TRST signal).\n"), "discovery",
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s\n"
"Discovery of unknown parts in the JTAG chain.\n"
"\n"
"'%s' attempts to detect these parameters of an unknown JTAG\n"
"chain:\n"
" 1. IR (instruction register) length\n"
" 2. DR (data register) length for all possible instructions\n"
"\n"
"Warning: This may be dangerous for some parts (especially if the\n"
"part doesn't have TRST signal).\n"), "discovery",
"discovery");
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -123,14 +123,15 @@ cmd_dr_run (urj_chain_t *chain, char *params[])
static void
cmd_dr_help (void)
{
printf (_("Usage: %s [DIR]\n"
"Usage: %s BITSTRING\n"
"Display input or output data register content or set current register.\n"
"\n"
"DIR requested data register; possible values: 'in' for\n"
" input and 'out' for output; default is 'out'\n"
"BITSTRING set current data register with BITSTRING (e.g. 01010)\n"),
"dr", "dr");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s [DIR]\n"
"Usage: %s BITSTRING\n"
"Display input or output data register content or set current register.\n"
"\n"
"DIR requested data register; possible values: 'in' for\n"
" input and 'out' for output; default is 'out'\n"
"BITSTRING set current data register with BITSTRING (e.g. 01010)\n"),
"dr", "dr");
}
const urj_cmd_t urj_cmd_dr = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -75,9 +75,10 @@ cmd_endian_run (urj_chain_t *chain, char *params[])
static void
cmd_endian_help (void)
{
printf (_("Usage: %s\n"
"Set or print endianess for external files.\n"),
"endian [little|big]");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s\n"
"Set or print endianess for external files.\n"),
"endian [little|big]");
}
const urj_cmd_t urj_cmd_endian = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdint.h>
@ -70,17 +70,20 @@ cmd_eraseflash_help (void)
{
int i;
printf (_("Usage: %s ADDR BLOCKS\n"
"Erase flash memory from ADDR.\n"
"\n"
"ADDR target addres for erasing block\n"
"BLOCKS number of blocks to erase\n"
"\n"
"ADDR and BLOCKS could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n" "Supported Flash Memories:\n"), "eraseflash");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ADDR BLOCKS\n"
"Erase flash memory from ADDR.\n"
"\n"
"ADDR target addres for erasing block\n"
"BLOCKS number of blocks to erase\n"
"\n"
"ADDR and BLOCKS could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n" "Supported Flash Memories:\n"),
"eraseflash");
for (i = 0; urj_flash_flash_drivers[i]; i++)
printf (_("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name),
urj_log (URJ_LOG_LEVEL_NORMAL,
_("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name),
_(urj_flash_flash_drivers[i]->description));
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdint.h>
@ -92,23 +92,25 @@ cmd_flashmem_help (void)
{
int i;
printf (_("Usage: %s ADDR FILENAME [noverify]\n"
"Usage: %s FILENAME [noverify]\n"
"Program FILENAME content to flash memory.\n"
"\n"
"ADDR target address for raw binary image\n"
"FILENAME name of the input file\n"
"%-10s FILENAME is in MS .bin format (for WinCE)\n"
"%-10s if specified, verification is skipped\n"
"\n"
"ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n"
"Supported Flash Memories:\n"), "flashmem",
"flashmem msbin", "msbin", "noverify");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ADDR FILENAME [noverify]\n"
"Usage: %s FILENAME [noverify]\n"
"Program FILENAME content to flash memory.\n"
"\n"
"ADDR target address for raw binary image\n"
"FILENAME name of the input file\n"
"%-10s FILENAME is in MS .bin format (for WinCE)\n"
"%-10s if specified, verification is skipped\n"
"\n"
"ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n"
"Supported Flash Memories:\n"),
"flashmem", "flashmem msbin", "msbin", "noverify");
for (i = 0; urj_flash_flash_drivers[i]; i++)
printf (_("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name),
_(urj_flash_flash_drivers[i]->description));
urj_log (URJ_LOG_LEVEL_NORMAL,
_("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name),
_(urj_flash_flash_drivers[i]->description));
}
const urj_cmd_t urj_cmd_flashmem = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
@ -69,16 +69,18 @@ cmd_frequency_run (urj_chain_t *chain, char *params[])
static void
cmd_frequency_help (void)
{
printf (_("Usage: %s [FREQ]\n"
"Change TCK frequency to FREQ or print current TCK frequency.\n"
"\n"
"FREQ is in hertz. It's a maximum TCK frequency for JTAG interface.\n"
"In some cases the TCK frequency is less than FREQ, but the frequency\n"
"is never more than FREQ. Maximum supported frequency depends on JTAG\n"
"adapter.\n"
"\n"
"FREQ must be an unsigned integer. Minimum allowed frequency is 1 Hz.\n"
"Use 0 for FREQ to disable frequency limit.\n"), "frequency");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s [FREQ]\n"
"Change TCK frequency to FREQ or print current TCK frequency.\n"
"\n"
"FREQ is in hertz. It's a maximum TCK frequency for JTAG interface.\n"
"In some cases the TCK frequency is less than FREQ, but the frequency\n"
"is never more than FREQ. Maximum supported frequency depends on JTAG\n"
"adapter.\n"
"\n"
"FREQ must be an unsigned integer. Minimum allowed frequency is 1 Hz.\n"
"Use 0 for FREQ to disable frequency limit.\n"),
"frequency");
}
const urj_cmd_t urj_cmd_frequency = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -84,11 +84,12 @@ cmd_get_run (urj_chain_t *chain, char *params[])
static void
cmd_get_help (void)
{
printf (_("Usage: %s signal SIGNAL\n"
"Get signal state from output BSR (Boundary Scan Register).\n"
"\n"
"SIGNAL signal name (from JTAG declaration file)\n"),
"get signal");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s signal SIGNAL\n"
"Get signal state from output BSR (Boundary Scan Register).\n"
"\n"
"SIGNAL signal name (from JTAG declaration file)\n"),
"get signal");
}
const urj_cmd_t urj_cmd_get = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -75,9 +75,10 @@ cmd_help_run (urj_chain_t *chain, char *params[])
static void
cmd_help_help (void)
{
printf (_("Usage: %s [COMMAND]\n"
"Print short help for COMMAND, or list of available commands.\n"),
"help");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s [COMMAND]\n"
"Print short help for COMMAND, or list of available commands.\n"),
"help");
}
const urj_cmd_t urj_cmd_help = {

@ -21,7 +21,7 @@
* Written by Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>, 2008.
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
@ -59,11 +59,12 @@ cmd_idcode_run (urj_chain_t *chain, char *params[])
static void
cmd_idcode_help (void)
{
printf (_("Usage: %s [BYTES]\n"
"Read [BYTES]|all IDCODEs of all parts in a JTAG chain.\n"
"\n"
"BYTES must be an unsigned integer, Use 0 for BYTES to read all bytes\n"),
"idcode");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s [BYTES]\n"
"Read [BYTES]|all IDCODEs of all parts in a JTAG chain.\n"
"\n"
"BYTES must be an unsigned integer, Use 0 for BYTES to read all bytes\n"),
"idcode");
}
const urj_cmd_t urj_cmd_idcode = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <ctype.h>
#include <stdio.h>
@ -78,9 +78,11 @@ cmd_include_or_script_run (urj_chain_t *chain, int is_include, char *params[])
static void
cmd_include_or_script_help (char *cmd)
{
printf (_("Usage: %s FILENAME [n] \n"
"Run command sequence n times from external FILENAME.\n"
"\n" "FILENAME Name of the file with commands\n"), cmd);
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s FILENAME [n] \n"
"Run command sequence n times from external FILENAME.\n"
"\n" "FILENAME Name of the file with commands\n"),
cmd);
}
static int

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdlib.h>
@ -94,15 +94,18 @@ cmd_initbus_help (void)
{
int i;
printf (_("Usage: %s BUSNAME\n"
"Initialize new bus driver for active part.\n"
"\n"
"BUSNAME Name of the bus\n"
"\n" "List of available buses:\n"), "initbus");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s BUSNAME\n"
"Initialize new bus driver for active part.\n"
"\n"
"BUSNAME Name of the bus\n"
"\n" "List of available buses:\n"),
"initbus");
for (i = 0; urj_bus_drivers[i] != NULL; i++)
printf (_("%-10s %s\n"), urj_bus_drivers[i]->name,
urj_bus_drivers[i]->description);
urj_log (URJ_LOG_LEVEL_NORMAL,
_("%-10s %s\n"), urj_bus_drivers[i]->name,
urj_bus_drivers[i]->description);
}
const const urj_cmd_t urj_cmd_initbus = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -97,16 +97,17 @@ cmd_instruction_run (urj_chain_t *chain, char *params[])
static void
cmd_instruction_help (void)
{
printf (_("Usage: %s INSTRUCTION\n"
"Usage: %s length LENGTH\n"
"Usage: %s INSTRUCTION CODE REGISTER\n"
"Change active INSTRUCTION for a part or declare new instruction.\n"
"\n"
"INSTRUCTION instruction name (e.g. BYPASS)\n"
"LENGTH common instruction length\n"
"CODE instruction code (e.g. 11111)\n"
"REGISTER default data register for instruction (e.g. BR)\n"),
"instruction", "instruction", "instruction");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s INSTRUCTION\n"
"Usage: %s length LENGTH\n"
"Usage: %s INSTRUCTION CODE REGISTER\n"
"Change active INSTRUCTION for a part or declare new instruction.\n"
"\n"
"INSTRUCTION instruction name (e.g. BYPASS)\n"
"LENGTH common instruction length\n"
"CODE instruction code (e.g. 11111)\n"
"REGISTER default data register for instruction (e.g. BR)\n"),
"instruction", "instruction", "instruction");
}
const urj_cmd_t urj_cmd_instruction = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -132,9 +132,11 @@ cmd_part_help (void)
// @@@@ RFHH this doesn't reflect input syntax:
// jtag> part PART
// jtag> part alias ALIAS
printf (_("Usage: %s PART\n"
"Change active part for current JTAG chain.\n"
"\n" "PART part number | alias\n"), "part");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s PART\n"
"Change active part for current JTAG chain.\n"
"\n" "PART part number | alias\n"),
"part");
}
const urj_cmd_t urj_cmd_part = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdint.h>
@ -96,13 +96,15 @@ cmd_peek_run (urj_chain_t *chain, char *params[])
static void
cmd_peek_help (void)
{
printf (_("Usage: %s ADDR\n"
"Read a single word (bus width size).\n"
"\n"
"ADDR address to read from\n"
"\n"
"ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n"), "peek");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ADDR\n"
"Read a single word (bus width size).\n"
"\n"
"ADDR address to read from\n"
"\n"
"ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n"),
"peek");
}
const urj_cmd_t urj_cmd_peek = {
@ -157,14 +159,16 @@ cmd_poke_run (urj_chain_t *chain, char *params[])
static void
cmd_poke_help (void)
{
printf (_("Usage: %s ADDR VAL [ADDR VAL] ... \n"
"Write a single word (bus width size).\n"
"\n"
"ADDR address to write\n"
"VAL value to write\n"
"\n"
"ADDR and VAL could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n"), "poke");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ADDR VAL [ADDR VAL] ... \n"
"Write a single word (bus width size).\n"
"\n"
"ADDR address to write\n"
"VAL value to write\n"
"\n"
"ADDR and VAL could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"\n"),
"poke");
}
const urj_cmd_t urj_cmd_poke = {

@ -24,7 +24,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdlib.h>
@ -101,11 +101,13 @@ cmd_pod_run (urj_chain_t *chain, char *params[])
static void
cmd_pod_help (void)
{
printf (_("Usage: %s SIGNAL=# [SIGNAL=# ...]\n"
"Set state of POD signal(s) to 0 or 1.\n"
"\n"
"SIGNAL TCK,TMS, TDI, TRST, or RESET\n"
"# 0 or 1\n"), "pod");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s SIGNAL=# [SIGNAL=# ...]\n"
"Set state of POD signal(s) to 0 or 1.\n"
"\n"
"SIGNAL TCK,TMS, TDI, TRST, or RESET\n"
"# 0 or 1\n"),
"pod");
}
const urj_cmd_t urj_cmd_pod = {

@ -22,9 +22,7 @@
*
*/
#include <config.h>
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdlib.h>
#include <stdio.h>
@ -273,12 +271,13 @@ cmd_print_run (urj_chain_t *chain, char *params[])
static void
cmd_print_help (void)
{
printf (_("Usage: %s [chain|bus|signals|instructions]\n"
"Display JTAG chain status.\n"
"\n"
"Display list of the parts connected to the JTAG chain including\n"
"part number and current (active) instruction and data register.\n"),
"print");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s [chain|bus|signals|instructions]\n"
"Display JTAG chain status.\n"
"\n"
"Display list of the parts connected to the JTAG chain including\n"
"part number and current (active) instruction and data register.\n"),
"print");
}
const urj_cmd_t urj_cmd_print = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
@ -48,7 +48,8 @@ cmd_quit_run (urj_chain_t *chain, char *params[])
static void
cmd_quit_help (void)
{
printf (_("Usage: %s\n" "Exit from %s.\n"), "quit", PACKAGE);
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s\n" "Exit from %s.\n"), "quit", PACKAGE);
}
const urj_cmd_t urj_cmd_quit = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdint.h>
@ -76,15 +76,16 @@ cmd_readmem_run (urj_chain_t *chain, char *params[])
static void
cmd_readmem_help (void)
{
printf (_("Usage: %s ADDR LEN FILENAME\n"
"Copy device memory content starting with ADDR to FILENAME file.\n"
"\n"
"ADDR start address of the copied memory area\n"
"LEN copied memory length\n"
"FILENAME name of the output file\n"
"\n"
"ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n"),
"readmem");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ADDR LEN FILENAME\n"
"Copy device memory content starting with ADDR to FILENAME file.\n"
"\n"
"ADDR start address of the copied memory area\n"
"LEN copied memory length\n"
"FILENAME name of the output file\n"
"\n"
"ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n"),
"readmem");
}
const urj_cmd_t urj_cmd_readmem = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdlib.h>
@ -68,11 +68,13 @@ cmd_register_run (urj_chain_t *chain, char *params[])
static void
cmd_register_help (void)
{
printf (_("Usage: %s NAME LENGTH\n"
"Define new data register with specified NAME and LENGTH.\n"
"\n"
"NAME Data register name\n"
"LENGTH Data register length\n"), "register");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s NAME LENGTH\n"
"Define new data register with specified NAME and LENGTH.\n"
"\n"
"NAME Data register name\n"
"LENGTH Data register length\n"),
"register");
}
const urj_cmd_t urj_cmd_register = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -54,7 +54,8 @@ cmd_reset_run (urj_chain_t *chain, char *params[])
static void
cmd_reset_help (void)
{
printf (_("Usage: %s\n" "Reset current JTAG chain.\n"), "reset");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s\n" "Reset current JTAG chain.\n"), "reset");
}
const urj_cmd_t urj_cmd_reset = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdlib.h>
@ -85,11 +85,13 @@ cmd_salias_run (urj_chain_t *chain, char *params[])
static void
cmd_salias_help (void)
{
printf (_("Usage: %s ALIAS SIGNAL\n"
"Define new signal ALIAS as alias for existing SIGNAL.\n"
"\n"
"ALIAS New signal alias name\n"
"SIGNAL Existing signal name\n"), "signal");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ALIAS SIGNAL\n"
"Define new signal ALIAS as alias for existing SIGNAL.\n"
"\n"
"ALIAS New signal alias name\n"
"SIGNAL Existing signal name\n"),
"signal");
}
const urj_cmd_t urj_cmd_salias = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdlib.h>
@ -125,8 +125,10 @@ cmd_scan_run (urj_chain_t *chain, char *params[])
static void
cmd_scan_help (void)
{
printf (_("Usage: %s [SIGNAL]* \n"
"Read BSR and show changes since last scan.\n"), "scan");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s [SIGNAL]* \n"
"Read BSR and show changes since last scan.\n"),
"scan");
}
const urj_cmd_t urj_cmd_scan = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -106,13 +106,15 @@ cmd_set_run (urj_chain_t *chain, char *params[])
static void
cmd_set_help (void)
{
printf (_("Usage: %s SIGNAL DIR [DATA]\n"
"Set signal state in input BSR (Boundary Scan Register).\n"
"\n"
"SIGNAL signal name (from JTAG declaration file)\n"
"DIR requested signal direction; possible values: 'in' or 'out'\n"
"DATA desired output signal value ('0' or '1'); used only if DIR\n"
" is 'out'\n"), "set signal");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s SIGNAL DIR [DATA]\n"
"Set signal state in input BSR (Boundary Scan Register).\n"
"\n"
"SIGNAL signal name (from JTAG declaration file)\n"
"DIR requested signal direction; possible values: 'in' or 'out'\n"
"DATA desired output signal value ('0' or '1'); used only if DIR\n"
" is 'out'\n"),
"set signal");
}
const urj_cmd_t urj_cmd_set = {

@ -22,7 +22,7 @@
* shell.c added by djf
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <sys/types.h>
#include <unistd.h>
@ -87,9 +87,11 @@ cmd_shell_run (urj_chain_t *chain, char *params[])
static void
cmd_shell_help (void)
{
printf (_("Usage: %s cmmd\n"
"Shell out to os for a command.\n"
"\n" "CMMD OS Shell Command\n"), "shell cmmd");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s cmmd\n"
"Shell out to os for a command.\n"
"\n" "CMMD OS Shell Command\n"),
"shell cmmd");
}
const urj_cmd_t urj_cmd_shell = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -70,9 +70,10 @@ cmd_shift_run (urj_chain_t *chain, char *params[])
static void
cmd_shift_help (void)
{
printf (_("Usage: %s\n"
"Usage: %s\n"
"Shift instruction or data register through JTAG chain.\n"),
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s\n"
"Usage: %s\n"
"Shift instruction or data register through JTAG chain.\n"),
"shift ir", "shift dr");
}

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdlib.h>
@ -94,11 +94,13 @@ cmd_signal_run (urj_chain_t *chain, char *params[])
static void
cmd_signal_help (void)
{
printf (_("Usage: %s SIGNAL [PIN#]\n"
"Define new signal with name SIGNAL for a part.\n"
"\n"
"SIGNAL New signal name\n"
"PIN# List of pin # for a signal\n"), "signal");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s SIGNAL [PIN#]\n"
"Define new signal with name SIGNAL for a part.\n"
"\n"
"SIGNAL New signal name\n"
"PIN# List of pin # for a signal\n"),
"signal");
}
const urj_cmd_t urj_cmd_signal = {

@ -23,7 +23,7 @@
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdio.h>
@ -100,12 +100,14 @@ cmd_svf_run (urj_chain_t *chain, char *params[])
static void
cmd_svf_help (void)
{
printf (_("Usage: %s FILE [stop] [progress] [ref_freq=<frequency>]\n"
"Execute svf commands from FILE.\n"
"stop : Command execution stops upon TDO mismatch.\n"
"progress : Continually displays progress status.\n"
"ref_freq : Use <frequency> as the reference for 'RUNTEST xxx SEC' commands\n"
"\n" "FILE file containing SVF commands\n"), "svf");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s FILE [stop] [progress] [ref_freq=<frequency>]\n"
"Execute svf commands from FILE.\n"
"stop : Command execution stops upon TDO mismatch.\n"
"progress : Continually displays progress status.\n"
"ref_freq : Use <frequency> as the reference for 'RUNTEST xxx SEC' commands\n"
"\n" "FILE file containing SVF commands\n"),
"svf");
}
const urj_cmd_t urj_cmd_svf = {

@ -23,7 +23,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <string.h>
@ -100,11 +100,12 @@ cmd_test_run (urj_chain_t *chain, char *params[])
static void
cmd_test_help (void)
{
printf (_("Usage: %s SIGNAL 0/1\n"
"Test signal state from output BSR (Boundary Scan Register).\n"
"\n"
"SIGNAL signal name (from JTAG declaration file)\n"),
"test signal");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s SIGNAL 0/1\n"
"Test signal state from output BSR (Boundary Scan Register).\n"
"\n"
"SIGNAL signal name (from JTAG declaration file)\n"),
"test signal");
}
const urj_cmd_t urj_cmd_test = {

@ -22,7 +22,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <unistd.h>
@ -58,8 +58,10 @@ cmd_usleep_run (urj_chain_t *chain, char *params[])
static void
cmd_usleep_help (void)
{
printf (_("Usage: %s USECS\n"
"Sleep some number of microseconds.\n"), "usleep");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s USECS\n"
"Sleep some number of microseconds.\n"),
"usleep");
}
const urj_cmd_t urj_cmd_usleep = {

@ -20,7 +20,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdint.h>
@ -74,16 +74,17 @@ cmd_writemem_run (urj_chain_t *chain, char *params[])
static void
cmd_writemem_help (void)
{
printf (_("Usage: %s ADDR LEN FILENAME\n"
"Write to device memory starting at ADDR the FILENAME file.\n"
"\n"
"ADDR start address of the written memory area\n"
"LEN written memory length\n"
"FILENAME name of the input file\n"
"\n"
"ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"NOTE: This is NOT useful for FLASH programming!\n"),
"writemem");
urj_log (URJ_LOG_LEVEL_NORMAL,
_("Usage: %s ADDR LEN FILENAME\n"
"Write to device memory starting at ADDR the FILENAME file.\n"
"\n"
"ADDR start address of the written memory area\n"
"LEN written memory length\n"
"FILENAME name of the input file\n"
"\n"
"ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n"
"NOTE: This is NOT useful for FLASH programming!\n"),
"writemem");
}
const urj_cmd_t urj_cmd_writemem = {

@ -32,7 +32,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdlib.h>

@ -26,7 +26,7 @@
* [2] Spansion, Am29LV040B Data Sheet
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdlib.h>

@ -28,7 +28,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdlib.h>

@ -28,7 +28,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <string.h>

@ -33,7 +33,7 @@
*
*/
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdint.h>
#include <stdlib.h>

@ -34,7 +34,7 @@
#ifndef URJ_SRC_FLASH_H
#define URJ_SRC_FLASH_H
#include <urjtag/sysdep.h>
#include <sysdep.h>
#include <stdio.h>
#include <stdint.h>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save