2021-03-01 00:39:48 +07:00
|
|
|
UF2_FAMILY_ID = 0x2abc77ec
|
2021-03-05 22:24:03 +07:00
|
|
|
DEPS_SUBMODULES = lib/sct_neopixel hw/mcu/nxp
|
2021-03-01 00:39:48 +07:00
|
|
|
|
|
|
|
include $(TOP)/$(BOARD_PATH)/board.mk
|
|
|
|
|
2021-03-01 12:18:37 +07:00
|
|
|
# TODO change Default to Highspeed PORT1
|
|
|
|
PORT ?= 0
|
|
|
|
|
2021-01-02 22:53:15 +00:00
|
|
|
CFLAGS += \
|
|
|
|
-flto \
|
|
|
|
-mthumb \
|
|
|
|
-mabi=aapcs \
|
|
|
|
-mcpu=cortex-m33 \
|
|
|
|
-mfloat-abi=hard \
|
|
|
|
-mfpu=fpv5-sp-d16 \
|
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_LPC55XX \
|
|
|
|
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \
|
2021-03-01 12:18:37 +07:00
|
|
|
-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
|
2021-01-02 22:53:15 +00:00
|
|
|
|
|
|
|
# mcu driver cause following warnings
|
|
|
|
CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal
|
|
|
|
|
2021-03-01 12:18:37 +07:00
|
|
|
MCU_DIR = hw/mcu/nxp/sdk/devices/$(MCU_VARIANT)
|
2021-01-02 22:53:15 +00:00
|
|
|
|
|
|
|
# All source paths should be relative to the top level.
|
2021-03-01 12:18:37 +07:00
|
|
|
LD_FILE ?= $(MCU_DIR)/gcc/$(MCU_CORE)_flash.ld
|
2021-01-02 22:53:15 +00:00
|
|
|
|
|
|
|
SRC_C += \
|
2021-03-01 12:18:37 +07:00
|
|
|
$(MCU_DIR)/system_$(MCU_CORE).c \
|
2021-01-02 22:53:15 +00:00
|
|
|
$(MCU_DIR)/drivers/fsl_clock.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_gpio.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_power.c \
|
2021-01-03 18:11:13 +00:00
|
|
|
$(MCU_DIR)/drivers/fsl_reset.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_usart.c \
|
2021-01-10 18:31:40 +00:00
|
|
|
$(MCU_DIR)/drivers/fsl_flexcomm.c \
|
2021-01-12 01:02:17 +09:00
|
|
|
lib/sct_neopixel/sct_neopixel.c
|
2021-01-02 22:53:15 +00:00
|
|
|
|
|
|
|
INC += \
|
2021-03-01 00:39:48 +07:00
|
|
|
$(TOP)/$(BOARD_PATH) \
|
2021-01-10 18:31:40 +00:00
|
|
|
$(TOP)/lib/sct_neopixel \
|
2021-01-02 22:53:15 +00:00
|
|
|
$(TOP)/$(MCU_DIR)/../../CMSIS/Include \
|
|
|
|
$(TOP)/$(MCU_DIR) \
|
|
|
|
$(TOP)/$(MCU_DIR)/drivers
|
|
|
|
|
2021-03-01 12:18:37 +07:00
|
|
|
SRC_S += $(MCU_DIR)/gcc/startup_$(MCU_CORE).S
|
2021-01-02 22:53:15 +00:00
|
|
|
|
|
|
|
LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_hardabi.a
|
|
|
|
|
|
|
|
# For TinyUSB port source
|
|
|
|
VENDOR = nxp
|
|
|
|
CHIP_FAMILY = lpc_ip3511
|
|
|
|
|
|
|
|
# For freeRTOS port source
|
|
|
|
FREERTOS_PORT = ARM_CM33_NTZ/non_secure
|
|
|
|
|
|
|
|
# For flash-jlink target
|
2021-03-01 00:39:48 +07:00
|
|
|
#JLINK_DEVICE = LPC55S69
|
2021-01-02 22:53:15 +00:00
|
|
|
|
|
|
|
# flash using pyocd
|
2021-03-01 00:39:48 +07:00
|
|
|
#flash: $(BUILD)/$(PROJECT).hex
|
|
|
|
# pyocd flash -t LPC55S69 $<
|