Skip to content

Commit 1ab143a

Browse files
Variant Compile Cleanup
1 parent 482440e commit 1ab143a

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

cores/stm32l4/Arduino.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ void loop( void ) ;
7979
#include "HardwareSerial.h"
8080
#include "STM32.h"
8181
#endif
82-
#ifdef __cplusplus
83-
#if defined(STM32L4_CONFIG_USBD_CDC)
84-
#include "CDC.h"
85-
#endif /* STM32L4_CONFIG_USBD_CDC */
86-
#include "Uart.h"
87-
#endif
8882

8983
// Include board variant
9084
#include "variant.h"

cores/stm32l4/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ LD = $(TOOLS)/bin/arm-none-eabi-ld
88
CFLAGS = -mcpu=cortex-m4 -mthumb -c -g3 -Os $(WARNINGS) -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD $(EXTRAS) $(DEFINES) $(INCLUDES)
99
CXXFLAGS = -mcpu=cortex-m4 -mthumb -c -g3 -Os $(WARNINGS) -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD $(EXTRAS) $(DEFINES) $(INCLUDES)
1010
ASFLAGS = -c -g -x assembler-with-cpp $(EXTRAS) $(DEFINES) $(INCLUDES)
11-
LDFLAGS = -L../../variants/dragonfly -Os -Wl,--gc-sections -save-temps $(EXTRAS) -T../../variants/dragonfly/linker_scripts/flash.ld --specs=nano.specs -mcpu=cortex-m4 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
11+
LDFLAGS = -L../../system/libstm32l4 -Os -Wl,--gc-sections -save-temps $(EXTRAS) -T../../variants/dragonfly/linker_scripts/flash.ld --specs=nano.specs -mcpu=cortex-m4 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
1212
WARNINGS = -Wall -Wextra -Wno-unused-parameter
1313
EXTRAS = -DSTM32L476xx -D__FPU_PRESENT=1 -march=armv7e-m -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mabi=aapcs -mslow-flash-data
14-
DEFINES = -D_SYSTEM_CORE_CLOCK_=80000000L -DARDUINO=10606 -D_ARDUINO_STM32L4_DRAGONFLY -DARDUINO_ARCH_STM32L4
15-
INCLUDES = -I../../system/libstm32l4_dragonfly/CMSIS/Include -I../../system/libstm32l4_dragonfly/CMSIS/Device/ST/STM32L4xx/Include -I../../system/libstm32l4_dragonfly/USB/HAL/Inc -I../../system/libstm32l4_dragonfly/USB/Core/Inc -I../../system/libstm32l4_dragonfly/USB/Class/CDC/Inc -I../../system/libstm32l4_dragonfly/USB/Class/MSC/Inc -I../../system/libstm32l4_dragonfly/USB -I../../system/libstm32l4_dragonfly/ -I../../variants/dragonfly -I../../libraries/SPI/ -I../../libraries/Wire/ -I../../libraries/Servo/src/ -I.
14+
DEFINES = -D_SYSTEM_CORE_CLOCK_=80000000L -DARDUINO=10606 -D_ARDUINO_STM32L4 -DARDUINO_ARCH_STM32L4
15+
INCLUDES = -I../../system/libstm32l4/CMSIS/Include -I../../system/libstm32l4/CMSIS/Device/ST/STM32L4xx/Include -I../../system/libstm32l4/USB/HAL/Inc -I../../system/libstm32l4/USB/Core/Inc -I../../system/libstm32l4/USB/Class/CDC/Inc -I../../system/libstm32l4/USB/Class/MSC/Inc -I../../system/libstm32l4/USB -I../../system/libstm32l4/ -I../../variants/dragonfly -I../../libraries/SPI/ -I../../libraries/Wire/ -I../../libraries/Servo/src/ -I.
1616

1717
SRCS = \
1818
../../libraries/Servo/src/Servo.cpp \
@@ -90,7 +90,7 @@ all:: flash.bin
9090
$(CC) $(ASFLAGS) -c $< -o $@
9191

9292
flash.elf:: $(OBJS)
93-
$(CC) $(LDFLAGS) -Wl,-Map,flash.map -Wl,--start-group $(OBJS) -Wl,--end-group -lstm32l4_dragonfly -lc -lm -lstm32l4_dragonfly -o flash.elf
93+
$(CC) $(LDFLAGS) -Wl,-Map,flash.map -Wl,--start-group $(OBJS) -Wl,--end-group -lstm32l4 -lc -lm -lstm32l4 -o flash.elf
9494

9595
flash.bin:: flash.elf
9696
arm-none-eabi-objcopy -O binary flash.elf flash.bin

variants/dragonfly/variant.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "WVariant.h"
5151

5252
#ifdef __cplusplus
53+
#include "CDC.h"
5354
#include "Uart.h"
5455
#endif // __cplusplus
5556

0 commit comments

Comments
 (0)