pass parameters instead of `export` in build scripts (#4081)

* no `export ...` mess

* frankenso NA6
This commit is contained in:
Matthew Kennedy 2022-04-18 16:05:27 -07:00 committed by GitHub
parent f8974c8f26
commit 68eb210a57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 45 additions and 142 deletions

4
firmware/config/boards/atlas/compile_atlas.sh Normal file → Executable file
View File

@ -1,5 +1,3 @@
#!/bin/bash
export PROJECT_BOARD=atlas
export PROJECT_CPU=ARCH_STM32H7
bash ../common_make.sh
bash ../common_make.sh atlas ARCH_STM32H7

View File

@ -3,8 +3,6 @@
echo "clean_env_variables.sh: Cleaning up so that no one inherits any of these values"
export DEBUG_LEVEL_OPT=""
export EXTRA_PARAMS=""
export PROJECT_BOARD=""
export PROJECT_CPU=""
export USE_BOOTLOADER=""
export VAR_DEF_ENGINE_TYPE=""
export LED_CRITICAL_ERROR_BRAIN_PIN=""

View File

@ -1,13 +1,16 @@
#!/bin/bash
PROJECT_BOARD=$1
PROJECT_CPU=$2
SCRIPT_NAME="common_make.sh"
echo "Entering $SCRIPT_NAME"
echo "Entering $SCRIPT_NAME with board $1 and CPU $2"
cd ../../..
mkdir .dep
# todo: start using env variable for number of threads or for '-r'
make -j$(nproc) -r
make -j$(nproc) -r PROJECT_BOARD=$PROJECT_BOARD PROJECT_CPU=$PROJECT_CPU
[ -e build/rusefi.hex ] || { echo "FAILED to compile by $SCRIPT_NAME with $PROJECT_BOARD $DEBUG_LEVEL_OPT and $EXTRA_PARAMS"; exit 1; }
if [ $USE_OPENBLT = "yes" ]; then
make openblt

View File

@ -1,5 +1,3 @@
#!/bin/bash
export PROJECT_BOARD=core8
export PROJECT_CPU=ARCH_STM32F4
bash ../common_make.sh
bash ../common_make.sh core8 ARCH_STM32F4

View File

@ -1,7 +1,5 @@
#!/bin/bash
export PROJECT_BOARD=f429-discovery
export PROJECT_CPU=ARCH_STM32F4
#-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"
bash ../common_make.sh
bash ../common_make.sh f429-discovery ARCH_STM32F4

View File

@ -5,5 +5,4 @@ FW_ID_ENV=frankensoNA6
export EXTRA_PARAMS="-DDUMMY -DSHORT_BOARD_NAME=frankenso_na6"
bash ../common_make.sh
bash ../common_make.sh f407-discovery ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/alphax-2chan
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/alphax-2chan ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/alphax-4chan
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/alphax-4chan ARCH_STM32F4

View File

@ -15,10 +15,8 @@ export EXTRA_PARAMS="-DDUMMY -D__USE_CMSIS\
TRIGGER_USE_ADC = yes
export BUILDDIR="build"
export PROJECT_BOARD="hellen/cypress"
export PROJECT_CPU="cypress"
export USE_FATFS="no"
export USE_BOOTLOADER="no"
export DEBUG_LEVEL_OPT="-O2"
bash ../common_make.sh
bash ../common_make.sh hellen/cypress cypress

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/harley81
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/harley81 ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen-nb1
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen-nb1 ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen121nissan
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen121nissan ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen121vag
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen121vag ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen128
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen128 ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen154hyundai
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen154hyundai ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen64_miataNA6_94
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen64_miataNA6_94 ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen72
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen72 ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen81
export PROJECT_CPU=ARCH_STM32H7
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen81 ARCH_STM32H7

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen88bmw
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen88bmw ARCH_STM32F4

View File

@ -1,7 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=hellen/hellen-nb1
export PROJECT_CPU=ARCH_STM32F4
cd ..
bash ../common_make.sh
bash ../common_make.sh hellen/hellen-nb1 ARCH_STM32F4

View File

@ -13,8 +13,6 @@ export "EXTRA_PARAMS=-DDUMMY -DCPU_MKE16F512VLH16 -DCPU_MKE16F512VLH16_cm4 -D__U
"
# set BUILDDIR=build_kinetis
export BUILDDIR=build
export PROJECT_BOARD=kinetis
export PROJECT_CPU=kinetis
export DEBUG_LEVEL_OPT="-O2"
export USE_FATFS=no
export USE_BOOTLOADER=no
@ -24,4 +22,4 @@ export USE_BOOTLOADER=no
# make -r -j4
bash ../common_make.sh
bash ../common_make.sh kinetis kinetis

View File

@ -1,8 +1,5 @@
#!/bin/bash
export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F4
# export USE_OPENBLT=yes
bash ../common_make.sh
bash ../common_make.sh microrusefi ARCH_STM32F4

View File

@ -1,11 +1,8 @@
#!/bin/bash
export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F4
export EXTRA_PARAMS="-DRAMDISK_INVALID"
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
# export USE_OPENBLT=yes
bash ../common_make.sh
bash ../common_make.sh microrusefi ARCH_STM32F4

View File

@ -1,7 +1,5 @@
#!/bin/bash
export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F4
export EXTRA_PARAMS="-DDUMMY \
-DHW_CHECK_MODE=TRUE \
-DANALOG_HW_CHECK_MODE=TRUE \
@ -24,6 +22,4 @@ 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"
bash ../common_make.sh
bash ../common_make.sh microrusefi ARCH_STM32F4

View File

@ -1,9 +1,7 @@
#!/bin/bash
export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F4
export EXTRA_PARAMS="-DIGNORE_FLASH_CONFIGURATION=TRUE"
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
bash ../common_make.sh
bash ../common_make.sh microrusefi ARCH_STM32F4

View File

@ -1,11 +1,9 @@
#!/bin/bash
export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F4
export EXTRA_PARAMS=-DDUMMY -DEFI_CANBUS_SLAVE=TRUE
export VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_MRE_SLAVE
bash ../common_make.sh
bash ../common_make.sh microrusefi ARCH_STM32F4

View File

@ -1,6 +1,3 @@
#!/bin/bash
export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F7
bash ../common_make.sh
bash ../common_make.sh microrusefi ARCH_STM32F7

View File

@ -1,7 +1,5 @@
#!/bin/bash
export PROJECT_BOARD=microrusefi
export PROJECT_CPU=ARCH_STM32F7
export VAR_DEF_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=MRE_BOARD_TEST"
bash ../common_make.sh
bash ../common_make.sh microrusefi ARCH_STM32F7

View File

@ -5,8 +5,6 @@
SCRIPT_NAME="compile_nucleo_f767.sh"
echo "Entering $SCRIPT_NAME"
export PROJECT_BOARD=nucleo_f767
export PROJECT_CPU=ARCH_STM32F7
export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \
-DFIRMWARE_ID=\\\"nucleo767\\\" \
@ -16,4 +14,4 @@ export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
export DEBUG_LEVEL_OPT="-O2"
bash ../common_make.sh
bash ../common_make.sh nucleo_f767 ARCH_STM32F7

View File

@ -2,8 +2,6 @@
# STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscilattor
export PROJECT_BOARD=nucleo_f767
export PROJECT_CPU=ARCH_STM32F7
export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \
-DFIRMWARE_ID=\\\"board767\\\" \
@ -16,5 +14,5 @@ export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
# Do not forget to comment out following line if looking to debug!
export DEBUG_LEVEL_OPT="-O2"
bash ../common_make.sh
bash ../common_make.sh nucleo_f767 ARCH_STM32F7

View File

@ -5,8 +5,6 @@
SCRIPT_NAME="compile_nucleo_h743.sh"
echo "Entering $SCRIPT_NAME"
export PROJECT_BOARD=nucleo_h743
export PROJECT_CPU=ARCH_STM32H7
export EXTRA_PARAMS="-DDUMMY \
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \
-DFIRMWARE_ID=\\\"nucleoH743\\\" \
@ -14,4 +12,4 @@ export EXTRA_PARAMS="-DDUMMY \
-DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14"
export DEBUG_LEVEL_OPT="-O2"
bash ../common_make.sh
bash ../common_make.sh nucleo_h743 ARCH_STM32H7

View File

@ -2,7 +2,5 @@
# STM32F405 version of the firmware for https://rusefi.com/forum/viewtopic.php?f=4&t=1215
export PROJECT_BOARD=prometheus/f405
bash ../common_make.sh
bash ../common_make.sh prometheus/f405 ARCH_STM32F4

View File

@ -2,8 +2,7 @@
# STM32F469 version of the firmware for https://rusefi.com/forum/viewtopic.php?f=4&t=1215
export PROJECT_BOARD=prometheus/f469
export USE_BOOTLOADER=yes
bash ../common_make.sh
bash ../common_make.sh prometheus/f469 ARCH_STM32F4

View File

@ -1,8 +1,5 @@
#!/bin/bash
export PROJECT_BOARD=proteus
export PROJECT_CPU=ARCH_STM32F4
# export USE_OPENBLT=yes
bash ../common_make.sh
bash ../common_make.sh proteus ARCH_STM32F4

View File

@ -1,11 +1,9 @@
#!/bin/bash
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"
export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
bash ../common_make.sh
bash ../common_make.sh proteus ARCH_STM32F4

View File

@ -1,8 +1,5 @@
#!/bin/bash
export PROJECT_BOARD=proteus
export PROJECT_CPU=ARCH_STM32F7
# export USE_OPENBLT=yes
bash ../common_make.sh
bash ../common_make.sh proteus ARCH_STM32F7

View File

@ -1,11 +1,9 @@
#!/bin/bash
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"
export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=PROTEUS_QC_TEST_BOARD
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
bash ../common_make.sh
bash ../common_make.sh proteus ARCH_STM32F7

View File

@ -1,6 +1,3 @@
#!/bin/bash
export PROJECT_BOARD=proteus
export PROJECT_CPU=ARCH_STM32H7
bash ../common_make.sh
bash ../common_make.sh proteus ARCH_STM32H7

View File

@ -2,8 +2,6 @@
# Use this script for Proteus v0.1/0.2 (boards where vbat was on ADC3)
export PROJECT_BOARD=proteus
export PROJECT_CPU=ARCH_STM32F7
export PROTEUS_LEGACY=TRUE
bash ../common_make.sh
bash ../common_make.sh proteus ARCH_STM32F7

View File

@ -1,9 +1,7 @@
#!/bin/bash
export PROJECT_BOARD=subaru_eg33
export PROJECT_CPU=ARCH_STM32F7
#-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 USE_OPENBLT=yes
bash ../common_make.sh
bash ../common_make.sh subaru_eg33 ARCH_STM32F7

View File

@ -1,6 +1,4 @@
#!/bin/bash
export PROJECT_BOARD=subaru_eg33
export PROJECT_CPU=ARCH_STM32F7
export EXTRA_PARAMS="-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 VAR_DEF_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=SUBARUEG33_DEFAULTS"
#echo $EXTRA_PARAMS
@ -8,4 +6,4 @@ export VAR_DEF_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=SUBARUEG33_DEFAULTS"
export USE_OPENBLT=yes
bash ../common_make.sh
bash ../common_make.sh subaru_eg33 ARCH_STM32F7

View File

@ -1,4 +1,3 @@
#!/bin/bash
export PROJECT_BOARD=tdg-pdm8
bash ../common_make.sh
bash ../common_make.sh tdg-pdm8 ARCH_STM32F4