reducing duplication
removing unused (?) defines removing value space overlap between PROJECT_BOARD and PROJECT_CPU
This commit is contained in:
parent
8b44c85dd4
commit
77ede53ef5
|
@ -172,10 +172,6 @@ ifeq ($(LDSCRIPT),)
|
||||||
LDSCRIPT= config/stm32f4ems/STM32F407xG.ld
|
LDSCRIPT= config/stm32f4ems/STM32F407xG.ld
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROJECT_CPU),)
|
|
||||||
PROJECT_CPU=st_stm32f4
|
|
||||||
endif
|
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
CSRC = $(STARTUPSRC) \
|
CSRC = $(STARTUPSRC) \
|
||||||
|
|
|
@ -31,17 +31,17 @@ HW_LAYER_EMS_CPP = $(HW_LAYER_EGT_CPP) \
|
||||||
$(PROJECT_DIR)/hw_layer/cdm_ion_sense.cpp \
|
$(PROJECT_DIR)/hw_layer/cdm_ion_sense.cpp \
|
||||||
$(PROJECT_DIR)/hw_layer/backup_ram.cpp
|
$(PROJECT_DIR)/hw_layer/backup_ram.cpp
|
||||||
|
|
||||||
ifeq ($(PROJECT_CPU),ST_STM32F7)
|
ifeq ($(PROJECT_CPU),ARCH_STM32F7)
|
||||||
HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f7/stm32f7xx_hal_flash.c \
|
HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f7/stm32f7xx_hal_flash.c \
|
||||||
$(PROJECT_DIR)/hw_layer/ports/stm32/stm32f7/stm32f7xx_hal_flash_ex.c
|
$(PROJECT_DIR)/hw_layer/ports/stm32/stm32f7/stm32f7xx_hal_flash_ex.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROJECT_CPU),ST_STM32F4)
|
ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
||||||
HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash.c \
|
HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash.c \
|
||||||
$(PROJECT_DIR)/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash_ex.c
|
$(PROJECT_DIR)/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash_ex.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROJECT_CPU),ST_STM32F1)
|
ifeq ($(PROJECT_CPU),ARCH_STM32F1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
-include $(PROJECT_DIR)/hw_layer/$(CPU_HWLAYER)/hw_ports.mk
|
-include $(PROJECT_DIR)/hw_layer/$(CPU_HWLAYER)/hw_ports.mk
|
||||||
|
|
|
@ -8,32 +8,30 @@ $(error Please run 'make' again)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROJECT_BOARD),)
|
ifeq ($(PROJECT_BOARD),)
|
||||||
PROJECT_BOARD = ST_STM32F4
|
PROJECT_BOARD = st_stm32f4
|
||||||
endif
|
endif
|
||||||
DDEFS += -D$(PROJECT_BOARD)
|
|
||||||
|
|
||||||
ifeq ($(PROJECT_CPU),)
|
ifeq ($(PROJECT_CPU),)
|
||||||
PROJECT_CPU = ST_STM32F4
|
PROJECT_CPU = ARCH_STM32F4
|
||||||
endif
|
endif
|
||||||
DDEFS += -D$(PROJECT_CPU)
|
|
||||||
|
|
||||||
-include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/config.mk
|
-include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/config.mk
|
||||||
|
|
||||||
# CPU-dependent defs
|
# CPU-dependent defs
|
||||||
ifeq ($(PROJECT_CPU),ST_STM32F7)
|
ifeq ($(PROJECT_CPU),ARCH_STM32F7)
|
||||||
CPU_STARTUP = startup_stm32f7xx.mk
|
CPU_STARTUP = startup_stm32f7xx.mk
|
||||||
CPU_PLATFORM = STM32F7xx/platform.mk
|
CPU_PLATFORM = STM32F7xx/platform.mk
|
||||||
CPU_HWLAYER = ports/stm32/stm32f7
|
CPU_HWLAYER = ports/stm32/stm32f7
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PROJECT_CPU),ST_STM32F4)
|
ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
||||||
CPU_STARTUP = startup_stm32f4xx.mk
|
CPU_STARTUP = startup_stm32f4xx.mk
|
||||||
CPU_PLATFORM = STM32F4xx/platform.mk
|
CPU_PLATFORM = STM32F4xx/platform.mk
|
||||||
CPU_HWLAYER = ports/stm32/stm32f4
|
CPU_HWLAYER = ports/stm32/stm32f4
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(PROJECT_CPU),ST_STM32F1)
|
ifeq ($(PROJECT_CPU),ARCH_STM32F1)
|
||||||
CPU_STARTUP = startup_stm32f1xx.mk
|
CPU_STARTUP = startup_stm32f1xx.mk
|
||||||
CPU_PLATFORM = STM32F1xx/platform.mk
|
CPU_PLATFORM = STM32F1xx/platform.mk
|
||||||
CPU_HWLAYER = ports/stm32/stm32f1
|
CPU_HWLAYER = ports/stm32/stm32f1
|
||||||
|
|
Loading…
Reference in New Issue