added lpcxpresso 55s28

This commit is contained in:
hathach
2021-03-01 12:18:37 +07:00
parent 2e42858537
commit e9059b5d84
5 changed files with 83 additions and 7 deletions
+16 -5
View File
@@ -2,6 +2,9 @@ UF2_FAMILY_ID = 0x2abc77ec
include $(TOP)/$(BOARD_PATH)/board.mk
# TODO change Default to Highspeed PORT1
PORT ?= 0
CFLAGS += \
-flto \
-mthumb \
@@ -11,18 +14,26 @@ CFLAGS += \
-mfpu=fpv5-sp-d16 \
-DCFG_TUSB_MCU=OPT_MCU_LPC55XX \
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' \
-DBOARD_DEVICE_RHPORT_NUM=$(PORT)
ifeq ($(PORT), 1)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "PORT1 High Speed")
else
$(info "PORT0 Full Speed")
endif
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal
MCU_DIR = hw/mcu/nxp/sdk/devices/LPC55S69
MCU_DIR = hw/mcu/nxp/sdk/devices/$(MCU_VARIANT)
# All source paths should be relative to the top level.
LD_FILE ?= $(MCU_DIR)/gcc/$(MCU_VARIANT)_flash.ld
LD_FILE ?= $(MCU_DIR)/gcc/$(MCU_CORE)_flash.ld
SRC_C += \
$(MCU_DIR)/system_$(MCU_VARIANT).c \
$(MCU_DIR)/system_$(MCU_CORE).c \
$(MCU_DIR)/drivers/fsl_clock.c \
$(MCU_DIR)/drivers/fsl_gpio.c \
$(MCU_DIR)/drivers/fsl_power.c \
@@ -38,7 +49,7 @@ INC += \
$(TOP)/$(MCU_DIR) \
$(TOP)/$(MCU_DIR)/drivers
SRC_S += $(MCU_DIR)/gcc/startup_$(MCU_VARIANT).S
SRC_S += $(MCU_DIR)/gcc/startup_$(MCU_CORE).S
LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_hardabi.a