version.h: Remove from platform.h files
- Consolidate ident string generation - Recompile only needed files
This commit is contained in:
parent
dd6aadc54d
commit
07c3699225
|
@ -1 +1 @@
|
|||
Subproject commit 89074d6a13ed7febba04d3c421ce7bf2b7972156
|
||||
Subproject commit 505ac65c05b776af031dac3c15b69573b5709850
|
|
@ -34,6 +34,7 @@
|
|||
#endif
|
||||
#include "usbuart.h"
|
||||
#include "serialno.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <libopencm3/cm3/nvic.h>
|
||||
#include <libopencm3/usb/usbd.h>
|
||||
|
@ -400,6 +401,9 @@ static char serial_no[13];
|
|||
static char serial_no[9];
|
||||
#endif
|
||||
|
||||
#define BOARD_IDENT "Black Magic Probe" PLATFORM_IDENT FIRMWARE_VERSION
|
||||
#define DFU_IDENT "Black Magic Firmware Upgrade" PLATFORM_IDENT FIRMWARE_VERSION
|
||||
|
||||
static const char *usb_strings[] = {
|
||||
"Black Sphere Technologies",
|
||||
BOARD_IDENT,
|
||||
|
|
|
@ -27,14 +27,11 @@
|
|||
#include "gpio.h"
|
||||
#include "timing.h"
|
||||
#include "timing_stm32.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#define PLATFORM_HAS_TRACESWO
|
||||
#define BOARD_IDENT "Black Magic Probe (F4Discovery), (Firmware " FIRMWARE_VERSION ")"
|
||||
#define BOARD_IDENT_DFU "Black Magic Firmware Upgrade (F4Discovery)"
|
||||
#define DFU_IDENT "Black Magic Firmware Upgrade (F4Discovery)"
|
||||
#define PLATFORM_IDENT "(F4Discovery) "
|
||||
|
||||
/* Important pin mappings for STM32 implementation:
|
||||
*
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
*/
|
||||
#include "general.h"
|
||||
#include "gdb_if.h"
|
||||
#include "version.h"
|
||||
#include "platform.h"
|
||||
#include "target.h"
|
||||
|
||||
|
|
|
@ -28,14 +28,11 @@
|
|||
#include "gpio.h"
|
||||
#include "timing.h"
|
||||
#include "timing_stm32.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#define PLATFORM_HAS_TRACESWO
|
||||
#define BOARD_IDENT "Black Magic Probe (HydraBus), (Firmware " FIRMWARE_VERSION ")"
|
||||
#define BOARD_IDENT_DFU "Black Magic (Upgrade) for HydraBus, (Firmware " FIRMWARE_VERSION ")"
|
||||
#define DFU_IDENT "Black Magic Firmware Upgrade (HydraBus)"
|
||||
#define PLATFORM_IDENT " (HydraBus))"
|
||||
|
||||
/* Important pin mappings for STM32 implementation:
|
||||
*
|
||||
|
|
|
@ -21,12 +21,8 @@
|
|||
#include <libopencm3/usb/usbd.h>
|
||||
|
||||
#include "timing.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BOARD_IDENT "Black Magic Probe (Launchpad ICDI), (Firmware " FIRMWARE_VERSION ")"
|
||||
#define BOARD_IDENT_DFU "Black Magic (Upgrade) for Launchpad, (Firmware " FIRMWARE_VERSION ")"
|
||||
#define DFU_IDENT "Black Magic Firmware Upgrade (Launchpad)"
|
||||
#define DFU_IFACE_STRING "lolwut"
|
||||
#define PLATFORM_IDENT "(Launchpad ICDI) "
|
||||
|
||||
extern uint8_t running_status;
|
||||
|
||||
|
|
|
@ -38,10 +38,7 @@ extern bool debug_bmp;
|
|||
int usbuart_debug_write(const char *buf, size_t len);
|
||||
#endif
|
||||
|
||||
#define BOARD_IDENT "Black Magic Probe"
|
||||
#define BOARD_IDENT_DFU "Black Magic Probe (Upgrade)"
|
||||
#define BOARD_IDENT_UPD "Black Magic Probe (DFU Upgrade)"
|
||||
#define DFU_IDENT "Black Magic Firmware Upgrade"
|
||||
#define PLATFORM_IDENT " "
|
||||
#define UPD_IFACE_STRING "@Internal Flash /0x08000000/8*001Kg"
|
||||
|
||||
/* Important pin mappings for STM32 implementation:
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "gpio.h"
|
||||
#include "timing.h"
|
||||
#include "timing_stm32.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <libopencm3/cm3/common.h>
|
||||
#include <libopencm3/stm32/f1/memorymap.h>
|
||||
|
@ -40,9 +39,7 @@ extern bool debug_bmp;
|
|||
int usbuart_debug_write(const char *buf, size_t len);
|
||||
#endif
|
||||
|
||||
#define BOARD_IDENT "Black Magic Probe (STLINK), (Firmware " FIRMWARE_VERSION ")"
|
||||
#define BOARD_IDENT_DFU "Black Magic (Upgrade) for STLink/Discovery, (Firmware " FIRMWARE_VERSION ")"
|
||||
#define DFU_IDENT "Black Magic Firmware Upgrade (STLINK)"
|
||||
#define PLATFORM_IDENT "(STLINK/V2) "
|
||||
|
||||
/* Hardware definitions... */
|
||||
#define TDI_PORT GPIOA
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
*/
|
||||
|
||||
#include "general.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <libopencm3/stm32/desig.h>
|
||||
|
||||
#include <string.h>
|
||||
|
@ -124,10 +126,11 @@ const struct usb_config_descriptor config = {
|
|||
|
||||
static char serial_no[9];
|
||||
static char if_string[] = DFU_IFACE_STRING;
|
||||
#define BOARD_IDENT_DFU(BOARD_TYPE) "Black Magic Probe DFU " PLATFORM_IDENT "" FIRMWARE_VERSION
|
||||
|
||||
static const char *usb_strings[] = {
|
||||
"Black Sphere Technologies",
|
||||
BOARD_IDENT_DFU,
|
||||
BOARD_IDENT_DFU(PLATFORM_IDENT),
|
||||
serial_no,
|
||||
/* This string is used by ST Microelectronics' DfuSe utility */
|
||||
if_string,
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "gpio.h"
|
||||
#include "timing.h"
|
||||
#include "timing_stm32.h"
|
||||
#include "version.h"
|
||||
|
||||
#ifdef ENABLE_DEBUG
|
||||
# define PLATFORM_HAS_DEBUG
|
||||
|
@ -37,9 +36,7 @@ extern bool debug_bmp;
|
|||
int usbuart_debug_write(const char *buf, size_t len);
|
||||
#endif
|
||||
|
||||
#define BOARD_IDENT "Black Magic Probe (SWLINK), (Firmware " FIRMWARE_VERSION ")"
|
||||
#define BOARD_IDENT_DFU "Black Magic (Upgrade), SWLINK, (Firmware " FIRMWARE_VERSION ")"
|
||||
#define DFU_IDENT "Black Magic Firmware Upgrade (SWLINK)"
|
||||
#define PLATFORM_IDENT "(SWLINK) "
|
||||
|
||||
/* Hardware definitions... */
|
||||
#define TMS_PORT GPIOA
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "swdptap.h"
|
||||
#include "jtagtap.h"
|
||||
#include "gdb_if.h"
|
||||
#include "platform.h"
|
||||
#include "version.h"
|
||||
#include "exception.h"
|
||||
#include <stdarg.h>
|
||||
|
@ -299,11 +300,11 @@ void remotePacketProcessGEN(uint8_t i, char *packet)
|
|||
#endif
|
||||
break;
|
||||
|
||||
#if !defined(BOARD_IDENT) && defined(PLATFORM_IDENT)
|
||||
# define BOARD_IDENT() PLATFORM_IDENT
|
||||
#if !defined(BOARD_IDENT) && defined(BOARD_IDENT)
|
||||
# define PLATFORM_IDENT() BOARD_IDENT
|
||||
#endif
|
||||
case REMOTE_START:
|
||||
_respondS(REMOTE_RESP_OK, BOARD_IDENT " " FIRMWARE_VERSION);
|
||||
_respondS(REMOTE_RESP_OK, PLATFORM_IDENT "" FIRMWARE_VERSION);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue