mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-18 11:42:25 +00:00
bsp lpc51
This commit is contained in:
parent
1154b7a9e7
commit
934baae9b8
2
.github/workflows/build_arm.yml
vendored
2
.github/workflows/build_arm.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
|||||||
- 'imxrt'
|
- 'imxrt'
|
||||||
- 'kinetis_k32 kinetis_kl'
|
- 'kinetis_k32 kinetis_kl'
|
||||||
- 'lpc11 lpc13 lpc15 lpc18'
|
- 'lpc11 lpc13 lpc15 lpc18'
|
||||||
- 'lpc54 lpc55'
|
- 'lpc51 lpc54 lpc55'
|
||||||
- 'mm32 msp432e4'
|
- 'mm32 msp432e4'
|
||||||
- 'nrf'
|
- 'nrf'
|
||||||
- 'ra'
|
- 'ra'
|
||||||
|
37
hw/bsp/lpc51/boards/lpcxpresso51u68/board.mk
Normal file
37
hw/bsp/lpc51/boards/lpcxpresso51u68/board.mk
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
MCU = LPC51U68
|
||||||
|
|
||||||
|
CFLAGS += \
|
||||||
|
-DCPU_LPC51U68JBD64 \
|
||||||
|
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))'
|
||||||
|
|
||||||
|
SRC_C += \
|
||||||
|
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
|
||||||
|
$(MCU_DIR)/system_LPC51U68.c \
|
||||||
|
$(MCU_DIR)/drivers/fsl_clock.c \
|
||||||
|
$(MCU_DIR)/drivers/fsl_power.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 += \
|
||||||
|
$(TOP)/$(MCU_DIR)/../../CMSIS/Include \
|
||||||
|
$(TOP)/$(MCU_DIR) \
|
||||||
|
$(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
|
||||||
|
|
||||||
|
LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower.a
|
||||||
|
|
||||||
|
# For freeRTOS port source
|
||||||
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
|
||||||
|
|
||||||
|
JLINK_DEVICE = LPC51U68
|
||||||
|
PYOCD_TARGET = LPC51U68
|
||||||
|
|
||||||
|
# flash using pyocd (51u68 is not supported yet)
|
||||||
|
flash: flash-pyocd
|
@ -1,27 +1,26 @@
|
|||||||
SDK_DIR = hw/mcu/nxp/mcux-sdk
|
SDK_DIR = hw/mcu/nxp/mcux-sdk
|
||||||
DEPS_SUBMODULES += $(SDK_DIR)
|
DEPS_SUBMODULES += $(SDK_DIR)
|
||||||
|
|
||||||
|
MCU_DIR = $(SDK_DIR)/devices/$(MCU)
|
||||||
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
||||||
|
|
||||||
CFLAGS += \
|
CFLAGS += \
|
||||||
-flto \
|
-flto \
|
||||||
-mthumb \
|
-mthumb \
|
||||||
-mabi=aapcs \
|
-mabi=aapcs \
|
||||||
-mcpu=cortex-m0plus \
|
-mcpu=cortex-m0plus \
|
||||||
-DCPU_LPC51U68JBD64 \
|
|
||||||
-DCFG_TUSB_MCU=OPT_MCU_LPC51UXX \
|
-DCFG_TUSB_MCU=OPT_MCU_LPC51UXX \
|
||||||
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \
|
|
||||||
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
|
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
|
||||||
|
|
||||||
# mcu driver cause following warnings
|
# mcu driver cause following warnings
|
||||||
CFLAGS += -Wno-error=unused-parameter
|
CFLAGS += -Wno-error=unused-parameter
|
||||||
|
|
||||||
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/$(MCU)_flash.ld
|
||||||
|
|
||||||
SRC_C += \
|
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_$(MCU).c \
|
||||||
$(MCU_DIR)/drivers/fsl_clock.c \
|
$(MCU_DIR)/drivers/fsl_clock.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 \
|
||||||
@ -38,15 +37,9 @@ INC += \
|
|||||||
$(TOP)/$(SDK_DIR)/drivers/lpc_iocon \
|
$(TOP)/$(SDK_DIR)/drivers/lpc_iocon \
|
||||||
$(TOP)/$(SDK_DIR)/drivers/lpc_gpio
|
$(TOP)/$(SDK_DIR)/drivers/lpc_gpio
|
||||||
|
|
||||||
SRC_S += $(MCU_DIR)/gcc/startup_LPC51U68.S
|
SRC_S += $(MCU_DIR)/gcc/startup_$(MCU).S
|
||||||
|
|
||||||
LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower.a
|
LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower.a
|
||||||
|
|
||||||
# For freeRTOS port source
|
# For freeRTOS port source
|
||||||
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
|
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
|
||||||
|
|
||||||
JLINK_DEVICE = LPC51U68
|
|
||||||
PYOCD_TARGET = LPC51U68
|
|
||||||
|
|
||||||
# flash using pyocd (51u68 is not supported yet)
|
|
||||||
flash: flash-pyocd
|
|
Loading…
x
Reference in New Issue
Block a user