22CORE_DIRS = $(sort $(dir $(wildcard $(BOARD_EMSDP_DIR ) /$(VALID_BD_VER ) /configs/* /* .h) ) )
33SUPPORTED_CORES := $(patsubst $(BOARD_EMSDP_DIR ) /$(VALID_BD_VER ) /configs/% /, % ,$(CORE_DIRS ) )
44
5- CORE ?= $(firstword $(SUPPORTED_CORES ) )
5+ CUR_CORE ?= $(firstword $(SUPPORTED_CORES ) )
66
7- override CORE := $(strip $(CORE ) )
7+ override CUR_CORE := $(strip $(CUR_CORE ) )
88
99# # Set Valid Core Configuration For Board
10- VALID_CORE = $(call check_item_exist, $(CORE ) , $(SUPPORTED_CORES ) )
10+ VALID_CUR_CORE = $(call check_item_exist, $(CUR_CORE ) , $(SUPPORTED_CORES ) )
1111
12- BOARD_CORE_DIR = $(BOARD_EMSDP_DIR ) /$(VALID_BD_VER ) /configs/$(VALID_CORE )
12+ BOARD_CORE_DIR = $(BOARD_EMSDP_DIR ) /$(VALID_BD_VER ) /configs/$(VALID_CUR_CORE )
1313
1414ONCHIP_IP_LIST ?= . designware/spi designware/uart designware/gpio designware/sdio designware/trng designware/pwm_timer subsystem/spi subsystem/gpio subsystem/uart subsystem/iic subsystem/i2s
1515
@@ -18,21 +18,20 @@ ifneq ($(TCFFILE_IS_VALID),1)
1818TCF ?= $(wildcard $(BOARD_CORE_DIR ) /* /* .tcf)
1919endif
2020
21-
22- # # If CORE is not in SUPPORT_CORES list, then force CORE and VALID_CORE to be TCF filename
21+ # # If CUR_CORE is not in SUPPORT_CORES list, then force CUR_CORE and VALID_CUR_CORE to be TCF filename
2322ifeq ($(TCFFILE_IS_VALID ) ,1)
24- ifeq ($(VALID_CORE ) ,)
25- override CORE := $(TCFFILE_NAME )
26- override VALID_CORE := $(TCFFILE_NAME )
23+ ifeq ($(VALID_CUR_CORE ) ,)
24+ override CUR_CORE := $(TCFFILE_NAME )
25+ override VALID_CUR_CORE := $(TCFFILE_NAME )
2726endif
2827endif
2928
3029# # Check Core Configuration Supported
31- ifneq ($(TCFFILE_IS_VALID ) ,1)
32- ifeq ($(VALID_CORE ) ,)
30+ ifeq ($(TCFFILE_IS_VALID ) ,1)
31+ ifeq ($(VALID_CUR_CORE ) ,)
3332$(info BOARD $(BOARD)-$(BD_VER) Core Configurations - $(SUPPORTED_CORES) are supported)
34- $(error $(CORE ) is not supported in $(BOARD)-$(BD_VER), please check it!)
33+ $(error $(CUR_CORE ) is not supported in $(BOARD)-$(BD_VER), please check it!)
3534endif
3635endif
3736
38- CORE_DEFINES += -DCURRENT_CORE=$(VALID_CORE )
37+ CORE_DEFINES += -DCURRENT_CORE=$(VALID_CUR_CORE )
0 commit comments