esp32-s2_dfu/hw/bsp/lpcxpresso11u37/board.mk

48 lines
1.1 KiB
Makefile
Raw Normal View History

2019-09-06 10:06:04 +02:00
CFLAGS += \
-flto \
2019-09-06 10:06:04 +02:00
-mthumb \
-mabi=aapcs \
-mcpu=cortex-m0 \
-nostdlib \
-DCORE_M0 \
-D__USE_LPCOPEN \
2019-09-11 06:55:16 +02:00
-DCFG_EXAMPLE_MSC_READONLY \
2019-09-06 10:06:04 +02:00
-DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
# mcu driver cause following warnings
CFLAGS += -Wno-error=nested-externs -Wno-error=strict-prototypes -Wno-error=unused-parameter
2019-09-06 10:06:04 +02:00
2019-11-11 05:51:51 +01:00
MCU_DIR = hw/mcu/nxp/lpcopen/lpc11uxx/lpc_chip_11uxx
2019-09-06 10:06:04 +02:00
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/lpcxpresso11u37/lpc11u37.ld
SRC_C += \
2019-09-09 07:39:58 +02:00
$(MCU_DIR)/../gcc/cr_startup_lpc11xx.c \
2019-09-09 07:23:03 +02:00
$(MCU_DIR)/src/chip_11xx.c \
$(MCU_DIR)/src/clock_11xx.c \
$(MCU_DIR)/src/gpio_11xx_1.c \
$(MCU_DIR)/src/iocon_11xx.c \
$(MCU_DIR)/src/sysctl_11xx.c \
$(MCU_DIR)/src/sysinit_11xx.c
2019-09-06 10:06:04 +02:00
INC += \
2019-09-09 07:23:03 +02:00
$(TOP)/$(MCU_DIR)/inc
2019-09-06 10:06:04 +02:00
# For TinyUSB port source
VENDOR = nxp
CHIP_FAMILY = lpc_ip3511
# For freeRTOS port source
FREERTOS_PORT = ARM_CM0
# For flash-jlink target
JLINK_DEVICE = LPC11U37/401
JLINK_IF = swd
# flash using pyocd
flash: $(BUILD)/$(BOARD)-firmware.hex
pyocd flash -t lpc11u37 $<