Makefile.k24f 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. VPATH += :$(HALPATH)/k24f
  2. TMPSRC += $(wildcard $(HALPATH)/k24f/*.c)
  3. DVRSRC += $(wildcard $(HALPATH)/k24f/Drivers/*.c)
  4. SRC += $(subst $(HALPATH)/k24f/,,$(TMPSRC))
  5. $(info SRC is $(SRC))
  6. EXTRAINCDIRS += $(HALPATH)/k24f $(HALPATH)/k24f/CMSIS $(HALPATH)/k24f/Drivers
  7. ASRC += startup_MK24F12.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 += -Os -g -DDEBUG -DCPU_MK24FN1M0VLL12 -DFRDM_K64F -DFREEDOM -w -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin
  18. CFLAGS += -mthumb -mapcs -std=gnu99 -mcpu=cortex-m4 -mfloat-abi=soft -MMD -MP -static
  19. CPPFLAGS += -mthumb -mapcs -std=gnu99 -mcpu=cortex-m4 -mfloat-abi=soft -MMD -MP -static
  20. CPPFLAGS += -Os -g -DDEBUG -DCPU_MK24FN1M0VLL12 -DFRDM_K64F -DFREEDOM -w -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin
  21. ASFLAGS += -g -DDEBUG -D__STARTUP_CLEAR_BSS -g -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin
  22. ASFLAGS += -mthumb -mapcs -std=gnu99 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
  23. LDFLAGS += -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -T $(HALPATH)/k24f/MK24FN1M0xxx12_flash.ld
  24. LDFLAGS += --specs=nano.specs --specs=nosys.specs -Wl,--start-group -L $(HALPATH)/k24f/ -l:lib_mmcau.a -lm -lc -lgcc -lnosys -Wl,--end-group