From 5fbb3a44fdabd626bf8b371ec43aa18cf944f2e1 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Tue, 20 Aug 2019 17:56:25 +0200 Subject: [PATCH] PC-STLINKV2/Libftdi: Better version string. --- src/command.c | 5 +++++ src/platforms/libftdi/platform.h | 1 + src/platforms/pc-stlinkv2/platform.h | 1 + 3 files changed, 7 insertions(+) diff --git a/src/command.c b/src/command.c index f5d385cc..c0c4e037 100644 --- a/src/command.c +++ b/src/command.c @@ -124,7 +124,12 @@ int command_process(target *t, char *cmd) bool cmd_version(void) { +#if defined PC_HOSTED + gdb_outf("Black Magic Probe, PC-Hosted for " PLATFORM_IDENT + ", Version " FIRMWARE_VERSION "\n"); +#else gdb_outf("Black Magic Probe (Firmware " FIRMWARE_VERSION ") (Hardware Version %d)\n", platform_hwversion()); +#endif gdb_out("Copyright (C) 2015 Black Sphere Technologies Ltd.\n"); gdb_out("License GPLv3+: GNU GPL version 3 or later " "\n\n"); diff --git a/src/platforms/libftdi/platform.h b/src/platforms/libftdi/platform.h index 5452c513..122cdced 100644 --- a/src/platforms/libftdi/platform.h +++ b/src/platforms/libftdi/platform.h @@ -38,6 +38,7 @@ #define PLATFORM_HAS_DEBUG +#define PLATFORM_IDENT "FTDI/MPSSE" #define SET_RUN_STATE(state) #define SET_IDLE_STATE(state) #define SET_ERROR_STATE(state) diff --git a/src/platforms/pc-stlinkv2/platform.h b/src/platforms/pc-stlinkv2/platform.h index 5ecba6ba..a100a063 100644 --- a/src/platforms/pc-stlinkv2/platform.h +++ b/src/platforms/pc-stlinkv2/platform.h @@ -35,6 +35,7 @@ #define PLATFORM_HAS_DEBUG +#define PLATFORM_IDENT "StlinkV2/3" #define SET_RUN_STATE(state) #define SET_IDLE_STATE(state) //#define SET_ERROR_STATE(state)