board.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. DEPS_SUBMODULES += hw/mcu/microchip
  2. HWREV ?= 1
  3. CFLAGS += \
  4. -mthumb \
  5. -mabi=aapcs \
  6. -mlong-calls \
  7. -mcpu=cortex-m4 \
  8. -mfloat-abi=hard \
  9. -mfpu=fpv4-sp-d16 \
  10. -nostdlib -nostartfiles \
  11. -D__SAME51J19A__ \
  12. -DCONF_CPU_FREQUENCY=80000000 \
  13. -DCONF_GCLK_USB_FREQUENCY=48000000 \
  14. -DCFG_TUSB_MCU=OPT_MCU_SAME5X \
  15. -DD5035_01=1 \
  16. -DBOARD_NAME="\"D5035-01\"" \
  17. -DSVC_Handler=SVCall_Handler \
  18. -DHWREV=$(HWREV)
  19. # suppress warning caused by vendor mcu driver
  20. CFLAGS += -Wno-error=cast-qual
  21. # All source paths should be relative to the top level.
  22. LD_FILE = hw/bsp/$(BOARD)/same51j19a_flash.ld
  23. SRC_C += \
  24. src/portable/microchip/samd/dcd_samd.c \
  25. hw/mcu/microchip/same51/gcc/gcc/startup_same51.c \
  26. hw/mcu/microchip/same51/gcc/system_same51.c
  27. ifdef SYSCALLS
  28. ifneq ($(SYSCALLS),0)
  29. SRC_C += hw/mcu/microchip/same51/hal/utils/src/utils_syscalls.c
  30. endif
  31. endif
  32. ifdef LOG
  33. ifneq ($(LOG),0)
  34. SRC_C += hw/mcu/microchip/same51/hal/utils/src/utils_syscalls.c
  35. endif
  36. endif
  37. INC += \
  38. $(TOP)/hw/mcu/microchip/same51/ \
  39. $(TOP)/hw/mcu/microchip/same51/config \
  40. $(TOP)/hw/mcu/microchip/same51/include \
  41. $(TOP)/hw/mcu/microchip/same51/hal/include \
  42. $(TOP)/hw/mcu/microchip/same51/hal/utils/include \
  43. $(TOP)/hw/mcu/microchip/same51/hpl/port \
  44. $(TOP)/hw/mcu/microchip/same51/hri \
  45. $(TOP)/hw/mcu/microchip/same51/CMSIS/Include
  46. # For freeRTOS port source
  47. FREERTOS_PORT = ARM_CM4F
  48. # For flash-jlink target
  49. JLINK_DEVICE = ATSAME51J19
  50. # flash using jlink
  51. flash: flash-jlink