mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 19:20:22 +00:00
Added support for the MAX32650/1/2 series parts - MAX32650FTHR, MAX32650EvKit, MAX32651EvKit - Added special flash rule for MAX32651 due to signing required - Added depencies to flash-msdk rules for executable
86 lines
2.3 KiB
Makefile
86 lines
2.3 KiB
Makefile
DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/analog/max32
|
|
|
|
# Important locations in the hw support for MCU
|
|
MAX32_CMSIS = hw/mcu/analog/max32/Libraries/CMSIS
|
|
MAX32_PERIPH = hw/mcu/analog/max32/Libraries/PeriphDrivers
|
|
|
|
# Add any board specific make rules
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
|
|
|
CPU_CORE ?= cortex-m4
|
|
PORT ?= 0
|
|
|
|
# GCC
|
|
SRC_S_GCC += $(MAX32_CMSIS)/Device/Maxim/MAX32650/Source/GCC/startup_max32650.S
|
|
|
|
# IAR
|
|
#SRC_S_IAR += ?
|
|
|
|
# --------------
|
|
# Compiler Flags
|
|
# --------------
|
|
# Flags for the MAX32650/1/2 SDK
|
|
CFLAGS += -DTARGET=MAX32650 \
|
|
-DTARGET_REV=0x4131 \
|
|
-DMXC_ASSERT_ENABLE \
|
|
-DMAX32650 \
|
|
-DIAR_PRAGMAS=0
|
|
|
|
# Flags for TUSB features
|
|
CFLAGS += \
|
|
-DCFG_TUSB_MCU=OPT_MCU_MAX32650 \
|
|
-DBOARD_TUD_MAX_SPEED=OPT_MODE_HIGH_SPEED
|
|
|
|
# mcu driver cause following warnings
|
|
CFLAGS += -Wno-error=strict-prototypes \
|
|
-Wno-error=unused-parameter \
|
|
-Wno-error=cast-align \
|
|
-Wno-error=cast-qual \
|
|
-Wno-error=sign-compare
|
|
|
|
LDFLAGS_GCC += -nostartfiles --specs=nosys.specs --specs=nano.specs
|
|
|
|
# -----------------
|
|
# Sources & Include
|
|
# -----------------
|
|
PERIPH_SRC = $(TOP)/$(MAX32_PERIPH)/Source
|
|
SRC_C += \
|
|
src/portable/analog/max32/dcd_max32.c \
|
|
$(MAX32_CMSIS)/Device/Maxim/MAX32650/Source/heap.c \
|
|
$(MAX32_CMSIS)/Device/Maxim/MAX32650/Source/system_max32650.c \
|
|
$(MAX32_CMSIS)/Device/Maxim/MAX32650/Source/header_MAX32650.c \
|
|
$(PERIPH_SRC)/SYS/mxc_assert.c \
|
|
$(PERIPH_SRC)/SYS/mxc_delay.c \
|
|
$(PERIPH_SRC)/SYS/mxc_lock.c \
|
|
$(PERIPH_SRC)/SYS/nvic_table.c \
|
|
$(PERIPH_SRC)/SYS/pins_me10.c \
|
|
$(PERIPH_SRC)/SYS/sys_me10.c \
|
|
$(PERIPH_SRC)/FLC/flc_common.c \
|
|
$(PERIPH_SRC)/FLC/flc_me10.c \
|
|
$(PERIPH_SRC)/FLC/flc_reva.c \
|
|
$(PERIPH_SRC)/GPIO/gpio_common.c \
|
|
$(PERIPH_SRC)/GPIO/gpio_me10.c \
|
|
$(PERIPH_SRC)/GPIO/gpio_reva.c \
|
|
$(PERIPH_SRC)/ICC/icc_me10.c \
|
|
$(PERIPH_SRC)/ICC/icc_reva.c \
|
|
$(PERIPH_SRC)/ICC/icc_common.c \
|
|
$(PERIPH_SRC)/TPU/tpu_me10.c \
|
|
$(PERIPH_SRC)/TPU/tpu_reva.c \
|
|
$(PERIPH_SRC)/UART/uart_common.c \
|
|
$(PERIPH_SRC)/UART/uart_me10.c \
|
|
$(PERIPH_SRC)/UART/uart_reva.c \
|
|
|
|
|
|
INC += \
|
|
$(TOP)/$(BOARD_PATH) \
|
|
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
|
|
$(TOP)/$(MAX32_CMSIS)/Include \
|
|
$(TOP)/$(MAX32_CMSIS)/Device/Maxim/MAX32650/Include \
|
|
$(TOP)/$(MAX32_PERIPH)/Include/MAX32650 \
|
|
$(PERIPH_SRC)/SYS \
|
|
$(PERIPH_SRC)/GPIO \
|
|
$(PERIPH_SRC)/ICC \
|
|
$(PERIPH_SRC)/FLC \
|
|
$(PERIPH_SRC)/TPU \
|
|
$(PERIPH_SRC)/UART
|