diff --git a/src/platforms/hosted/platform.c b/src/platforms/hosted/platform.c index 2b08aed..39567b4 100644 --- a/src/platforms/hosted/platform.c +++ b/src/platforms/hosted/platform.c @@ -280,6 +280,15 @@ void platform_init(int argc, char **argv) if (cl_opts.opt_device) { info.bmp_type = BMP_TYPE_BMP; } else if (cl_opts.opt_cable) { + if ((!strcmp(cl_opts.opt_cable, "list")) || + (!strcmp(cl_opts.opt_cable, "l"))) { + cable_desc_t *cable = &cable_desc[0]; + DEBUG_WARN("Available cables:\n"); + for (; cable->name; cable++) { + DEBUG_WARN("\t%s\n", cable->name); + } + exit(0); + } /* check for libftdi devices*/ res = ftdi_bmp_init(&cl_opts, &info); if (res) diff --git a/src/platforms/pc/cl_utils.c b/src/platforms/pc/cl_utils.c index 146510a..1ff350e 100644 --- a/src/platforms/pc/cl_utils.c +++ b/src/platforms/pc/cl_utils.c @@ -129,6 +129,7 @@ static void cl_help(char **argv, BMP_CL_OPTIONS_t *opt) DEBUG_WARN("\t-s \"serial\"\t: Use dongle with (partial) " "serial number \"serial\"\n"); DEBUG_WARN("\t-c \"string\"\t: Use ftdi dongle with type \"string\"\n"); + DEBUG_WARN("\t\t Use \"list\" to list available cables\n"); DEBUG_WARN("Run mode related options:\n"); DEBUG_WARN("\tDefault mode is to start the debug server at :2000\n"); DEBUG_WARN("\t-j\t\t: Use JTAG. SWD is default.\n");