2025-04-13 17:29:34 +08:00
|
|
|
EXAMPLE_BASE_DIR ?= $(shell realpath .)
|
|
|
|
|
EXAMPLE_NAME := $(notdir $(patsubst %/,%,$(CURDIR)))
|
|
|
|
|
SDK_BASE_DIR ?= $(shell realpath ./../..)
|
|
|
|
|
|
|
|
|
|
export SDK_BASE_DIR
|
|
|
|
|
export EXAMPLE_NAME
|
|
|
|
|
export EXAMPLE_BASE_DIR
|
|
|
|
|
|
|
|
|
|
GCC_PATH := $(shell which arm-none-eabi-gcc)
|
|
|
|
|
CROSS_COMPILE := $(patsubst %gcc,%,$(GCC_PATH))
|
|
|
|
|
ifeq ($(GCC_PATH),)
|
|
|
|
|
$(error arm-none-eabi-gcc not found in PATH. Please install the ARM toolchain.)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# add custom cmake definition
|
|
|
|
|
#cmake_definition+=-Dxxx=sss
|
|
|
|
|
|
2025-04-13 21:33:56 +08:00
|
|
|
LDFLAGS += -T$(EXAMPLE_BASE_DIR)/boot2.ld
|
|
|
|
|
BOOT2_PRE_CRC ?= boot2_pre_crc.bin
|
2025-04-13 17:29:34 +08:00
|
|
|
|
|
|
|
|
include $(SDK_BASE_DIR)/project.build
|