2021-11-05 11:40:53 +07:00
|
|
|
UF2_FAMILY_ID = 0x00
|
|
|
|
MCU_DIR = hw/mcu/infineon/mtb-xmclib-cat3
|
|
|
|
|
2021-11-05 12:00:27 +07:00
|
|
|
DEPS_SUBMODULES += $(MCU_DIR)
|
2021-11-05 11:40:53 +07:00
|
|
|
|
|
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
|
|
|
|
|
|
|
CFLAGS += \
|
|
|
|
-flto \
|
|
|
|
-mthumb \
|
|
|
|
-mabi=aapcs \
|
|
|
|
-mcpu=cortex-m4 \
|
|
|
|
-mfloat-abi=hard \
|
|
|
|
-mfpu=fpv4-sp-d16 \
|
|
|
|
-nostdlib -nostartfiles \
|
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_XMC4000
|
|
|
|
|
|
|
|
# mcu driver cause following warnings
|
|
|
|
#CFLAGS += -Wno-error=shadow -Wno-error=cast-align
|
|
|
|
|
2021-11-05 13:13:21 +07:00
|
|
|
SKIP_NANOLIB = 1
|
|
|
|
|
2021-11-05 11:40:53 +07:00
|
|
|
SRC_C += \
|
|
|
|
src/portable/synopsys/dwc2/dcd_dwc2.c \
|
|
|
|
$(MCU_DIR)/Newlib/syscalls.c \
|
|
|
|
$(MCU_DIR)/CMSIS/Infineon/COMPONENT_$(MCU_VARIANT)/Source/system_$(MCU_VARIANT).c \
|
|
|
|
$(MCU_DIR)/XMCLib/src/xmc4_gpio.c \
|
|
|
|
$(MCU_DIR)/XMCLib/src/xmc4_scu.c
|
|
|
|
|
2021-11-05 13:13:21 +07:00
|
|
|
|
2021-11-05 11:40:53 +07:00
|
|
|
SRC_S += $(MCU_DIR)/CMSIS/Infineon/COMPONENT_$(MCU_VARIANT)/Source/TOOLCHAIN_GCC_ARM/startup_$(MCU_VARIANT).S
|
|
|
|
|
|
|
|
INC += \
|
|
|
|
$(TOP)/$(BOARD_PATH) \
|
|
|
|
$(TOP)/$(MCU_DIR)/CMSIS/Core/Include \
|
|
|
|
$(TOP)/$(MCU_DIR)/CMSIS/Infineon/COMPONENT_$(MCU_VARIANT)/Include \
|
|
|
|
$(TOP)/$(MCU_DIR)/XMCLib/inc
|
|
|
|
|
|
|
|
# For freeRTOS port source
|
|
|
|
FREERTOS_PORT = ARM_CM4F
|