2021-06-18 12:18:11 +02:00
|
|
|
UF2_FAMILY_ID = 0x0
|
|
|
|
SDK_DIR = hw/mcu/mindmotion/mm32sdk
|
|
|
|
DEPS_SUBMODULES += lib/CMSIS_5 $(SDK_DIR)
|
|
|
|
|
|
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
2023-06-24 13:38:41 +02:00
|
|
|
CPU_CORE ?= cortex-m3
|
2021-06-18 12:18:11 +02:00
|
|
|
|
|
|
|
CFLAGS += \
|
|
|
|
-flto \
|
|
|
|
-nostdlib -nostartfiles \
|
2023-03-16 17:11:11 +01:00
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_MM32F327X
|
2021-06-18 12:18:11 +02:00
|
|
|
|
|
|
|
# suppress warning caused by vendor mcu driver
|
2021-10-17 11:26:27 +02:00
|
|
|
CFLAGS += -Wno-error=unused-parameter -Wno-error=maybe-uninitialized -Wno-error=cast-qual
|
2021-06-18 12:18:11 +02:00
|
|
|
|
2023-11-23 06:43:13 +01:00
|
|
|
LDFLAGS_GCC += -specs=nosys.specs -specs=nano.specs
|
|
|
|
|
2021-06-18 12:18:11 +02:00
|
|
|
SRC_C += \
|
|
|
|
src/portable/mindmotion/mm32/dcd_mm32f327x_otg.c \
|
|
|
|
$(SDK_DIR)/mm32f327x/MM32F327x/Source/system_mm32f327x.c \
|
|
|
|
$(SDK_DIR)/mm32f327x/MM32F327x/HAL_Lib/Src/hal_gpio.c \
|
|
|
|
$(SDK_DIR)/mm32f327x/MM32F327x/HAL_Lib/Src/hal_rcc.c \
|
|
|
|
$(SDK_DIR)/mm32f327x/MM32F327x/HAL_Lib/Src/hal_uart.c \
|
2023-03-16 17:11:11 +01:00
|
|
|
|
2021-06-18 12:18:11 +02:00
|
|
|
INC += \
|
|
|
|
$(TOP)/$(BOARD_PATH) \
|
|
|
|
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
|
|
|
|
$(TOP)/$(SDK_DIR)/mm32f327x/MM32F327x/Include \
|
|
|
|
$(TOP)/$(SDK_DIR)/mm32f327x/MM32F327x/HAL_Lib/Inc
|
|
|
|
|
|
|
|
# flash target using on-board
|
|
|
|
flash: flash-jlink
|