From 73adae3661160d410dcc802873b530d255c210e5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 4 Sep 2009 15:30:22 -0700 Subject: Add --device/-D support to the command line tools and manuals Use the new cc_usbdevs_find_by_arg function to locate suitable target devices connected via USB. Signed-off-by: Keith Packard --- ao-tools/ao-dbg/ao-dbg-parse.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ao-tools/ao-dbg/ao-dbg-parse.c') 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); -- cgit v1.2.3