Makefile.stm32f3 1.0 KB

123456789101112131415161718192021222324252627282930
  1. VPATH += :$(HALPATH)/stm32f3
  2. SRC += stm32f3_hal.c stm32f3_hal_lowlevel.c stm32f3_sysmem.c
  3. EXTRAINCDIRS += $(HALPATH)/stm32f3 $(HALPATH)/stm32f3/CMSIS $(HALPATH)/stm32f3/CMSIS/core $(HALPATH)/stm32f3/CMSIS/device $(HALPATH)/stm32f4/Legacy
  4. ifeq ($(DEMO),SECCAN)
  5. SRC += stm32f3_hal_seccan.c stm32f3xx_hal_adc_ex.c stm32f3xx_hal_tim.c stm32f3xx_hal_can.c
  6. endif
  7. ASRC += stm32f3_startup.S
  8. MCU_FLAGS = -mcpu=cortex-m4
  9. CC = arm-none-eabi-gcc
  10. OBJCOPY = arm-none-eabi-objcopy
  11. OBJDUMP = arm-none-eabi-objdump
  12. SIZE = arm-none-eabi-size
  13. AR = arm-none-eabi-ar rcs
  14. NM = arm-none-eabi-nm
  15. #Output Format = Binary for this target
  16. FORMAT = binary
  17. CFLAGS += -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections
  18. CPPFLAGS += -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections
  19. ASFLAGS += -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections
  20. CDEFS += -DSTM32F303xC -DSTM32F3 -DSTM32 -DDEBUG
  21. CPPDEFS += -DSTM32F303xC -DSTM32F3 -DSTM32 -DDEBUG
  22. LDFLAGS += --specs=nano.specs --specs=nosys.specs -T $(HALPATH)/stm32f3/LinkerScript.ld -Wl,--gc-sections -lm