summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fd8a3c9)
Use unified "adapter usb location" instead of driver specific
command.
Change-Id: I568a76b87d09cea0f40f1580cf81f7c51402f6f1
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-on: http://openocd.zylin.com/4771
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Returns the name of the debug adapter driver being used.
@end deffn
Returns the name of the debug adapter driver being used.
@end deffn
+@anchor{adapter_usb_location}
@deffn Command {adapter usb location} <bus>-<port>[.<port>]...
Specifies the physical USB port of the adapter to use. The path
roots at @var{bus} and walks down the physical ports, with each
@deffn Command {adapter usb location} <bus>-<port>[.<port>]...
Specifies the physical USB port of the adapter to use. The path
roots at @var{bus} and walks down the physical ports, with each
and are not restricted to containing only decimal digits.)
@end deffn
and are not restricted to containing only decimal digits.)
@end deffn
-@deffn {Config Command} {ftdi_location} <bus>:<port>[,<port>]...
+@deffn {Config Command} {ftdi_location} <bus>-<port>[.<port>]...
+@emph{DEPRECATED -- avoid using this.
+Use the @xref{adapter_usb_location, adapter usb location} command instead.}
+
Specifies the physical USB port of the adapter to use. The path
roots at @var{bus} and walks down the physical ports, with each
@var{port} option specifying a deeper level in the bus topology, the last
Specifies the physical USB port of the adapter to use. The path
roots at @var{bus} and walks down the physical ports, with each
@var{port} option specifying a deeper level in the bus topology, the last
#endif
/* project specific includes */
#endif
/* project specific includes */
+#include <jtag/drivers/jtag_usb_common.h>
#include <jtag/interface.h>
#include <jtag/swd.h>
#include <transport/transport.h>
#include <jtag/interface.h>
#include <jtag/swd.h>
#include <transport/transport.h>
static char *ftdi_device_desc;
static char *ftdi_serial;
static char *ftdi_device_desc;
static char *ftdi_serial;
-static char *ftdi_location;
static uint8_t ftdi_channel;
static uint8_t ftdi_jtag_mode = JTAG_MODE;
static uint8_t ftdi_channel;
static uint8_t ftdi_jtag_mode = JTAG_MODE;
for (int i = 0; ftdi_vid[i] || ftdi_pid[i]; i++) {
mpsse_ctx = mpsse_open(&ftdi_vid[i], &ftdi_pid[i], ftdi_device_desc,
for (int i = 0; ftdi_vid[i] || ftdi_pid[i]; i++) {
mpsse_ctx = mpsse_open(&ftdi_vid[i], &ftdi_pid[i], ftdi_device_desc,
- ftdi_serial, ftdi_location, ftdi_channel);
+ ftdi_serial, jtag_usb_get_location(), ftdi_channel);
free(ftdi_device_desc);
free(ftdi_serial);
free(ftdi_device_desc);
free(ftdi_serial);
-#ifdef HAVE_LIBUSB_GET_PORT_NUMBERS
-COMMAND_HANDLER(ftdi_handle_location_command)
-{
- if (CMD_ARGC == 1) {
- if (ftdi_location)
- free(ftdi_location);
- ftdi_location = strdup(CMD_ARGV[0]);
- } else {
- return ERROR_COMMAND_SYNTAX_ERROR;
- }
-
- return ERROR_OK;
-}
-#endif
-
COMMAND_HANDLER(ftdi_handle_channel_command)
{
if (CMD_ARGC == 1)
COMMAND_HANDLER(ftdi_handle_channel_command)
{
if (CMD_ARGC == 1)
.help = "set the serial number of the FTDI device",
.usage = "serial_string",
},
.help = "set the serial number of the FTDI device",
.usage = "serial_string",
},
-#ifdef HAVE_LIBUSB_GET_PORT_NUMBERS
- {
- .name = "ftdi_location",
- .handler = &ftdi_handle_location_command,
- .mode = COMMAND_CONFIG,
- .help = "set the USB bus location of the FTDI device",
- .usage = "<bus>:port[,port]...",
- },
-#endif
{
.name = "ftdi_channel",
.handler = &ftdi_handle_channel_command,
{
.name = "ftdi_channel",
.handler = &ftdi_handle_channel_command,
echo "DEPRECATED! use 'cortex_a' not 'cortex_a8'"
eval cortex_a $args
}
echo "DEPRECATED! use 'cortex_a' not 'cortex_a8'"
eval cortex_a $args
}
+
+# deprecated ftdi cmds
+proc ftdi_location args {
+ echo "DEPRECATED! use 'adapter usb location' not 'ftdi_location'"
+ eval adapter usb location $args
+}