53 lines
1.3 KiB
Makefile
Raw Normal View History

2021-03-18 16:28:44 +07:00
DEPS_SUBMODULES += hw/mcu/microchip
2019-11-04 14:54:04 +07:00
CFLAGS += \
-flto \
2019-11-04 14:54:04 +07:00
-mthumb \
-mabi=aapcs \
-mcpu=cortex-m4 \
-mfloat-abi=hard \
-mfpu=fpv4-sp-d16 \
-nostdlib -nostartfiles \
-D__SAMG55J19__ \
2019-11-24 23:46:28 +07:00
-DCFG_TUSB_MCU=OPT_MCU_SAMG
2019-11-04 14:54:04 +07:00
2020-03-11 12:32:29 +07:00
# suppress following warnings from mcu driver
2021-10-18 00:13:40 +07:00
CFLAGS += -Wno-error=undef -Wno-error=cast-qual -Wno-error=null-dereference
2019-11-04 14:54:04 +07:00
2019-11-04 15:00:44 +07:00
ASF_DIR = hw/mcu/microchip/samg55
2019-11-04 14:54:04 +07:00
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/samg55j19_flash.ld
2019-11-04 14:54:04 +07:00
SRC_C += \
src/portable/microchip/samg/dcd_samg.c \
2020-08-21 12:19:38 +07:00
$(ASF_DIR)/samg55/gcc/gcc/startup_samg55.c \
$(ASF_DIR)/samg55/gcc/system_samg55.c \
2019-11-04 14:54:04 +07:00
$(ASF_DIR)/hpl/core/hpl_init.c \
2019-11-26 18:21:46 +07:00
$(ASF_DIR)/hpl/usart/hpl_usart.c \
2019-11-04 14:54:04 +07:00
$(ASF_DIR)/hpl/pmc/hpl_pmc.c \
$(ASF_DIR)/hal/src/hal_atomic.c
INC += \
2019-11-26 18:21:46 +07:00
$(TOP)/hw/bsp/$(BOARD) \
2019-11-04 14:54:04 +07:00
$(TOP)/$(ASF_DIR) \
$(TOP)/$(ASF_DIR)/config \
$(TOP)/$(ASF_DIR)/samg55/include \
$(TOP)/$(ASF_DIR)/hal/include \
$(TOP)/$(ASF_DIR)/hal/utils/include \
$(TOP)/$(ASF_DIR)/hpl/core \
$(TOP)/$(ASF_DIR)/hpl/pio \
$(TOP)/$(ASF_DIR)/hpl/pmc \
$(TOP)/$(ASF_DIR)/hri \
$(TOP)/$(ASF_DIR)/CMSIS/Core/Include
# For freeRTOS port source
FREERTOS_PORT = ARM_CM4F
# For flash-jlink target
2020-09-04 11:20:09 +07:00
JLINK_DEVICE = ATSAMG55J19
2019-11-04 14:54:04 +07:00
# flash using edbg from https://github.com/ataradov/edbg
flash: $(BUILD)/$(PROJECT).bin
2019-11-04 14:54:04 +07:00
edbg --verbose -t samg55 -pv -f $<