Makefile.stm32f4 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. VPATH += :$(HALPATH)/stm32f4
  2. SRC += stm32f4_hal.c stm32f4_hal_lowlevel.c stm32f4_sysmem.c stm32f4xx_hal_rng.c
  3. EXTRAINCDIRS += $(HALPATH)/stm32f4 $(HALPATH)/stm32f4/CMSIS $(HALPATH)/stm32f4/CMSIS/core $(HALPATH)/stm32f4/CMSIS/device $(HALPATH)/stm32f4/Legacy
  4. ASRC += stm32f4_startup.S
  5. MCU_FLAGS = -mcpu=cortex-m4
  6. CC = arm-none-eabi-gcc
  7. OBJCOPY = arm-none-eabi-objcopy
  8. OBJDUMP = arm-none-eabi-objdump
  9. SIZE = arm-none-eabi-size
  10. AR = arm-none-eabi-ar rcs
  11. NM = arm-none-eabi-nm
  12. #Output Format = Binary for this target
  13. FORMAT = binary
  14. #FPUUSE=AAAAA
  15. ifeq ($(FPUUSE),)
  16. CFLAGS += -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections
  17. CPPFLAGS += -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections
  18. ASFLAGS += -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections
  19. else
  20. CDEFS += -DSTM32F4FPU
  21. CFLAGS += -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fmessage-length=0 -ffunction-sections
  22. CPPFLAGS += -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fmessage-length=0 -ffunction-sections
  23. ASFLAGS += -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fmessage-length=0 -ffunction-sections
  24. endif
  25. CDEFS += -DSTM32F415RGTx -DSTM32F4 -DSTM32 -DDEBUG -DSTM32F415xx
  26. CPPDEFS += -DSTM32F415RGTx -DSTM32F4 -DSTM32 -DDEBUG
  27. ifeq ($(MCU_CLK), INT)
  28. CFLAGS += -DUSE_INTERNAL_CLK
  29. endif
  30. ifeq ($(STM32F4_WLCSP), 1)
  31. CFLAGS += -DSTM32F4_WLCSP
  32. endif
  33. LDFLAGS += --specs=nosys.specs -T $(HALPATH)/stm32f4/LinkerScript.ld -Wl,--gc-sections -lm