mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
43 lines
1.0 KiB
Makefile
43 lines
1.0 KiB
Makefile
|
DEPS_SUBMODULES += hw/mcu/microchip
|
||
|
|
||
|
SDK_DIR = hw/mcu/microchip/$(MCU)
|
||
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
||
|
|
||
|
CFLAGS += \
|
||
|
-mthumb \
|
||
|
-mabi=aapcs \
|
||
|
-mlong-calls \
|
||
|
-mcpu=cortex-m4 \
|
||
|
-mfloat-abi=hard \
|
||
|
-mfpu=fpv4-sp-d16 \
|
||
|
-nostdlib -nostartfiles \
|
||
|
-DCFG_TUSB_MCU=OPT_MCU_SAME5X
|
||
|
|
||
|
# suppress warning caused by vendor mcu driver
|
||
|
#CFLAGS += -Wno-error=cast-qual
|
||
|
|
||
|
SRC_C += \
|
||
|
src/portable/microchip/samd/dcd_samd.c \
|
||
|
$(SDK_DIR)/gcc/gcc/startup_$(MCU).c \
|
||
|
$(SDK_DIR)/gcc/system_$(MCU).c \
|
||
|
$(SDK_DIR)/hal/utils/src/utils_syscalls.c
|
||
|
|
||
|
INC += \
|
||
|
$(TOP)/$(SDK_DIR) \
|
||
|
$(TOP)/$(SDK_DIR)/config \
|
||
|
$(TOP)/$(SDK_DIR)/include \
|
||
|
$(TOP)/$(SDK_DIR)/hal/include \
|
||
|
$(TOP)/$(SDK_DIR)/hal/utils/include \
|
||
|
$(TOP)/$(SDK_DIR)/hpl/port \
|
||
|
$(TOP)/$(SDK_DIR)/hri \
|
||
|
$(TOP)/$(SDK_DIR)/CMSIS/Include
|
||
|
|
||
|
# For freeRTOS port source
|
||
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM4F
|
||
|
|
||
|
# flash using edbg from https://github.com/ataradov/edbg
|
||
|
flash-edbg: $(BUILD)/$(PROJECT).bin
|
||
|
edbg --verbose -t $(MCU) -pv -f $<
|
||
|
|
||
|
flash: flash-edbg
|