Makefile.efr32mg21a 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. VPATH += :$(HALPATH)/efr32mg21a
  2. VPATH += :$(HALPATH)/silabs_sdk/platform/Device/SiliconLabs/EFR32MG21/Source/GCC
  3. VPATH += :$(HALPATH)/silabs_sdk/platform/Device/SiliconLabs/EFR32MG21/Source
  4. VPATH += :$(HALPATH)/silabs_sdk/platform/emlib/src
  5. SRC += system_efr32mg21.c efr32mg21a_hal.c
  6. ASRC += startup_efr32mg21.S
  7. #SiLabs Emlib stuff
  8. SRC += em_cmu.c em_system.c em_usart.c em_gpio.c em_se.c
  9. EXTRAINCDIRS += $(HALPATH)/efr32mg21a
  10. EXTRAINCDIRS += $(HALPATH)/silabs_sdk/platform/CMSIS/Include
  11. EXTRAINCDIRS += $(HALPATH)/silabs_sdk/platform/emlib/inc
  12. EXTRAINCDIRS += $(HALPATH)/silabs_sdk/platform/Device/SiliconLabs/EFR32MG21/Include
  13. CFLAGS += -DHFXO_FREQ=7372800UL
  14. MCU_FLAGS = -mcpu=cortex-m33
  15. CC = arm-none-eabi-gcc
  16. OBJCOPY = arm-none-eabi-objcopy
  17. OBJDUMP = arm-none-eabi-objdump
  18. SIZE = arm-none-eabi-size
  19. AR = arm-none-eabi-ar rcs
  20. NM = arm-none-eabi-nm
  21. #Output Format = Binary for this target
  22. FORMAT = binary
  23. CFLAGS += -gdwarf-2 -mthumb -fmessage-length=0 -mno-sched-prolog -fno-builtin -ffunction-sections -fdata-sections
  24. CPPFLAGS += $(CFLAGS)
  25. ASFLAGS += $(CFLAGS)
  26. CDEFS += -DEFR32MG21A020F1024IM32=1 -mfpu=fpv5-sp-d16 -mfloat-abi=softfp
  27. LDFLAGS += --specs=nano.specs -T $(HALPATH)/silabs_sdk/platform/Device/SiliconLabs/EFR32MG21/Source/GCC/efr32mg21.ld -Wl,--gc-sections -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group -lm