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

53 lines
1.2 KiB
Makefile
Raw Normal View History

2021-04-28 19:22:28 +02:00
SDK_DIR = hw/mcu/nxp/nxp_sdk
DEPS_SUBMODULES += $(SDK_DIR)
2020-11-26 16:49:25 +01:00
CFLAGS += \
-mthumb \
-mabi=aapcs \
-mcpu=cortex-m0plus \
-DCPU_MKL25Z128VLK4 \
-DCFG_TUSB_MCU=OPT_MCU_MKL25ZXX \
-DCFG_EXAMPLE_VIDEO_READONLY
2020-11-26 16:49:25 +01:00
2021-09-09 17:13:29 +02:00
LDFLAGS += \
-Wl,--defsym,__stack_size__=0x400 \
-Wl,--defsym,__heap_size__=0
2020-11-26 16:49:25 +01:00
# mcu driver cause following warnings
2022-06-29 09:06:44 +02:00
CFLAGS += -Wno-error=unused-parameter -Wno-error=format -Wno-error=redundant-decls
2020-11-26 16:49:25 +01:00
2021-04-28 19:22:28 +02:00
MCU_DIR = $(SDK_DIR)/devices/MKL25Z4
2020-11-26 16:49:25 +01:00
# All source paths should be relative to the top level.
LD_FILE = $(MCU_DIR)/gcc/MKL25Z128xxx4_flash.ld
SRC_C += \
src/portable/nxp/khci/dcd_khci.c \
2022-01-27 14:26:51 +01:00
src/portable/nxp/khci/hcd_khci.c \
2020-11-26 16:49:25 +01:00
$(MCU_DIR)/system_MKL25Z4.c \
$(MCU_DIR)/project_template/clock_config.c \
$(MCU_DIR)/drivers/fsl_clock.c \
$(MCU_DIR)/drivers/fsl_gpio.c \
$(MCU_DIR)/drivers/fsl_lpsci.c
INC += \
$(TOP)/hw/bsp/$(BOARD) \
2021-04-28 19:33:03 +02:00
$(TOP)/$(SDK_DIR)/CMSIS/Include \
2020-11-26 16:49:25 +01:00
$(TOP)/$(MCU_DIR) \
$(TOP)/$(MCU_DIR)/drivers \
$(TOP)/$(MCU_DIR)/project_template \
SRC_S += $(MCU_DIR)/gcc/startup_MKL25Z4.S
# For freeRTOS port source
FREERTOS_PORT = $(FREERTOS_PORT_PATH)/ARM_CM0
2020-11-26 16:49:25 +01:00
# For flash-jlink target
JLINK_DEVICE = MKL25Z128xxx4
# For flash-pyocd target
PYOCD_TARGET = mkl25zl128
# flash using pyocd
flash: flash-pyocd