Specifies the @var{serial_string} of the adapter to use.
If this command is not specified, serial strings are not checked.
Only the following adapter drivers use the serial string from this command:
-cmsis_dap, ft232r.
+cmsis_dap, ft232r, ftdi.
The following adapters have their own command to specify the serial string:
-ftdi, hla, jlink, kitprog, presto, st-link, vsllink, xds110.
+hla, jlink, kitprog, presto, st-link, vsllink, xds110.
@end deffn
@section Interface Drivers
during device selection.
@end deffn
-@deffn {Config Command} {ftdi serial} serial-number
-Specifies the @var{serial-number} of the adapter to use,
-in case the vendor provides unique IDs and more than one adapter
-is connected to the host.
-If not specified, serial numbers are not considered.
-(Note that USB serial numbers can be arbitrary Unicode strings,
-and are not restricted to containing only decimal digits.)
-@end deffn
-
@deffn {Config Command} {ftdi channel} channel
Selects the channel of the FTDI device to use for MPSSE operations. Most
adapters use the default, channel 0, but there are exceptions.
#define SWD_MODE (LSB_FIRST | POS_EDGE_IN | NEG_EDGE_OUT)
static char *ftdi_device_desc;
-static char *ftdi_serial;
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,
- ftdi_serial, adapter_usb_get_location(), ftdi_channel);
+ adapter_get_required_serial(), adapter_usb_get_location(), ftdi_channel);
if (mpsse_ctx)
break;
}
}
free(ftdi_device_desc);
- free(ftdi_serial);
free(swd_cmd_queue);
return ERROR_OK;
}
-COMMAND_HANDLER(ftdi_handle_serial_command)
-{
- if (CMD_ARGC == 1) {
- free(ftdi_serial);
- ftdi_serial = strdup(CMD_ARGV[0]);
- } else {
- return ERROR_COMMAND_SYNTAX_ERROR;
- }
-
- return ERROR_OK;
-}
-
COMMAND_HANDLER(ftdi_handle_channel_command)
{
if (CMD_ARGC == 1)
.help = "set the USB device description of the FTDI device",
.usage = "description_string",
},
- {
- .name = "serial",
- .handler = &ftdi_handle_serial_command,
- .mode = COMMAND_CONFIG,
- .help = "set the serial number of the FTDI device",
- .usage = "serial_string",
- },
{
.name = "channel",
.handler = &ftdi_handle_channel_command,
lappend _telnet_autocomplete_skip ftdi_serial
proc ftdi_serial args {
- echo "DEPRECATED! use 'ftdi serial' not 'ftdi_serial'"
- eval ftdi serial $args
+ echo "DEPRECATED! use 'adapter serial' not 'ftdi_serial'"
+ eval adapter serial $args
}
lappend _telnet_autocomplete_skip ftdi_channel
eval adapter serial $args
}
+lappend _telnet_autocomplete_skip "ftdi serial"
+proc "ftdi serial" {args} {
+ echo "DEPRECATED! use 'adapter serial' not 'ftdi serial'"
+ eval adapter serial $args
+}
+
# END MIGRATION AIDS
adapter driver ftdi
ftdi vid_pid 0x0403 0x6010
ftdi device_desc "FLOSS-JTAG"
-#ftdi serial "FJ000001"
+# adapter serial "FJ000001"
ftdi layout_init 0x0008 0x180b
ftdi layout_signal nTRST -data 0x0010 -oe 0x0010