From f351bb4c3a84a9148ae8d9d721c0a73e45cb6bef Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 1 May 2021 19:45:09 -0400 Subject: [PATCH] code duplication between hellen boards #2611 it has to get worse before it gets better --- firmware/config/boards/hellen/hellen121nissan/board.h | 2 +- firmware/config/boards/hellen/hellen121nissan/board.mk | 8 ++++---- .../boards/hellen/hellen121nissan/board_configuration.cpp | 6 +++--- .../hellen/hellen121nissan/compile_hellen121nissan.sh | 4 ++-- firmware/config/boards/hellen/hellen121vag/board.h | 2 +- firmware/config/boards/hellen/hellen121vag/board.mk | 8 ++++---- .../boards/hellen/hellen121vag/board_configuration.cpp | 6 +++--- .../boards/hellen/hellen121vag/compile_hellen121vag.sh | 4 ++-- firmware/config/boards/hellen/hellen128/board.h | 2 +- firmware/config/boards/hellen/hellen128/board.mk | 8 ++++---- .../boards/hellen/hellen128/board_configuration.cpp | 6 +++--- .../config/boards/hellen/hellen128/compile_hellen128.sh | 4 ++-- firmware/gen_config.sh | 2 +- 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/firmware/config/boards/hellen/hellen121nissan/board.h b/firmware/config/boards/hellen/hellen121nissan/board.h index f3f92e5fae..7d4373f9fd 100644 --- a/firmware/config/boards/hellen/hellen121nissan/board.h +++ b/firmware/config/boards/hellen/hellen121nissan/board.h @@ -30,7 +30,7 @@ /* * Board identifier. */ -#define BOARD_NAME "Hellen72" +#define BOARD_NAME "hellen121nissan" #define EFI_USB_AF 10U #define EFI_USB_SERIAL_DM GPIOA_11 diff --git a/firmware/config/boards/hellen/hellen121nissan/board.mk b/firmware/config/boards/hellen/hellen121nissan/board.mk index 0647814af2..a70ddc1e7c 100644 --- a/firmware/config/boards/hellen/hellen121nissan/board.mk +++ b/firmware/config/boards/hellen/hellen121nissan/board.mk @@ -1,10 +1,10 @@ # Combine the related files for a specific platform and MCU. # Target ECU board design -BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen72/board_configuration.cpp -BOARDINC = $(BOARDS_DIR)/hellen/hellen72 +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 Hellen72 +# Set this if you want a default engine type other than normal hellen121nissan ifeq ($(DEFAULT_ENGINE_TYPE),) DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB2 endif @@ -28,7 +28,7 @@ DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY # Add them all together -DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen72\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) +DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen121nissan\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DHAL_VSS_USE_PAL=TRUE # todo: is it broken? diff --git a/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp b/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp index 5f1e20d9de..273b09ca7b 100644 --- a/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp @@ -1,10 +1,10 @@ /** - * @file boards/hellen/hellen72/board_configuration.cpp + * @file boards/hellen/hellen121nissan/board_configuration.cpp * * - * @brief Configuration defaults for the Hellen72 board + * @brief Configuration defaults for the hellen121nissan board * - * See https://rusefi.com/s/hellen72 + * See https://rusefi.com/s/hellen121nissan * * @author andreika * @author Andrey Belomutskiy, (c) 2012-2020 diff --git a/firmware/config/boards/hellen/hellen121nissan/compile_hellen121nissan.sh b/firmware/config/boards/hellen/hellen121nissan/compile_hellen121nissan.sh index fba01bf769..2d4263e037 100644 --- a/firmware/config/boards/hellen/hellen121nissan/compile_hellen121nissan.sh +++ b/firmware/config/boards/hellen/hellen121nissan/compile_hellen121nissan.sh @@ -1,8 +1,8 @@ #!/bin/bash -export PROJECT_BOARD=hellen/hellen72 +export PROJECT_BOARD=hellen/hellen121nissan export PROJECT_CPU=ARCH_STM32F4 -export EXTRA_PARAMS="-DSHORT_BOARD_NAME=hellen72" +export EXTRA_PARAMS="-DSHORT_BOARD_NAME=hellen121nissan" cd .. bash ../common_make.sh diff --git a/firmware/config/boards/hellen/hellen121vag/board.h b/firmware/config/boards/hellen/hellen121vag/board.h index f3f92e5fae..58efaf6195 100644 --- a/firmware/config/boards/hellen/hellen121vag/board.h +++ b/firmware/config/boards/hellen/hellen121vag/board.h @@ -30,7 +30,7 @@ /* * Board identifier. */ -#define BOARD_NAME "Hellen72" +#define BOARD_NAME "hellen121vag" #define EFI_USB_AF 10U #define EFI_USB_SERIAL_DM GPIOA_11 diff --git a/firmware/config/boards/hellen/hellen121vag/board.mk b/firmware/config/boards/hellen/hellen121vag/board.mk index 0647814af2..10daa50498 100644 --- a/firmware/config/boards/hellen/hellen121vag/board.mk +++ b/firmware/config/boards/hellen/hellen121vag/board.mk @@ -1,10 +1,10 @@ # Combine the related files for a specific platform and MCU. # Target ECU board design -BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen72/board_configuration.cpp -BOARDINC = $(BOARDS_DIR)/hellen/hellen72 +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 Hellen72 +# Set this if you want a default engine type other than normal hellen121vag ifeq ($(DEFAULT_ENGINE_TYPE),) DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB2 endif @@ -28,7 +28,7 @@ DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY # Add them all together -DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen72\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) +DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen121vag\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DHAL_VSS_USE_PAL=TRUE # todo: is it broken? diff --git a/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp b/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp index 5f1e20d9de..1fa3396e34 100644 --- a/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp @@ -1,10 +1,10 @@ /** - * @file boards/hellen/hellen72/board_configuration.cpp + * @file boards/hellen/hellen121vag/board_configuration.cpp * * - * @brief Configuration defaults for the Hellen72 board + * @brief Configuration defaults for the hellen121vag board * - * See https://rusefi.com/s/hellen72 + * See https://rusefi.com/s/hellen121vag * * @author andreika * @author Andrey Belomutskiy, (c) 2012-2020 diff --git a/firmware/config/boards/hellen/hellen121vag/compile_hellen121vag.sh b/firmware/config/boards/hellen/hellen121vag/compile_hellen121vag.sh index fba01bf769..ee80a4ed7c 100644 --- a/firmware/config/boards/hellen/hellen121vag/compile_hellen121vag.sh +++ b/firmware/config/boards/hellen/hellen121vag/compile_hellen121vag.sh @@ -1,8 +1,8 @@ #!/bin/bash -export PROJECT_BOARD=hellen/hellen72 +export PROJECT_BOARD=hellen/hellen121vag export PROJECT_CPU=ARCH_STM32F4 -export EXTRA_PARAMS="-DSHORT_BOARD_NAME=hellen72" +export EXTRA_PARAMS="-DSHORT_BOARD_NAME=hellen121vag" cd .. bash ../common_make.sh diff --git a/firmware/config/boards/hellen/hellen128/board.h b/firmware/config/boards/hellen/hellen128/board.h index f3f92e5fae..614c4fadb7 100644 --- a/firmware/config/boards/hellen/hellen128/board.h +++ b/firmware/config/boards/hellen/hellen128/board.h @@ -30,7 +30,7 @@ /* * Board identifier. */ -#define BOARD_NAME "Hellen72" +#define BOARD_NAME "hellen128" #define EFI_USB_AF 10U #define EFI_USB_SERIAL_DM GPIOA_11 diff --git a/firmware/config/boards/hellen/hellen128/board.mk b/firmware/config/boards/hellen/hellen128/board.mk index 0647814af2..32e52f62cc 100644 --- a/firmware/config/boards/hellen/hellen128/board.mk +++ b/firmware/config/boards/hellen/hellen128/board.mk @@ -1,10 +1,10 @@ # Combine the related files for a specific platform and MCU. # Target ECU board design -BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen72/board_configuration.cpp -BOARDINC = $(BOARDS_DIR)/hellen/hellen72 +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 Hellen72 +# Set this if you want a default engine type other than normal hellen128 ifeq ($(DEFAULT_ENGINE_TYPE),) DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB2 endif @@ -28,7 +28,7 @@ DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT DDEFS += -DTS_NO_PRIMARY -DTS_NO_SECONDARY # Add them all together -DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen72\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) +DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"hellen128\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(LED_COMMUNICATION_BRAIN_PIN) DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DHAL_VSS_USE_PAL=TRUE # todo: is it broken? diff --git a/firmware/config/boards/hellen/hellen128/board_configuration.cpp b/firmware/config/boards/hellen/hellen128/board_configuration.cpp index 5f1e20d9de..0db6a89dfb 100644 --- a/firmware/config/boards/hellen/hellen128/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen128/board_configuration.cpp @@ -1,10 +1,10 @@ /** - * @file boards/hellen/hellen72/board_configuration.cpp + * @file boards/hellen/hellen128/board_configuration.cpp * * - * @brief Configuration defaults for the Hellen72 board + * @brief Configuration defaults for the hellen128 board * - * See https://rusefi.com/s/hellen72 + * See https://rusefi.com/s/hellen128 * * @author andreika * @author Andrey Belomutskiy, (c) 2012-2020 diff --git a/firmware/config/boards/hellen/hellen128/compile_hellen128.sh b/firmware/config/boards/hellen/hellen128/compile_hellen128.sh index fba01bf769..a98e1ec722 100644 --- a/firmware/config/boards/hellen/hellen128/compile_hellen128.sh +++ b/firmware/config/boards/hellen/hellen128/compile_hellen128.sh @@ -1,8 +1,8 @@ #!/bin/bash -export PROJECT_BOARD=hellen/hellen72 +export PROJECT_BOARD=hellen/hellen128 export PROJECT_CPU=ARCH_STM32F4 -export EXTRA_PARAMS="-DSHORT_BOARD_NAME=hellen72" +export EXTRA_PARAMS="-DSHORT_BOARD_NAME=hellen128" cd .. bash ../common_make.sh diff --git a/firmware/gen_config.sh b/firmware/gen_config.sh index 03b5465385..c6d24bbe59 100755 --- a/firmware/gen_config.sh +++ b/firmware/gen_config.sh @@ -16,7 +16,7 @@ bash gen_config_default.sh # firmware\tunerstudio\generated and firmware\controllers\generated folders # maybe one day we will automate but not yet # -for BOARD in "hellen/hellen72 hellen72" "hellen/hellen64_miataNA6_94 hellenNA6" "microrusefi mre_f7" "microrusefi mre_f4" "frankenso frankenso_na6" "prometheus prometheus_469" "prometheus prometheus_405" "proteus proteus_f7" "proteus proteus_f4"; do +for BOARD in "hellen/hellen128 hellen128" "hellen/hellen121vag hellen121vag" "hellen/hellen121nissan hellen121nissan" "hellen/hellen72 hellen72" "hellen/hellen64_miataNA6_94 hellenNA6" "microrusefi mre_f7" "microrusefi mre_f4" "frankenso frankenso_na6" "prometheus prometheus_469" "prometheus prometheus_405" "proteus proteus_f7" "proteus proteus_f4"; do BOARD_NAME="${BOARD% *}" BOARD_SHORT_NAME="${BOARD#* }" bash gen_config_board.sh $BOARD_NAME $BOARD_SHORT_NAME