diff --git a/src/platforms/96b_carbon/Makefile.inc b/src/platforms/96b_carbon/Makefile.inc index 2107c4f..cdc5119 100644 --- a/src/platforms/96b_carbon/Makefile.inc +++ b/src/platforms/96b_carbon/Makefile.inc @@ -15,8 +15,8 @@ LDFLAGS = -lopencm3_stm32f4 -Wl,--defsym,_stack=0x20006000 \ VPATH += platforms/stm32 -SRC += cdcacm.c \ - traceswodecode.c \ +SRC += \ + traceswodecode.c \ traceswo.c \ usbuart.c \ serialno.c \ diff --git a/src/platforms/96b_carbon/platform.c b/src/platforms/96b_carbon/platform.c index 5884163..d82cf5f 100644 --- a/src/platforms/96b_carbon/platform.c +++ b/src/platforms/96b_carbon/platform.c @@ -23,7 +23,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include "morse.h" diff --git a/src/platforms/blackpillv2/Makefile.inc b/src/platforms/blackpillv2/Makefile.inc index f0d2b8e..1008c6f 100644 --- a/src/platforms/blackpillv2/Makefile.inc +++ b/src/platforms/blackpillv2/Makefile.inc @@ -27,8 +27,8 @@ endif VPATH += platforms/stm32 -SRC += cdcacm.c \ - traceswodecode.c \ +SRC += \ + traceswodecode.c \ traceswo.c \ usbuart.c \ serialno.c \ diff --git a/src/platforms/blackpillv2/platform.c b/src/platforms/blackpillv2/platform.c index a1e13de..3099eab 100644 --- a/src/platforms/blackpillv2/platform.c +++ b/src/platforms/blackpillv2/platform.c @@ -23,7 +23,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include "morse.h" diff --git a/src/platforms/common/Makefile.inc b/src/platforms/common/Makefile.inc index accebf0..ee6a5bc 100644 --- a/src/platforms/common/Makefile.inc +++ b/src/platforms/common/Makefile.inc @@ -25,4 +25,5 @@ SRC += \ jtagtap.c \ swdptap.c \ usb.c \ + usb_serial.c \ usb_dfu_stub.c \ diff --git a/src/platforms/common/usb.c b/src/platforms/common/usb.c index 1d0ef2d..e6dec73 100644 --- a/src/platforms/common/usb.c +++ b/src/platforms/common/usb.c @@ -23,8 +23,8 @@ #include "general.h" #include "usb.h" #include "usb_descriptors.h" +#include "usb_serial.h" #include "usb_dfu_stub.h" -#include "cdcacm.h" #include "serialno.h" usbd_device *usbdev = NULL; diff --git a/src/platforms/common/cdcacm.c b/src/platforms/common/usb_serial.c similarity index 99% rename from src/platforms/common/cdcacm.c rename to src/platforms/common/usb_serial.c index a6bb4f5..38cd8e0 100644 --- a/src/platforms/common/cdcacm.c +++ b/src/platforms/common/usb_serial.c @@ -40,7 +40,7 @@ #include "general.h" #include "gdb_if.h" -#include "cdcacm.h" +#include "usb_serial.h" #if defined(PLATFORM_HAS_TRACESWO) # include "traceswo.h" #endif diff --git a/src/platforms/common/cdcacm.h b/src/platforms/common/usb_serial.h similarity index 95% rename from src/platforms/common/cdcacm.h rename to src/platforms/common/usb_serial.h index 1a73655..8cc11e5 100644 --- a/src/platforms/common/cdcacm.h +++ b/src/platforms/common/usb_serial.h @@ -25,8 +25,8 @@ * * The device's unique id is used as the USB serial number string. */ -#ifndef __CDCACM_H -#define __CDCACM_H +#ifndef USB_SERIAL_H +#define USB_SERIAL_H #include #include @@ -36,4 +36,4 @@ void usb_serial_set_config(usbd_device *dev, uint16_t wValue); bool gdb_uart_get_dtr(void); -#endif +#endif /*USB_SERIAL_H*/ diff --git a/src/platforms/f072/Makefile.inc b/src/platforms/f072/Makefile.inc index 693deb4..045c44b 100644 --- a/src/platforms/f072/Makefile.inc +++ b/src/platforms/f072/Makefile.inc @@ -13,8 +13,8 @@ LDFLAGS = --specs=nano.specs -lopencm3_stm32f0 \ VPATH += platforms/stm32 -SRC += cdcacm.c \ - traceswodecode.c\ +SRC += \ + traceswodecode.c \ traceswo.c \ usbuart.c \ serialno.c \ diff --git a/src/platforms/f072/platform.c b/src/platforms/f072/platform.c index 477d6a1..f61fed5 100644 --- a/src/platforms/f072/platform.c +++ b/src/platforms/f072/platform.c @@ -22,7 +22,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include "morse.h" diff --git a/src/platforms/f3/Makefile.inc b/src/platforms/f3/Makefile.inc index c7dc25a..f05e3a1 100644 --- a/src/platforms/f3/Makefile.inc +++ b/src/platforms/f3/Makefile.inc @@ -15,8 +15,8 @@ LDFLAGS = --specs=nano.specs -lopencm3_stm32f3 \ VPATH += platforms/stm32 -SRC += cdcacm.c \ - traceswodecode.c\ +SRC += \ + traceswodecode.c \ traceswo.c \ usbuart.c \ serialno.c \ diff --git a/src/platforms/f3/platform.c b/src/platforms/f3/platform.c index 3c5dcd4..8646f4c 100644 --- a/src/platforms/f3/platform.c +++ b/src/platforms/f3/platform.c @@ -22,7 +22,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include "morse.h" diff --git a/src/platforms/f4discovery/Makefile.inc b/src/platforms/f4discovery/Makefile.inc index cdcddac..8c84ad1 100644 --- a/src/platforms/f4discovery/Makefile.inc +++ b/src/platforms/f4discovery/Makefile.inc @@ -27,8 +27,8 @@ endif VPATH += platforms/stm32 -SRC += cdcacm.c \ - traceswodecode.c \ +SRC += \ + traceswodecode.c \ traceswo.c \ usbuart.c \ serialno.c \ diff --git a/src/platforms/f4discovery/platform.c b/src/platforms/f4discovery/platform.c index b5d88bf..b8ab579 100644 --- a/src/platforms/f4discovery/platform.c +++ b/src/platforms/f4discovery/platform.c @@ -23,7 +23,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include "morse.h" diff --git a/src/platforms/hydrabus/Makefile.inc b/src/platforms/hydrabus/Makefile.inc index 9d62f2d..0e87941 100644 --- a/src/platforms/hydrabus/Makefile.inc +++ b/src/platforms/hydrabus/Makefile.inc @@ -15,8 +15,8 @@ LDFLAGS = -lopencm3_stm32f4 \ VPATH += platforms/stm32 -SRC += cdcacm.c \ - traceswodecode.c \ +SRC += \ + traceswodecode.c \ traceswo.c \ usbuart.c \ serialno.c \ diff --git a/src/platforms/hydrabus/platform.c b/src/platforms/hydrabus/platform.c index c4413f5..28d461d 100644 --- a/src/platforms/hydrabus/platform.c +++ b/src/platforms/hydrabus/platform.c @@ -23,7 +23,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include "morse.h" diff --git a/src/platforms/launchpad-icdi/Makefile.inc b/src/platforms/launchpad-icdi/Makefile.inc index 32c830a..1cee80d 100644 --- a/src/platforms/launchpad-icdi/Makefile.inc +++ b/src/platforms/launchpad-icdi/Makefile.inc @@ -12,13 +12,12 @@ CFLAGS += -DDFU_SERIAL_LENGTH=9 LINKER_SCRIPT="platforms/tm4c/tm4c.ld" LDFLAGS = -nostartfiles -lc $(CPU_FLAGS) -nodefaultlibs -T$(LINKER_SCRIPT) -Wl,--gc-sections \ -L../libopencm3/lib -lopencm3_lm4f -lnosys -lm -lgcc - + VPATH += platforms/tm4c -SRC += cdcacm.c \ +SRC += \ usbuart.c \ timing.c \ traceswo.o all: blackmagic.bin - diff --git a/src/platforms/launchpad-icdi/platform.c b/src/platforms/launchpad-icdi/platform.c index 29bb6be..aef8221 100644 --- a/src/platforms/launchpad-icdi/platform.c +++ b/src/platforms/launchpad-icdi/platform.c @@ -16,7 +16,7 @@ */ #include "general.h" #include "gdb_if.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include diff --git a/src/platforms/native/Makefile.inc b/src/platforms/native/Makefile.inc index 7eff46e..dc9c297 100644 --- a/src/platforms/native/Makefile.inc +++ b/src/platforms/native/Makefile.inc @@ -20,8 +20,8 @@ endif VPATH += platforms/stm32 -SRC += cdcacm.c \ - traceswodecode.c \ +SRC += \ + traceswodecode.c \ traceswo.c \ usbuart.c \ serialno.c \ diff --git a/src/platforms/native/platform.c b/src/platforms/native/platform.c index 3e961b4..c15f821 100644 --- a/src/platforms/native/platform.c +++ b/src/platforms/native/platform.c @@ -23,7 +23,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include "morse.h" diff --git a/src/platforms/stlink/Makefile.inc b/src/platforms/stlink/Makefile.inc index b79b874..6a15e6c 100644 --- a/src/platforms/stlink/Makefile.inc +++ b/src/platforms/stlink/Makefile.inc @@ -31,7 +31,7 @@ endif VPATH += platforms/stm32 -SRC += cdcacm.c \ +SRC += \ usbuart.c \ serialno.c \ timing.c \ diff --git a/src/platforms/stlink/platform.c b/src/platforms/stlink/platform.c index 64de0e0..5e68e5a 100644 --- a/src/platforms/stlink/platform.c +++ b/src/platforms/stlink/platform.c @@ -23,7 +23,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include diff --git a/src/platforms/stm32/gdb_if.c b/src/platforms/stm32/gdb_if.c index 1c6d417..1224111 100644 --- a/src/platforms/stm32/gdb_if.c +++ b/src/platforms/stm32/gdb_if.c @@ -26,7 +26,7 @@ #include #include "general.h" -#include "cdcacm.h" +#include "usb_serial.h" #include "gdb_if.h" static uint32_t count_out; diff --git a/src/platforms/stm32/rtt_if.c b/src/platforms/stm32/rtt_if.c index 3f3be5e..c3a2f28 100644 --- a/src/platforms/stm32/rtt_if.c +++ b/src/platforms/stm32/rtt_if.c @@ -27,7 +27,7 @@ #include "general.h" #include "platform.h" #include -#include "cdcacm.h" +#include "usb_serial.h" #include "rtt.h" #include "rtt_if.h" diff --git a/src/platforms/stm32/traceswo.c b/src/platforms/stm32/traceswo.c index 1012694..95f7463 100644 --- a/src/platforms/stm32/traceswo.c +++ b/src/platforms/stm32/traceswo.c @@ -32,7 +32,7 @@ * The core can then process the buffer to extract the frame. */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "traceswo.h" #include diff --git a/src/platforms/stm32/traceswoasync.c b/src/platforms/stm32/traceswoasync.c index 83362cd..9e427ba 100644 --- a/src/platforms/stm32/traceswoasync.c +++ b/src/platforms/stm32/traceswoasync.c @@ -29,7 +29,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "traceswo.h" #include diff --git a/src/platforms/stm32/traceswodecode.c b/src/platforms/stm32/traceswodecode.c index 3086e2d..9224bf4 100644 --- a/src/platforms/stm32/traceswodecode.c +++ b/src/platforms/stm32/traceswodecode.c @@ -19,7 +19,7 @@ /* Print decoded swo stream on the usb serial */ #include "general.h" -#include "cdcacm.h" +#include "usb_serial.h" #include "traceswo.h" /* SWO decoding */ diff --git a/src/platforms/swlink/Makefile.inc b/src/platforms/swlink/Makefile.inc index 4f9fa19..e76720b 100644 --- a/src/platforms/swlink/Makefile.inc +++ b/src/platforms/swlink/Makefile.inc @@ -19,7 +19,7 @@ endif VPATH += platforms/stm32 -SRC += cdcacm.c \ +SRC += \ usbuart.c \ serialno.c \ timing.c \ @@ -36,4 +36,3 @@ blackmagic_dfu.elf: usbdfu.o dfucore.o dfu_f1.o platform_common.o serialno.o host_clean: -$(Q)$(RM) blackmagic.bin blackmagic_dfu blackmagic_dfu.bin blackmagic_dfu.hex - diff --git a/src/platforms/swlink/platform.c b/src/platforms/swlink/platform.c index 598e14c..3374e11 100644 --- a/src/platforms/swlink/platform.c +++ b/src/platforms/swlink/platform.c @@ -24,7 +24,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include "usbuart.h" #include diff --git a/src/platforms/tm4c/gdb_if.c b/src/platforms/tm4c/gdb_if.c index 8259f2d..66ed595 100644 --- a/src/platforms/tm4c/gdb_if.c +++ b/src/platforms/tm4c/gdb_if.c @@ -25,7 +25,7 @@ #include "general.h" #include "gdb_if.h" -#include "cdcacm.h" +#include "usb_serial.h" #include diff --git a/src/platforms/tm4c/traceswo.c b/src/platforms/tm4c/traceswo.c index 3e43a3b..b266a61 100644 --- a/src/platforms/tm4c/traceswo.c +++ b/src/platforms/tm4c/traceswo.c @@ -28,7 +28,7 @@ */ #include "general.h" -#include "cdcacm.h" +#include "usb.h" #include #include @@ -158,4 +158,3 @@ void TRACEUART_ISR(void) trace_buf_push(); } } -