dfu/cdcacm: Consolidate usage of ST vs BMP serial number.

This commit is contained in:
Uwe Bonnes 2020-12-01 11:20:01 +01:00 committed by UweBonnes
parent 5c7e0eedb0
commit 17dfec3572
3 changed files with 5 additions and 5 deletions

View File

@ -395,8 +395,8 @@ static const struct usb_config_descriptor config = {
.interface = ifaces,
};
#if defined(STM32L0) || defined(STM32F3) || defined(STM32F4)
static char serial_no[13];
#if defined(DUSE_ST_SERIAL)
char serial_no[13];
#else
static char serial_no[9];
#endif

View File

@ -17,9 +17,9 @@ LDFLAGS_BOOT = -lopencm3_stm32f4 \
ifeq ($(BMP_BOOTLOADER), 1)
$(info Load address 0x08004000 for BMPBootloader)
LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8004000
CFLAGS += -DUSE_BMP_SERIAL
else
LDFLAGS = $(LDFLAGS_BOOT)
LDFLAGS += $(LDFLAGS_BOOT)
CFLAGS += -DUSE_ST_SERIAL
endif
VPATH += platforms/stm32

View File

@ -5,7 +5,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
CFLAGS += -Istm32/include -mcpu=cortex-m4 -mthumb \
-mfloat-abi=hard -mfpu=fpv4-sp-d16 \
-DSTM32F4 -DHYDRABUS -I../libopencm3/include \
-Iplatforms/stm32
-Iplatforms/stm32 -DUSE_ST_BOOTLOADER
LDFLAGS = -lopencm3_stm32f4 \
-Wl,-T,platforms/stm32/f4discovery.ld -nostartfiles -lc -lnosys \