board.mk 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. DEPS_SUBMODULES += hw/mcu/microchip
  2. CFLAGS += \
  3. -flto \
  4. -mthumb \
  5. -mabi=aapcs \
  6. -mcpu=cortex-m4 \
  7. -mfloat-abi=hard \
  8. -mfpu=fpv4-sp-d16 \
  9. -nostdlib -nostartfiles \
  10. -D__SAMG55J19__ \
  11. -DCFG_TUSB_MCU=OPT_MCU_SAMG
  12. # suppress following warnings from mcu driver
  13. CFLAGS += -Wno-error=undef -Wno-error=cast-qual -Wno-error=null-dereference -Wno-error=redundant-decls
  14. ASF_DIR = hw/mcu/microchip/samg55
  15. # All source paths should be relative to the top level.
  16. LD_FILE = hw/bsp/$(BOARD)/samg55j19_flash.ld
  17. SRC_C += \
  18. src/portable/microchip/samg/dcd_samg.c \
  19. $(ASF_DIR)/samg55/gcc/gcc/startup_samg55.c \
  20. $(ASF_DIR)/samg55/gcc/system_samg55.c \
  21. $(ASF_DIR)/hpl/core/hpl_init.c \
  22. $(ASF_DIR)/hpl/usart/hpl_usart.c \
  23. $(ASF_DIR)/hpl/pmc/hpl_pmc.c \
  24. $(ASF_DIR)/hal/src/hal_atomic.c
  25. INC += \
  26. $(TOP)/hw/bsp/$(BOARD) \
  27. $(TOP)/$(ASF_DIR) \
  28. $(TOP)/$(ASF_DIR)/config \
  29. $(TOP)/$(ASF_DIR)/samg55/include \
  30. $(TOP)/$(ASF_DIR)/hal/include \
  31. $(TOP)/$(ASF_DIR)/hal/utils/include \
  32. $(TOP)/$(ASF_DIR)/hpl/core \
  33. $(TOP)/$(ASF_DIR)/hpl/pio \
  34. $(TOP)/$(ASF_DIR)/hpl/pmc \
  35. $(TOP)/$(ASF_DIR)/hri \
  36. $(TOP)/$(ASF_DIR)/CMSIS/Core/Include
  37. # For freeRTOS port source
  38. FREERTOS_PORT = ARM_CM4F
  39. # For flash-jlink target
  40. JLINK_DEVICE = ATSAMG55J19
  41. # flash using edbg from https://github.com/ataradov/edbg
  42. flash: $(BUILD)/$(PROJECT).bin
  43. edbg --verbose -t samg55 -pv -f $<