diff options
Diffstat (limited to 'ao-tools/ao-dbg')
| -rw-r--r-- | ao-tools/ao-dbg/ao-dbg-main.c | 5 | ||||
| -rw-r--r-- | ao-tools/ao-dbg/ao-dbg-parse.c | 5 | ||||
| -rw-r--r-- | ao-tools/ao-dbg/ao-dbg.1 | 20 | ||||
| -rw-r--r-- | ao-tools/ao-dbg/ao-dbg.h | 2 | 
4 files changed, 31 insertions, 1 deletions
| diff --git a/ao-tools/ao-dbg/ao-dbg-main.c b/ao-tools/ao-dbg/ao-dbg-main.c index f1e2c111..21b83a3d 100644 --- a/ao-tools/ao-dbg/ao-dbg-main.c +++ b/ao-tools/ao-dbg/ao-dbg-main.c @@ -34,6 +34,7 @@ struct ccdbg *s51_dbg;  int s51_interrupted = 0;  int s51_monitor = 0;  char *s51_tty = NULL; +char *s51_device = NULL;  static FILE *s51_input;  static FILE *s51_output; @@ -52,6 +53,7 @@ void s51_sigint()  static const struct option options[] = {  	{ .name = "tty", .has_arg = 1, .val = 'T' }, +	{ .name = "device", .has_arg = 1, .val = 'D' },  	{ 0, 0, 0, 0 },  }; @@ -114,6 +116,9 @@ main(int argc, char **argv)  		case 'T':  			s51_tty = optarg;  			break; +		case 'D': +			s51_device = optarg; +			break;  		}  	}  	if (s51_port) { diff --git a/ao-tools/ao-dbg/ao-dbg-parse.c b/ao-tools/ao-dbg/ao-dbg-parse.c index 825d0e9c..dcb9099d 100644 --- a/ao-tools/ao-dbg/ao-dbg-parse.c +++ b/ao-tools/ao-dbg/ao-dbg-parse.c @@ -195,6 +195,11 @@ command_read (void)  	enum command_result result;  	struct command_function *func; +	if (!s51_tty) { +		if (!s51_device) +			s51_device = getenv("AO_DBG_DEVICE"); +		s51_tty = cc_usbdevs_find_by_arg(s51_device, "TIDongle"); +	}  	s51_dbg = ccdbg_open (s51_tty);  	if (!s51_dbg)  		exit(1); diff --git a/ao-tools/ao-dbg/ao-dbg.1 b/ao-tools/ao-dbg/ao-dbg.1 index a850c454..00d3ac86 100644 --- a/ao-tools/ao-dbg/ao-dbg.1 +++ b/ao-tools/ao-dbg/ao-dbg.1 @@ -35,6 +35,9 @@ ao-dbg \- hex debugger for cc1111 processors  [\-h]  [\-m]  [\-T \fItty-device\fP] +[\--tty \fItty-device\fP] +[\-D \fIaltos-device\fP] +[\--device \fIaltos-device\fP]  .SH DESCRIPTION  .I ao-dbg  connects to a cc1111 processor through either a suitable cc1111 board @@ -80,11 +83,26 @@ This should print a usage message, but does nothing useful currently.  .IP "\-m"  This option is not present in the original 8051 emulator, and causes ao-dbg to  dump all commands and replies that are received from and sent to sdcdb. -.IP "\-T" +.TP +\-T tty-device | --tty tty-device  This selects which tty device the debugger uses to communicate with  the target device. The special name 'BITBANG' directs ao-dbg to use  the cp2103 connection, otherwise this should be a usb serial port  connected to a suitable cc1111 debug node. +.TP +\-D AltOS-device | --device AltOS-device +Search for a connected device. This requires an argument of one of the +following forms: +.IP +TeleMetrum:2 +.br +TeleMetrum +.br +2 +.IP +Leaving out the product name will cause the tool to select a suitable +product, leaving out the serial number will cause the tool to match +one of the available devices.  .SH COMMANDS  Once started, ao-dbg connects to the cc1111 and then reads and  executes commands, either from stdin, or the nework connection to diff --git a/ao-tools/ao-dbg/ao-dbg.h b/ao-tools/ao-dbg/ao-dbg.h index c1789d10..edc650a5 100644 --- a/ao-tools/ao-dbg/ao-dbg.h +++ b/ao-tools/ao-dbg/ao-dbg.h @@ -17,12 +17,14 @@   */  #include <ccdbg.h> +#include <cc.h>  extern char *s51_prompt;  extern struct ccdbg *s51_dbg;  extern int s51_interrupted;  extern int s51_monitor;  extern char *s51_tty; +extern char *s51_device;  enum command_result {  	command_success, command_debug, command_syntax, command_interrupt, command_error, | 
