93 lines
2.4 KiB
Makefile
93 lines
2.4 KiB
Makefile
#
|
|
# component Makefile
|
|
#
|
|
|
|
|
|
#=======================================
|
|
# Configurations
|
|
#=======================================
|
|
|
|
#
|
|
# Drivers of MCU
|
|
#
|
|
|
|
SOC_CPU_NAME = n203e
|
|
|
|
#=======================================
|
|
# system
|
|
#=======================================
|
|
ifeq ("$(SOC)","pec930")
|
|
C_DEFS += -DCONFIG_USE_PEC930
|
|
else
|
|
$(error "Unknown SoC !!!")
|
|
endif
|
|
|
|
#
|
|
# cpu
|
|
#
|
|
C_DEFS += -DCONFIG_CPU_N203E -DCONFIG_HAS_BPU
|
|
|
|
CPU_FLAGS = -mabi=ilp32e -mcmodel=medlow
|
|
CPU_FLAGS += -march=rv32emc_zba_zbb_zbs_zca_zcb_zcmp_zcmt_zicond
|
|
|
|
|
|
#
|
|
# Source
|
|
#
|
|
ASM_SOURCES := \
|
|
$(srctree)/Drivers/PEC930/Device/src/Startup/startup.S \
|
|
$(srctree)/Drivers/PEC930/Device/src/Startup/trap.S
|
|
|
|
C_SOURCES += \
|
|
$(srctree)/Drivers/PEC930/Device/src/interrupt.c \
|
|
$(srctree)/Drivers/PEC930/Device/src/syscalls.c \
|
|
$(srctree)/Drivers/PEC930/Device/src/system_dev.c
|
|
|
|
C_INCLUDES += \
|
|
-I$(srctree)/Drivers/PEC930/Device/inc \
|
|
-I$(srctree)/Drivers/PEC930/NMSIS/Core/Include \
|
|
-I$(srctree)/Drivers/PEC930/
|
|
|
|
|
|
|
|
#=======================================
|
|
# peripheral hal driver
|
|
#=======================================
|
|
C_SOURCES += \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_adc.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_amisc.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_comp.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_opamp.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_crc.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_dsp.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_flash.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_gpio.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_i2c.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_lptim.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_pwr.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_spi.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_syscfg.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_tim.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_uart.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_wdg.c \
|
|
$(srctree)/Drivers/PEC930/HAL_Lib/src/hal_device.c
|
|
|
|
C_INCLUDES += \
|
|
-I$(srctree)/Drivers/PEC930/HAL_Lib/inc
|
|
|
|
#=======================================
|
|
# BSP
|
|
#=======================================
|
|
C_SOURCES += $(srctree)/Drivers/PEC930/BSP/StarterKit/starterkit.c
|
|
|
|
C_INCLUDES += \
|
|
-I$(srctree)/Drivers/PEC930/BSP/StarterKit
|
|
|
|
#=======================================
|
|
# Flags
|
|
#=======================================
|
|
CFLAGS += $(CPU_FLAGS)
|
|
CXXFLAGS +=
|
|
LDFLAGS += $(CPU_FLAGS)
|
|
LIBDIR +=
|