2021-01-02 23:53:15 +01:00
|
|
|
CFLAGS += \
|
|
|
|
-flto \
|
|
|
|
-mthumb \
|
|
|
|
-mabi=aapcs \
|
|
|
|
-mcpu=cortex-m33 \
|
|
|
|
-mfloat-abi=hard \
|
|
|
|
-mfpu=fpv5-sp-d16 \
|
|
|
|
-DCPU_LPC55S69JBD100_cm33_core0 \
|
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_LPC55XX \
|
|
|
|
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \
|
|
|
|
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
|
|
|
|
|
|
|
|
# mcu driver cause following warnings
|
|
|
|
CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal
|
|
|
|
|
|
|
|
MCU_DIR = hw/mcu/nxp/sdk/devices/LPC55S69
|
|
|
|
|
|
|
|
# All source paths should be relative to the top level.
|
|
|
|
LD_FILE = hw/bsp/$(BOARD)/LPC55S69_cm33_core0_uf2.ld
|
|
|
|
|
|
|
|
SRC_C += \
|
|
|
|
$(MCU_DIR)/system_LPC55S69_cm33_core0.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_clock.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_gpio.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_power.c \
|
2021-01-03 19:11:13 +01:00
|
|
|
$(MCU_DIR)/drivers/fsl_reset.c \
|
|
|
|
$(MCU_DIR)/drivers/fsl_usart.c \
|
2021-01-10 19:31:40 +01:00
|
|
|
$(MCU_DIR)/drivers/fsl_flexcomm.c \
|
2021-01-11 17:02:17 +01:00
|
|
|
lib/sct_neopixel/sct_neopixel.c
|
2021-01-02 23:53:15 +01:00
|
|
|
|
|
|
|
INC += \
|
2021-01-10 06:17:49 +01:00
|
|
|
$(TOP)/hw/bsp/ \
|
|
|
|
$(TOP)/hw/bsp/$(BOARD) \
|
2021-01-10 19:31:40 +01:00
|
|
|
$(TOP)/lib/sct_neopixel \
|
2021-01-02 23:53:15 +01:00
|
|
|
$(TOP)/$(MCU_DIR)/../../CMSIS/Include \
|
|
|
|
$(TOP)/$(MCU_DIR) \
|
|
|
|
$(TOP)/$(MCU_DIR)/drivers
|
|
|
|
|
|
|
|
SRC_S += $(MCU_DIR)/gcc/startup_LPC55S69_cm33_core0.S
|
|
|
|
|
|
|
|
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
|
|
|
|
JLINK_DEVICE = LPC55S69
|
|
|
|
|
|
|
|
# flash using pyocd
|
2021-01-26 06:46:24 +01:00
|
|
|
flash: $(BUILD)/$(PROJECT).hex
|
2021-01-02 23:53:15 +01:00
|
|
|
pyocd flash -t LPC55S69 $<
|