mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
46 lines
1.2 KiB
Makefile
46 lines
1.2 KiB
Makefile
SDK_DIR = hw/mcu/nxp/mcux-sdk
|
|
DEPS_SUBMODULES += $(SDK_DIR)
|
|
|
|
MCU_DIR = $(SDK_DIR)/devices/$(MCU)
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
|
|
|
CFLAGS += \
|
|
-flto \
|
|
-mthumb \
|
|
-mabi=aapcs \
|
|
-mcpu=cortex-m0plus \
|
|
-DCFG_TUSB_MCU=OPT_MCU_LPC51UXX \
|
|
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
|
|
|
|
# mcu driver cause following warnings
|
|
CFLAGS += -Wno-error=unused-parameter
|
|
|
|
# All source paths should be relative to the top level.
|
|
LD_FILE = $(MCU_DIR)/gcc/$(MCU)_flash.ld
|
|
|
|
SRC_C += \
|
|
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
|
|
$(MCU_DIR)/system_$(MCU).c \
|
|
$(MCU_DIR)/drivers/fsl_clock.c \
|
|
$(MCU_DIR)/drivers/fsl_power.c \
|
|
$(MCU_DIR)/drivers/fsl_reset.c \
|
|
$(SDK_DIR)/drivers/lpc_gpio/fsl_gpio.c \
|
|
$(SDK_DIR)/drivers/flexcomm/fsl_flexcomm.c \
|
|
$(SDK_DIR)/drivers/flexcomm/fsl_usart.c
|
|
|
|
INC += \
|
|
$(TOP)/$(MCU_DIR)/../../CMSIS/Include \
|
|
$(TOP)/$(MCU_DIR) \
|
|
$(TOP)/$(MCU_DIR)/drivers \
|
|
$(TOP)/$(SDK_DIR)/drivers/common \
|
|
$(TOP)/$(SDK_DIR)/drivers/flexcomm \
|
|
$(TOP)/$(SDK_DIR)/drivers/lpc_iocon \
|
|
$(TOP)/$(SDK_DIR)/drivers/lpc_gpio
|
|
|
|
SRC_S += $(MCU_DIR)/gcc/startup_$(MCU).S
|
|
|
|
LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower.a
|
|
|
|
# For freeRTOS port source
|
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
|