2021-03-04 22:53:02 +07:00
|
|
|
DEPS_SUBMODULES = hw/mcu/nxp
|
2021-03-04 22:50:45 +07:00
|
|
|
|
2019-05-14 17:37:11 +07:00
|
|
|
CFLAGS += \
|
2019-11-20 16:06:40 +07:00
|
|
|
-flto \
|
2019-05-14 17:37:11 +07:00
|
|
|
-mthumb \
|
|
|
|
-mabi=aapcs \
|
|
|
|
-mcpu=cortex-m0plus \
|
|
|
|
-nostdlib \
|
|
|
|
-DCORE_M0PLUS \
|
|
|
|
-D__VTOR_PRESENT=0 \
|
|
|
|
-D__USE_LPCOPEN \
|
2019-09-03 13:25:36 +07:00
|
|
|
-DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \
|
2019-05-14 17:51:05 +07:00
|
|
|
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM3")))' \
|
|
|
|
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
|
2019-05-14 17:37:11 +07:00
|
|
|
|
2019-11-11 11:51:51 +07:00
|
|
|
MCU_DIR = hw/mcu/nxp/lpcopen/lpc11u6x/lpc_chip_11u6x
|
2019-09-06 12:07:48 +07:00
|
|
|
|
2019-05-14 17:37:11 +07:00
|
|
|
# All source paths should be relative to the top level.
|
2020-03-07 17:49:30 +07:00
|
|
|
LD_FILE = hw/bsp/$(BOARD)/lpc11u68.ld
|
2019-05-14 17:37:11 +07:00
|
|
|
|
|
|
|
SRC_C += \
|
2021-03-17 16:52:07 +07:00
|
|
|
src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \
|
2019-09-09 12:39:58 +07:00
|
|
|
$(MCU_DIR)/../gcc/cr_startup_lpc11u6x.c \
|
2019-09-09 12:23:03 +07:00
|
|
|
$(MCU_DIR)/src/chip_11u6x.c \
|
|
|
|
$(MCU_DIR)/src/clock_11u6x.c \
|
|
|
|
$(MCU_DIR)/src/gpio_11u6x.c \
|
|
|
|
$(MCU_DIR)/src/iocon_11u6x.c \
|
|
|
|
$(MCU_DIR)/src/syscon_11u6x.c \
|
|
|
|
$(MCU_DIR)/src/sysinit_11u6x.c
|
2019-05-14 17:37:11 +07:00
|
|
|
|
|
|
|
INC += \
|
2019-09-09 12:23:03 +07:00
|
|
|
$(TOP)/$(MCU_DIR)/inc
|
2019-05-14 17:37:11 +07:00
|
|
|
|
|
|
|
# For freeRTOS port source
|
|
|
|
FREERTOS_PORT = ARM_CM0
|
|
|
|
|
|
|
|
# For flash-jlink target
|
|
|
|
JLINK_DEVICE = LPC11U68
|
|
|
|
|
2019-09-01 21:04:43 +07:00
|
|
|
# flash using pyocd
|
2021-01-26 12:46:24 +07:00
|
|
|
flash: $(BUILD)/$(PROJECT).hex
|
2019-09-01 21:04:43 +07:00
|
|
|
pyocd flash -t lpc11u68 $<
|