2023-03-18 13:50:24 +01:00
|
|
|
SDK_DIR = hw/mcu/nxp/nxp_sdk
|
|
|
|
DEPS_SUBMODULES += $(SDK_DIR)
|
2023-03-18 12:30:51 +01:00
|
|
|
|
2023-03-18 13:50:24 +01:00
|
|
|
MCU_DIR = $(SDK_DIR)/devices/$(MCU)
|
2023-03-18 12:30:51 +01:00
|
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
|
|
|
|
|
|
|
CFLAGS += \
|
|
|
|
-mthumb \
|
|
|
|
-mabi=aapcs \
|
2023-03-18 13:50:24 +01:00
|
|
|
-mcpu=cortex-m0plus \
|
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_KINETIS_KL \
|
|
|
|
|
|
|
|
LDFLAGS += \
|
|
|
|
-Wl,--defsym,__stack_size__=0x400 \
|
|
|
|
-Wl,--defsym,__heap_size__=0
|
2023-03-18 12:30:51 +01:00
|
|
|
|
|
|
|
SRC_C += \
|
|
|
|
src/portable/nxp/khci/dcd_khci.c \
|
|
|
|
src/portable/nxp/khci/hcd_khci.c \
|
|
|
|
$(MCU_DIR)/system_$(MCU).c \
|
|
|
|
$(MCU_DIR)/project_template/clock_config.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_clock.c \
|
2023-03-18 13:50:24 +01:00
|
|
|
$(MCU_DIR)/drivers/fsl_gpio.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_lpsci.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_uart.c
|
2023-03-18 12:30:51 +01:00
|
|
|
|
|
|
|
INC += \
|
|
|
|
$(TOP)/$(BOARD_PATH) \
|
|
|
|
$(TOP)/$(SDK_DIR)/CMSIS/Include \
|
|
|
|
$(TOP)/$(MCU_DIR) \
|
|
|
|
$(TOP)/$(MCU_DIR)/project_template \
|
|
|
|
$(TOP)/$(MCU_DIR)/drivers
|
|
|
|
|
|
|
|
SRC_S += $(MCU_DIR)/gcc/startup_$(MCU).S
|
2023-03-18 13:50:24 +01:00
|
|
|
|
|
|
|
# For freeRTOS port source
|
|
|
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
|