diff --git a/src/platforms/hosted/platform.c b/src/platforms/hosted/platform.c index 09f883e3..42857b92 100644 --- a/src/platforms/hosted/platform.c +++ b/src/platforms/hosted/platform.c @@ -37,7 +37,6 @@ #include "ftdi_bmp.h" #include "jlink.h" #include "cmsis_dap.h" -#include "version.h" #include "cl_utils.h" bmp_info_t info; @@ -75,7 +74,6 @@ static BMP_CL_OPTIONS_t cl_opts; void platform_init(int argc, char **argv) { - cl_opts.opt_idstring = "Blackmagic PC-Hosted"; cl_init(&cl_opts, argc, argv); atexit(exit_function); signal(SIGTERM, sigterm_handler); diff --git a/src/platforms/pc/cl_utils.c b/src/platforms/pc/cl_utils.c index a17154f2..d19b9214 100644 --- a/src/platforms/pc/cl_utils.c +++ b/src/platforms/pc/cl_utils.c @@ -33,6 +33,7 @@ #include "target_internal.h" #include "cl_utils.h" +#include "bmp_hosted.h" #ifndef O_BINARY #define O_BINARY 0 @@ -113,17 +114,20 @@ static void bmp_munmap(struct mmap_data *map) #endif } -static void cl_help(char **argv, BMP_CL_OPTIONS_t *opt) +static void cl_help(char **argv) { - DEBUG_WARN("%s for: \n", opt->opt_idstring); - DEBUG_WARN("\tBMP hosted %s\n\t\tfor ST-Link V2/3, CMSIS_DAP, JLINK and " - "LIBFTDI/MPSSE\n\n", FIRMWARE_VERSION); + bmp_ident(NULL); DEBUG_WARN("Usage: %s [options]\n", argv[0]); DEBUG_WARN("\t-h\t\t: This help.\n"); DEBUG_WARN("\t-v[bitmask]\t: Increasing verbosity. Bitmask:\n"); DEBUG_WARN("\t\t\t 1 = INFO, 2 = GDB, 4 = TARGET, 8 = PROBE, 16 = WIRE\n"); DEBUG_WARN("Probe selection arguments:\n"); - DEBUG_WARN("\t-d \"path\"\t: Use serial BMP device at \"path\"(Deprecated)\n"); + DEBUG_WARN("\t-d \"path\"\t: Use serial BMP device at "); +#if HOSTED_BMP_ONLY == 1 + DEBUG_WARN("\n"); +#else + DEBUG_WARN(" Deprecated!\n"); +#endif DEBUG_WARN("\t-P \t: Use debugger found at position \n"); DEBUG_WARN("\t-n \t: Use target device found at position \n"); DEBUG_WARN("\t-s \"serial\"\t: Use dongle with (partial) " @@ -166,7 +170,8 @@ void cl_init(BMP_CL_OPTIONS_t *opt, int argc, char **argv) opt->opt_cable = optarg; break; case 'h': - cl_help(argv, opt); + cl_debuglevel = 3; + cl_help(argv); break; case 'H': opt->opt_no_hl = true; @@ -189,7 +194,6 @@ void cl_init(BMP_CL_OPTIONS_t *opt, int argc, char **argv) opt->external_resistor_swd = true; break; case 'd': - DEBUG_WARN("Deprecated!\n"); if (optarg) opt->opt_device = optarg; break; diff --git a/src/platforms/pc/cl_utils.h b/src/platforms/pc/cl_utils.h index 15606725..e7349c71 100644 --- a/src/platforms/pc/cl_utils.h +++ b/src/platforms/pc/cl_utils.h @@ -54,7 +54,6 @@ typedef struct BMP_CL_OPTIONS_s { int opt_target_dev; uint32_t opt_flash_start; size_t opt_flash_size; - char *opt_idstring; }BMP_CL_OPTIONS_t; void cl_init(BMP_CL_OPTIONS_t *opt, int argc, char **argv);