espressif_tinyusb/hw/bsp/imxrt/family.mk

64 lines
1.7 KiB
Makefile
Raw Normal View History

UF2_FAMILY_ID = 0x4fb2d5bd
2021-04-28 14:30:23 +02:00
SDK_DIR = hw/mcu/nxp/mcux-sdk
DEPS_SUBMODULES += $(SDK_DIR)
2020-11-29 14:41:30 +01:00
include $(TOP)/$(BOARD_PATH)/board.mk
2019-11-22 19:09:39 +01:00
CFLAGS += \
-mthumb \
-mabi=aapcs \
-mcpu=cortex-m7 \
-mfloat-abi=hard \
-mfpu=fpv5-d16 \
-D__ARMVFP__=0 -D__ARMFPV5__=0\
-DXIP_EXTERNAL_FLASH=1 \
-DXIP_BOOT_HEADER_ENABLE=1 \
-DCFG_TUSB_MCU=OPT_MCU_MIMXRT
2019-11-22 19:09:39 +01:00
ifdef BOARD_TUD_RHPORT
CFLAGS += -DBOARD_TUD_RHPORT=$(BOARD_TUD_RHPORT)
endif
ifdef BOARD_TUH_RHPORT
CFLAGS += -DBOARD_TUH_RHPORT=$(BOARD_TUH_RHPORT)
endif
2019-11-22 19:09:39 +01:00
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=implicit-fallthrough -Wno-error=redundant-decls
2019-11-22 19:09:39 +01:00
2021-04-28 14:30:23 +02:00
MCU_DIR = $(SDK_DIR)/devices/$(MCU_VARIANT)
2019-11-22 19:09:39 +01:00
# All source paths should be relative to the top level.
2020-11-29 14:41:30 +01:00
LD_FILE = $(MCU_DIR)/gcc/$(MCU_VARIANT)xxxxx_flexspi_nor.ld
2022-12-04 07:58:47 +01:00
# TODO for net_lwip_webserver example, but may not needed !!
2020-11-29 14:41:30 +01:00
LDFLAGS += \
-Wl,--defsym,__stack_size__=0x800 \
2019-11-22 19:09:39 +01:00
SRC_C += \
2021-12-01 17:19:17 +01:00
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
src/portable/chipidea/ci_hs/hcd_ci_hs.c \
src/portable/ehci/ehci.c \
2020-11-29 14:41:30 +01:00
$(MCU_DIR)/system_$(MCU_VARIANT).c \
2019-11-22 19:09:39 +01:00
$(MCU_DIR)/xip/fsl_flexspi_nor_boot.c \
$(MCU_DIR)/project_template/clock_config.c \
$(MCU_DIR)/drivers/fsl_clock.c \
2021-04-28 14:30:23 +02:00
$(SDK_DIR)/drivers/common/fsl_common.c \
$(SDK_DIR)/drivers/igpio/fsl_gpio.c \
$(SDK_DIR)/drivers/lpuart/fsl_lpuart.c
2019-11-22 19:09:39 +01:00
INC += \
2020-11-29 14:41:30 +01:00
$(TOP)/$(BOARD_PATH) \
2019-11-22 19:09:39 +01:00
$(TOP)/$(MCU_DIR)/../../CMSIS/Include \
$(TOP)/$(MCU_DIR) \
$(TOP)/$(MCU_DIR)/project_template \
2021-04-28 14:30:23 +02:00
$(TOP)/$(MCU_DIR)/drivers \
$(TOP)/$(SDK_DIR)/drivers/common \
$(TOP)/$(SDK_DIR)/drivers/igpio \
$(TOP)/$(SDK_DIR)/drivers/lpuart
2019-11-22 19:09:39 +01:00
2020-11-29 14:41:30 +01:00
SRC_S += $(MCU_DIR)/gcc/startup_$(MCU_VARIANT).S
2019-11-22 19:09:39 +01:00
# For freeRTOS port source
2020-03-10 18:47:13 +01:00
FREERTOS_PORT = ARM_CM7/r0p1
2019-11-22 19:09:39 +01:00