Skip to content

Commit

Permalink
Variant Compile Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
GrumpyOldPizza committed Oct 17, 2016
1 parent 482440e commit 1ab143a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 0 additions & 6 deletions cores/stm32l4/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ void loop( void ) ;
#include "HardwareSerial.h"
#include "STM32.h"
#endif
#ifdef __cplusplus
#if defined(STM32L4_CONFIG_USBD_CDC)
#include "CDC.h"
#endif /* STM32L4_CONFIG_USBD_CDC */
#include "Uart.h"
#endif

// Include board variant
#include "variant.h"
Expand Down
8 changes: 4 additions & 4 deletions cores/stm32l4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ LD = $(TOOLS)/bin/arm-none-eabi-ld
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)
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)
ASFLAGS = -c -g -x assembler-with-cpp $(EXTRAS) $(DEFINES) $(INCLUDES)
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
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
WARNINGS = -Wall -Wextra -Wno-unused-parameter
EXTRAS = -DSTM32L476xx -D__FPU_PRESENT=1 -march=armv7e-m -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mabi=aapcs -mslow-flash-data
DEFINES = -D_SYSTEM_CORE_CLOCK_=80000000L -DARDUINO=10606 -D_ARDUINO_STM32L4_DRAGONFLY -DARDUINO_ARCH_STM32L4
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.
DEFINES = -D_SYSTEM_CORE_CLOCK_=80000000L -DARDUINO=10606 -D_ARDUINO_STM32L4 -DARDUINO_ARCH_STM32L4
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.

SRCS = \
../../libraries/Servo/src/Servo.cpp \
Expand Down Expand Up @@ -90,7 +90,7 @@ all:: flash.bin
$(CC) $(ASFLAGS) -c $< -o $@

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

flash.bin:: flash.elf
arm-none-eabi-objcopy -O binary flash.elf flash.bin
Expand Down
1 change: 1 addition & 0 deletions variants/dragonfly/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "WVariant.h"

#ifdef __cplusplus
#include "CDC.h"
#include "Uart.h"
#endif // __cplusplus

Expand Down

0 comments on commit 1ab143a

Please sign in to comment.