fixed build with lpc51
This commit is contained in:
parent
f7779c70d6
commit
d70af332c0
|
@ -1,4 +1,5 @@
|
||||||
DEPS_SUBMODULES += hw/mcu/nxp/mcux-sdk
|
SDK_DIR = hw/mcu/nxp/mcux-sdk
|
||||||
|
DEPS_SUBMODULES += $(SDK_DIR)
|
||||||
|
|
||||||
CFLAGS += \
|
CFLAGS += \
|
||||||
-flto \
|
-flto \
|
||||||
|
@ -13,7 +14,7 @@ CFLAGS += \
|
||||||
# mcu driver cause following warnings
|
# mcu driver cause following warnings
|
||||||
CFLAGS += -Wno-error=unused-parameter
|
CFLAGS += -Wno-error=unused-parameter
|
||||||
|
|
||||||
MCU_DIR = hw/mcu/nxp/mcux-sdk/devices/LPC51U68
|
MCU_DIR = $(SDK_DIR)/devices/LPC51U68
|
||||||
|
|
||||||
# All source paths should be relative to the top level.
|
# All source paths should be relative to the top level.
|
||||||
LD_FILE = $(MCU_DIR)/gcc/LPC51U68_flash.ld
|
LD_FILE = $(MCU_DIR)/gcc/LPC51U68_flash.ld
|
||||||
|
@ -22,14 +23,20 @@ SRC_C += \
|
||||||
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
|
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
|
||||||
$(MCU_DIR)/system_LPC51U68.c \
|
$(MCU_DIR)/system_LPC51U68.c \
|
||||||
$(MCU_DIR)/drivers/fsl_clock.c \
|
$(MCU_DIR)/drivers/fsl_clock.c \
|
||||||
$(MCU_DIR)/drivers/fsl_gpio.c \
|
|
||||||
$(MCU_DIR)/drivers/fsl_power.c \
|
$(MCU_DIR)/drivers/fsl_power.c \
|
||||||
$(MCU_DIR)/drivers/fsl_reset.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 += \
|
INC += \
|
||||||
$(TOP)/$(MCU_DIR)/../../CMSIS/Include \
|
$(TOP)/$(MCU_DIR)/../../CMSIS/Include \
|
||||||
$(TOP)/$(MCU_DIR) \
|
$(TOP)/$(MCU_DIR) \
|
||||||
$(TOP)/$(MCU_DIR)/drivers
|
$(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_LPC51U68.S
|
SRC_S += $(MCU_DIR)/gcc/startup_LPC51U68.S
|
||||||
|
|
||||||
|
@ -38,9 +45,8 @@ LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower.a
|
||||||
# For freeRTOS port source
|
# For freeRTOS port source
|
||||||
FREERTOS_PORT = ARM_CM0
|
FREERTOS_PORT = ARM_CM0
|
||||||
|
|
||||||
# For flash-jlink target
|
|
||||||
JLINK_DEVICE = LPC51U68
|
JLINK_DEVICE = LPC51U68
|
||||||
|
PYOCD_TARGET = LPC51U68
|
||||||
|
|
||||||
# flash using pyocd (51u68 is not supported yet)
|
# flash using pyocd (51u68 is not supported yet)
|
||||||
flash: $(BUILD)/$(PROJECT).hex
|
flash: flash-pyocd
|
||||||
pyocd flash -t LPC51U68 $<
|
|
||||||
|
|
Loading…
Reference in New Issue