refactoring: using VAR_DEF_ENGINE_TYPE bash variable for DEFAULT_ENGINE_TYPE Makefile variable
This commit is contained in:
parent
b4aec7fa09
commit
850bb9c1eb
|
@ -6,7 +6,7 @@ export EXTRA_PARAMS=""
|
|||
export PROJECT_BOARD=""
|
||||
export PROJECT_CPU=""
|
||||
export USE_BOOTLOADER=""
|
||||
export DEFAULT_ENGINE_TYPE=""
|
||||
export VAR_DEF_ENGINE_TYPE=""
|
||||
export LED_CRITICAL_ERROR_BRAIN_PIN=""
|
||||
export BUILDDIR=""
|
||||
export DEBUG_LEVEL_OPT=""
|
||||
|
|
|
@ -4,9 +4,8 @@ BOARDCPPSRC = $(PROJECT_DIR)/config/boards/f407-discovery/board_extra.cpp
|
|||
# MCU defines
|
||||
DDEFS += -DSTM32F407xx
|
||||
|
||||
# 'DEFAULT_ENGINE_TYPE' env variable is used to define DEFAULT_ENGINE_TYPE macro, confusing name reuse!
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=DEFAULT_FRANKENSO
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=DEFAULT_FRANKENSO
|
||||
endif
|
||||
|
||||
# here we use different names for env variable and macro name in order to reduce confusion. overall this is about Frankenso builds defining FIRMWARE_ID
|
||||
|
|
|
@ -5,14 +5,14 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen-nb1/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen-nb1
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen-nb1
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB1
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB1
|
||||
endif
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellenNB1\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellenNB1\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen121nissan/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen121nissan
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen121nissan
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_121_NISSAN_6_CYL
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_121_NISSAN_6_CYL
|
||||
endif
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
@ -15,7 +15,7 @@ DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|||
DDEFS += -DTS_NO_PRIMARY=1
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen121nissan\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen121nissan\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen121vag/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen121vag
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen121vag
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_121_VAG_4_CYL
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_121_VAG_4_CYL
|
||||
endif
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
@ -15,7 +15,7 @@ DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|||
DDEFS += -DTS_NO_PRIMARY=1
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen121vag\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen121vag\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen128/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen128
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen128
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_128_MERCEDES_4_CYL
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_128_MERCEDES_4_CYL
|
||||
endif
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|||
DDEFS += -DTS_NO_PRIMARY=1
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen128\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen128\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen154hyundai/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen154hyundai
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen121nissan
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_154_HYUNDAI_COUPE_BK2
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_154_HYUNDAI_COUPE_BK2
|
||||
endif
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
@ -15,7 +15,7 @@ DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|||
DDEFS += -DTS_NO_PRIMARY=1
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen154hyundai\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen154hyundai\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen64_miataNA6_94/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen64_miataNA6_94
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen64_miataNA6_94
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NA6
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NA6
|
||||
endif
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
@ -15,7 +15,7 @@ DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|||
DDEFS += -DTS_NO_PRIMARY=1
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellenNA6\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellenNA6\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen72/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen72
|
||||
|
||||
# Set this if you want a default engine type other than normal Hellen72
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB2
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB2
|
||||
endif
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|||
DDEFS += -DTS_NO_PRIMARY=1
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen72\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen72\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen88bmw/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellen88bmw
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen88bmw
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_88_BMW
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_88_BMW
|
||||
endif
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|||
DDEFS += -DTS_NO_PRIMARY=1
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen88bmw\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen88bmw\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@ BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellenNA8_96/board_configuration.cpp
|
|||
BOARDINC = $(BOARDS_DIR)/hellen/hellenNA8_96
|
||||
|
||||
# Set this if you want a default engine type other than normal hellen-nb1
|
||||
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
||||
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NA8_96
|
||||
ifeq ($(VAR_DEF_ENGINE_TYPE),)
|
||||
VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NA8_96
|
||||
endif
|
||||
|
||||
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
||||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellenNB1\" $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += -DFIRMWARE_ID=\"hellenNB1\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += -DHAL_TRIGGER_USE_PAL=TRUE
|
||||
include $(BOARDS_DIR)/hellen/hellen-common144.mk
|
||||
|
|
|
@ -4,13 +4,11 @@ cd ../../..
|
|||
set PROJECT_BOARD=microrusefi
|
||||
set PROJECT_CPU=ARCH_STM32F7
|
||||
|
||||
set DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_F
|
||||
set VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_F
|
||||
set LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14
|
||||
|
||||
set EXTRA_PARAMS=-DDUMMY ^
|
||||
-DEFI_COMMUNICATION_PIN=GPIOB_7
|
||||
|
||||
rem -DDEFAULT_ENGINE_TYPE=MRE_BOARD_TEST
|
||||
|
||||
call config/boards/common_make.bat
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ DDEFS += -DEFI_CJ125=FALSE -DBOARD_L9779_COUNT=0 -DEFI_HD44780_LCD=FALSE -DEFI_L
|
|||
|
||||
# Add them all together
|
||||
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"microRusEFI\" $(LED_CRITICAL_ERROR_BRAIN_PIN) $(EFI_CONSOLE_TTL_PINS) -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
DDEFS += $(DEFAULT_ENGINE_TYPE)
|
||||
DDEFS += $(VAR_DEF_ENGINE_TYPE)
|
||||
|
||||
# We are running on microRusEFI hardware!
|
||||
DDEFS += -DHW_MICRO_RUSEFI=1
|
||||
|
|
|
@ -4,7 +4,7 @@ export PROJECT_BOARD=microrusefi
|
|||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DANALOG_HW_CHECK_MODE=TRUE -DHW_CHECK_ALWAYS_STIMULATE=TRUE -DSHORT_BOARD_NAME=mre_f4 -DRAMDISK_INVALID"
|
||||
|
||||
export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=MRE_BOARD_NEW_TEST
|
||||
export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=MRE_BOARD_NEW_TEST
|
||||
|
||||
# this QC configuration is used to assert our status with debug info
|
||||
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
|
||||
|
|
|
@ -4,7 +4,7 @@ export PROJECT_BOARD=microrusefi
|
|||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS=-DDUMMY -DEFI_CANBUS_SLAVE=TRUE -DSHORT_BOARD_NAME=mre_f4
|
||||
|
||||
export DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_MRE_SLAVE
|
||||
export VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_MRE_SLAVE
|
||||
|
||||
bash ../common_make.sh
|
||||
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
export PROJECT_BOARD=microrusefi
|
||||
export PROJECT_CPU=ARCH_STM32F7
|
||||
export EXTRA_PARAMS=-DSHORT_BOARD_NAME=mre_f7
|
||||
export DEFAULT_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=MRE_BOARD_TEST"
|
||||
export VAR_DEF_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=MRE_BOARD_TEST"
|
||||
|
||||
bash ../common_make.sh
|
||||
|
|
|
@ -23,6 +23,5 @@ endif
|
|||
ifeq ($(PROMETHEUS_BOARD),405)
|
||||
DDEFS += -DFIRMWARE_ID=\"prometeus405\"
|
||||
else
|
||||
# Override DEFAULT_ENGINE_TYPE
|
||||
DDEFS += -DFIRMWARE_ID=\"prometeus469\"
|
||||
endif
|
||||
|
|
|
@ -4,7 +4,7 @@ export PROJECT_BOARD=proteus
|
|||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS="-DVR_HW_CHECK_MODE=TRUE -DHW_CHECK_MODE=TRUE -DHW_CHECK_SD=TRUE -DHW_CHECK_ALWAYS_STIMULATE=TRUE -DSHORT_BOARD_NAME=proteus_f4"
|
||||
|
||||
export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
|
||||
export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
|
||||
|
||||
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ export PROJECT_BOARD=proteus
|
|||
export PROJECT_CPU=ARCH_STM32F7
|
||||
export EXTRA_PARAMS="-DVR_HW_CHECK_MODE=TRUE -DHW_CHECK_MODE=TRUE -DHW_CHECK_SD=TRUE -DHW_CHECK_ALWAYS_STIMULATE=TRUE -DSHORT_BOARD_NAME=proteus_f7"
|
||||
|
||||
export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
|
||||
export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
|
||||
|
||||
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
export PROJECT_BOARD=subaru_eg33
|
||||
export PROJECT_CPU=ARCH_STM32F7
|
||||
export EXTRA_PARAMS="-DSHORT_BOARD_NAME=subaru_eg33_f7 -DDUMMY -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
|
||||
export DEFAULT_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=SUBARUEG33_DEFAULTS"
|
||||
export VAR_DEF_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=SUBARUEG33_DEFAULTS"
|
||||
#echo $EXTRA_PARAMS
|
||||
#export DEBUG_LEVEL_OPT="-O0"
|
||||
|
||||
|
|
Loading…
Reference in New Issue