summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ecosboard.c30
-rw-r--r--src/jtag/Makefile.am2
-rw-r--r--src/jtag/jtag.h2
-rw-r--r--src/jtag/tcl.c4
-rw-r--r--src/jtag/zy1000/zy1000.c24
5 files changed, 29 insertions, 33 deletions
diff --git a/src/ecosboard.c b/src/ecosboard.c
index 20907576..0b1bf36e 100644
--- a/src/ecosboard.c
+++ b/src/ecosboard.c
@@ -191,7 +191,6 @@ int zy1000_configuration_output_handler_log(struct command_context_s *context,
}
#ifdef CYGPKG_PROFILE_GPROF
-extern void start_profile(void);
int eCosBoard_handle_eCosBoard_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
@@ -304,7 +303,7 @@ void format(void)
e.len = ds.dev_size;
e.err_address = &err_addr;
- diag_printf("Formatting 0x%08x bytes\n", ds.dev_size);
+ diag_printf("Formatting 0x%08x bytes\n", (int)ds.dev_size);
err = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_FLASH_ERASE, &e, &len);
if (err != ENOERR)
{
@@ -421,8 +420,6 @@ static int zylinjtag_Jim_Command_reboot(Jim_Interp *interp, int argc,
}
-extern Jim_Interp *interp;
-
static void zylinjtag_startNetwork(void)
{
// Bring TCP/IP up immediately before we're ready to accept commands.
@@ -860,7 +857,7 @@ int boolParam(char *var);
command_context_t *setup_command_handler(void);
-extern const char *zylin_config_dir;
+static const char *zylin_config_dir="/config/settings";
int add_default_dirs(void)
{
@@ -1551,3 +1548,26 @@ static int logfs_fo_close(struct CYG_FILE_TAG *fp)
return ENOERR;
}
+int loadFile(const char *fileName, void **data, int *len);
+
+/* boolean parameter stored on config */
+int boolParam(char *var)
+{
+ bool result = false;
+ char *name = alloc_printf("%s/%s", zylin_config_dir, var);
+ if (name == NULL)
+ return result;
+
+ void *data;
+ int len;
+ if (loadFile(name, &data, &len) == ERROR_OK)
+ {
+ if (len > 1)
+ len = 1;
+ result = strncmp((char *) data, "1", len) == 0;
+ free(data);
+ }
+ free(name);
+ return result;
+}
+
diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am
index 58bbff36..5af6c74f 100644
--- a/src/jtag/Makefile.am
+++ b/src/jtag/Makefile.am
@@ -9,7 +9,7 @@ DRIVERFILES =
if MINIDRIVER
-if ECOSBOARD
+if ZY1000
DRIVERFILES += zy1000/zy1000.c
AM_CPPFLAGS += -I$(srcdir)/zy1000
endif
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index cddceef4..459f7fd0 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -62,7 +62,7 @@
*/
typedef enum tap_state
{
-#if BUILD_ECOSBOARD
+#if BUILD_ZY1000
/* These are the old numbers. Leave as-is for now... */
TAP_RESET = 0, TAP_IDLE = 8,
TAP_DRSELECT = 1, TAP_DRCAPTURE = 2, TAP_DRSHIFT = 3, TAP_DREXIT1 = 4,
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index fc2671e2..ad4d886a 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -49,7 +49,7 @@ static const Jim_Nvp nvp_jtag_tap_event[] = {
/* jtag interfaces (parport, FTDI-USB, TI-USB, ...)
*/
-#if BUILD_ECOSBOARD == 1
+#if BUILD_ZY1000 == 1
extern jtag_interface_t zy1000_interface;
#elif defined(BUILD_MINIDRIVER_DUMMY)
extern jtag_interface_t minidummy_interface;
@@ -119,7 +119,7 @@ static const Jim_Nvp nvp_jtag_tap_event[] = {
* or some number of standard driver interfaces, never both.
*/
jtag_interface_t *jtag_interfaces[] = {
-#if BUILD_ECOSBOARD == 1
+#if BUILD_ZY1000 == 1
&zy1000_interface,
#elif defined(BUILD_MINIDRIVER_DUMMY)
&minidummy_interface,
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c
index 4dbdef24..daac0772 100644
--- a/src/jtag/zy1000/zy1000.c
+++ b/src/jtag/zy1000/zy1000.c
@@ -33,7 +33,6 @@
#define ZYLIN_TIME __TIME__
#define ZYLIN_OPENOCD "$Revision$"
#define ZYLIN_OPENOCD_VERSION "Zylin JTAG ZY1000 " ZYLIN_VERSION " " ZYLIN_DATE " " ZYLIN_TIME
-const char *zylin_config_dir="/config/settings";
/* low level command set
*/
@@ -783,27 +782,4 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, u8 *buffer, int little
}
}
-int loadFile(const char *fileName, void **data, int *len);
-
-/* boolean parameter stored on config */
-int boolParam(char *var)
-{
- bool result = false;
- char *name = alloc_printf("%s/%s", zylin_config_dir, var);
- if (name == NULL)
- return result;
-
- void *data;
- int len;
- if (loadFile(name, &data, &len) == ERROR_OK)
- {
- if (len > 1)
- len = 1;
- result = strncmp((char *) data, "1", len) == 0;
- free(data);
- }
- free(name);
- return result;
-}
-