to set remote load type and protocol.
* rom68k-rom.c: Add to_stop in target_ops.
+Tue Nov 15 01:03:56 1994 Rob Savoye (rob@slipknot.cygnus.com)
+
+ * op50-rom.c, w89k-rom.c, monitor.c: Modify to usr two variables
+ to set remote load type and protocol.
+ * rom68k-rom.c: Add to_stop in target_ops.
+
Mon Nov 14 08:51:29 1994 Stu Grossman (grossman@cygnus.com)
* Makefile.in: Install gdbtk.tcl.
/* sets the download protocol, choices are srec, generic, boot */
char *loadtype;
static char *loadtype_str;
+static char *loadproto_str;
static void set_loadtype_command();
+static void set_loadproto_command();
static void monitor_load_srec();
static int monitor_write_srec();
free (tmp);
error ("Loadtype \"%s\" does not exist.", (*(char **) c->var));
}
+/*
+ * set_loadproto_command -- set the protocol for downloading. Check to make
+ * sure you have a supported protocol for this target.
+ */
+static void
+set_loadproto_command (ignore, from_tty, c)
+ char *ignore;
+ int from_tty;
+ struct cmd_list_element *c;
+{
+ char *tmp;
+ char *type;
+ if (STREQ (LOADPROTOS, "")) {
+ error ("No load protocols set");
+ return;
+ }
+
+ tmp = savestring (LOADPROTOS, strlen(LOADPROTOS));
+ type = strtok(tmp, ",");
+ if (STREQ (type, (*(char **) c->var))) {
+ loadproto_str = savestring (*(char **) c->var, strlen (*(char **) c->var));
+ return;
+ }
+
+ while ((type = strtok (NULL, ",")) != (char *)NULL) {
+ if (STREQ (type, (*(char **) c->var)))
+ loadproto_str = savestring (*(char **) c->var, strlen (*(char **) c->var));
+ return;
+ }
+ free (tmp);
+ error ("Load protocol \"%s\" does not exist.", (*(char **) c->var));
+}
/*
* printf_monitor -- send data to monitor. Works just like printf.
static char buf[50];
const char *p;
char *b;
-
+
b = buf;
if (regno < 0)
i = 0;
while (i++ < 60) {
character = (char)readchar (0);
- if (character == 0xfffffffe) { /* empty uart */
+ if ((character == 0xfffffffe) || (character == 0x7f)) { /* empty uart */
if (sr_get_debug() > 3)
putchar ('.');
fflush (stdout);
struct cmd_list_element *c;
/* this sets the type of download protocol */
- c = add_set_cmd ("loadtype", no_class, var_string, (char *)&loadtype_str,
+ c = add_set_cmd ("remoteloadprotocol", no_class, var_string, (char *)&loadproto_str,
+ "Set the type of the remote load protocol.\n", &setlist);
+ c->function.sfunc = set_loadproto_command;
+ add_show_from_set (c, &showlist);
+ loadproto_str = savestring ("none", 5);
+
+ /* this sets the conversion type when loading */
+ c = add_set_cmd ("remoteloadtype", no_class, var_string, (char *)&loadtype_str,
"Set the type of the remote load protocol.\n", &setlist);
c->function.sfunc = set_loadtype_command;
add_show_from_set (c, &showlist);
- loadtype_str = savestring ("default", 8);
+ loadtype_str = savestring ("srec", 5);
add_show_from_set (add_set_cmd ("hash", no_class, var_boolean,
(char *)&hashmark,
char *cmd_end; /* optional command terminator */
struct target_ops *target; /* target operations */
char *loadtypes; /* the load types that are supported */
+ char *loadprotos; /* the load protocols that are supported */
char **regnames; /* array of register names in ascii */
};
#define PROTO_TYPE (current_monitor->type)
#define LOADTYPES (current_monitor->loadtypes)
+#define LOADPROTOS (current_monitor->loadprotos)
#define INIT_CMD (current_monitor->init)
#define GO_CMD (current_monitor->execute)
#define CONT_CMD (current_monitor->resume)
"Debug on a Oki OP50N eval board.\n\
Specify the serial device it is connected to (e.g. /dev/ttya).",
op50n_open,
-
monitor_close,
- 0,
+ monitor_attach,
monitor_detach,
monitor_resume,
monitor_wait,
" ", /* end-of-command delimitor */
".\n", /* optional command terminator */
&op50n_ops, /* target operations */
- "srec,ascii-srec,default", /* load types */
+ "none,srec,default", /* load types */
+ "none", /* load types */
op50n_regnames
};
monitor_mourn_inferior,
0, /* can_run */
0, /* notice_signals */
+ 0, /* to_stop */
process_stratum,
0, /* next */
1,
1, /* all mem, mem, stack, regs, exec */
0,
0, /* Section pointers */
- OPS_MAGIC, /* Always the last thing */
+ OPS_MAGIC /* Always the last thing */
};
struct monitor_ops rom68k_cmds = {
"=", /* end-of-command delimitor */
".\n", /* optional command terminator */
&rom68k_ops, /* target operations */
- "srec,xmodem-ascii,xmodem-srec,default",/* load types */
+ "none,srec,default", /* load types */
+ "none", /* load protocols */
rom68k_regnames /* registers names */
};
/* this is the default, since it's the only baud rate supported by the hardware */
baud_rate = 9600;
}
-
-
-
-
/* Remote target glue for the WinBond ROM monitor running on the "Cougar"
W89k eval board.
-
Copyright 1988, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GDB.
"", /* end-of-command delimitor */
"", /* optional command terminator */
&w89k_ops, /* target operations */
- "srec,xmodem-ascii,xmodem-srec,default",/* load types */
+ "none,srec,default", /* load types */
+ "none,xmodem", /* load protocols */
w89k_regnames /* registers names */
};
/* this is the default, since it's the only baud rate supported by the hardware */
baud_rate = 9600;
}
-
-
-
-