This commit is contained in:
andreika-git 2024-02-11 23:02:26 +02:00 committed by rusefillc
parent 1cf81e3acf
commit e6d4ac2630
70 changed files with 77 additions and 98 deletions

View File

@ -5,4 +5,4 @@
SCRIPT_NAME="compile_at_start_f435.sh"
echo "Entering $SCRIPT_NAME"
bash ../common_make.sh at_start_f435 ARCH_AT32F4
bash ../common_make.sh config/boards/at_start_f435/meta-info.env

View File

@ -1,3 +1,3 @@
#!/bin/bash
bash ../common_make.sh atlas ARCH_STM32H7
bash ../common_make.sh config/boards/atlas/meta-info.env

View File

@ -5,10 +5,8 @@
# this script is just a facade for more flexible script which assume invocation from firmware directory
#
PROJECT_BOARD=$1
PROJECT_CPU=$2
BOARD_DIR=$3
BOARD_META_PATH=$1
cd ../../..
bash config/boards/common_script.sh $PROJECT_BOARD $PROJECT_CPU $BOARD_DIR
bash config/boards/common_script.sh $BOARD_META_PATH

View File

@ -2,8 +2,8 @@
# this script is supposed to be executed from within 'firmware' folder
PROJECT_BOARD=$1
PROJECT_CPU=$2
BOARD_META_PATH=$1
. config/boards/common_script_read_meta_env.inc $BOARD_META_PATH
# fail on error
set -e
@ -11,23 +11,14 @@ set -e
SCRIPT_NAME="common_script.sh"
# check if board dir is set
if [ ! -z "$3" ]; then
echo "Entering $SCRIPT_NAME with board [$1] at [$3] and CPU [$2]"
OPTIONAL_BOARD_DIR="BOARD_DIR=$3"
OPTIONAL_BOARD_DIR_BL="BOARD_DIR=../$3"
else
echo "Entering $SCRIPT_NAME with board [$1] and CPU [$2]"
OPTIONAL_BOARD_DIR=""
OPTIONAL_BOARD_DIR_BL=""
fi
echo "Entering $SCRIPT_NAME with board [$PROJECT_BOARD] and CPU [$PROJECT_CPU] at [$BOARD_DIR]"
mkdir -p .dep
# todo: start using env variable for number of threads or for '-r'
make -j$(nproc) -r PROJECT_BOARD=$PROJECT_BOARD PROJECT_CPU=$PROJECT_CPU $OPTIONAL_BOARD_DIR
make -j$(nproc) -r PROJECT_BOARD=$PROJECT_BOARD PROJECT_CPU=$PROJECT_CPU BOARD_DIR=$BOARD_DIR BOARD_META_PATH=$BOARD_META_PATH
[ -e build/rusefi.hex ] || { echo "FAILED to compile by $SCRIPT_NAME with $PROJECT_BOARD $DEBUG_LEVEL_OPT and $EXTRA_PARAMS"; exit 1; }
if [ ! -z "$4" ]; then
POST_BUILD_SCRIPT=$4
if [ ! -z $POST_BUILD_SCRIPT ]; then
echo "$SCRIPT_NAME: invoking post-build script"
source $POST_BUILD_SCRIPT
fi
@ -37,7 +28,7 @@ if [ "$USE_OPENBLT" = "yes" ]; then
# TODO: probably make/gcc do not like two separate projects (primary firmware and bootloader) co-existing in same folder structure?
rm -f pch/pch.h.gch/*
cd bootloader
make PROJECT_BOARD=$PROJECT_BOARD PROJECT_CPU=$PROJECT_CPU $OPTIONAL_BOARD_DIR_BL -j12
make PROJECT_BOARD=$PROJECT_BOARD PROJECT_CPU=$PROJECT_CPU BOARD_DIR=../$BOARD_DIR BOARD_META_PATH=../$BOARD_META_PATH -j12
cd ..
[ -e bootloader/blbuild/openblt_$PROJECT_BOARD.hex ] || { echo "FAILED to compile OpenBLT by $SCRIPT_NAME with $PROJECT_BOARD"; exit 1; }
fi

View File

@ -2,4 +2,4 @@
echo "Compiling for Cypress FM4 S6E2CxAH"
bash ../common_make.sh cypress custom_platform
bash ../common_make.sh config/boards/cypress/meta-info.env

View File

@ -1,3 +1,3 @@
#!/bin/bash
bash ../common_make.sh f407-discovery ARCH_STM32F4
bash ../common_make.sh config/boards/f407-discovery/meta-info.env

View File

@ -9,4 +9,4 @@ export EXTRA_PARAMS="\
-DRAMDISK_INVALID"
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
export INCLUDE_ELF=yes
bash ../common_make.sh f407-discovery ARCH_STM32F4
bash ../common_make.sh config/boards/f407-discovery/meta-info.env

View File

@ -2,4 +2,4 @@
#-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 f429-208 ARCH_STM32F4
bash ../common_make.sh config/boards/f429-208/meta-info.env

View File

@ -2,4 +2,4 @@
#-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 f429-discovery ARCH_STM32F4
bash ../common_make.sh config/boards/f429-discovery/meta-info.env

View File

@ -1,3 +1,3 @@
#!/bin/bash
bash ../common_make.sh f469-discovery ARCH_STM32F4
bash ../common_make.sh config/boards/f469-discovery/meta-info.env

View File

@ -9,4 +9,4 @@ FW_ID_ENV=frankensoNA6
# while humans want to use second cam input asap https://rusefi.com/forum/viewtopic.php?f=4&t=2343
#
bash ../common_make.sh frankenso_na6 ARCH_STM32F4
bash ../common_make.sh config/boards/frankenso_na6/meta-info.env

View File

@ -3,4 +3,4 @@
export USE_OPENBLT=yes
cd ..
bash ../common_make.sh alphax-2chan ARCH_STM32F4 config/boards/hellen/alphax-2chan
bash ../common_make.sh config/boards/hellen/alphax-2chan/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/alphax-4chan ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/alphax-4chan/meta-info_f4.env

View File

@ -3,4 +3,4 @@
export USE_OPENBLT=yes
cd ..
bash ../common_make.sh alphax-4chan ARCH_STM32F7 config/boards/hellen/alphax-4chan
bash ../common_make.sh config/boards/hellen/alphax-4chan/meta-info_f7.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/alphax-8chan ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/alphax-8chan-revA/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/alphax-8chan ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/alphax-8chan/meta-info_f4.env

View File

@ -4,4 +4,4 @@ export EXTRA_PARAMS="-DRAMDISK_INVALID -DEFI_LUA=FALSE"
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
export INCLUDE_ELF=yes
cd ..
bash ../common_make.sh hellen/alphax-8chan ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/alphax-8chan/meta-info_f4.env

View File

@ -3,4 +3,4 @@
# export USE_OPENBLT=yes
cd ..
bash ../common_make.sh alphax-8chan ARCH_STM32F7 config/boards/hellen/alphax-8chan
bash ../common_make.sh config/boards/hellen/alphax-8chan/meta-info_f7.env

View File

@ -1,7 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen-112-17 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen-112-17/meta-info.env

View File

@ -3,5 +3,6 @@
export EXTRA_PARAMS="-DRAMDISK_INVALID -DEFI_LUA=FALSE"
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
export INCLUDE_ELF=yes
cd ..
bash ../common_make.sh hellen/hellen-112-17 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen-112-17/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen-gm-e67 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen-gm-e67/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen-honda-k ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen-honda-k/meta-info.env

View File

@ -10,4 +10,4 @@ export EXTRA_PARAMS="\
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
export INCLUDE_ELF=yes
cd ..
bash ../common_make.sh hellen/hellen-honda-k ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen-honda-k/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen-nb1 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen-nb1/meta-info.env

View File

@ -3,4 +3,4 @@
# export USE_OPENBLT=yes
cd ..
bash ../common_make.sh hellen/hellen121nissan ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen121nissan/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen121vag ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen121vag/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen128 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen128/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen154hyundai ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen154hyundai/meta-info_f4.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen154hyundai ARCH_STM32F7
bash ../common_make.sh config/boards/hellen/hellen154hyundai/meta-info_f7.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen64_miataNA6_94 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen64_miataNA6_94/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen72 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen72/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellen81 ARCH_STM32H7
bash ../common_make.sh config/boards/hellen/hellen81/meta-info.env

View File

@ -6,4 +6,4 @@ export EXTRA_PARAMS="\
-DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE \
"
bash ../common_make.sh hellen/hellen88bmw ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen88bmw/meta-info.env

View File

@ -8,5 +8,4 @@ export EXTRA_PARAMS="\
-DSTM32_ADC_USE_ADC3=TRUE \
"
bash ../common_make.sh hellen/hellen88bmw ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellen88bmw/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/hellenNA8_96 ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/hellenNA8_96/meta-info.env

View File

@ -1,4 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/small-can-board ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/small-can-board/meta-info.env

View File

@ -10,4 +10,4 @@ export EXTRA_PARAMS="\
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
export INCLUDE_ELF=yes
cd ..
bash ../common_make.sh hellen/small-can-board ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/small-can-board/meta-info.env

View File

@ -1,7 +1,4 @@
#!/bin/bash
cd ..
bash ../common_make.sh hellen/uaefi ARCH_STM32F4
bash ../common_make.sh config/boards/hellen/uaefi/meta-info.env

View File

@ -2,4 +2,4 @@
echo "Compiling for Kinetis MKE16F512"
bash ../common_make.sh kinetis custom_platform
bash ../common_make.sh config/boards/kinetis/meta-info.env

View File

@ -5,4 +5,4 @@
SCRIPT_NAME="compile_m74_9.sh"
echo "Entering $SCRIPT_NAME"
bash ../common_make.sh m74_9 ARCH_AT32F4
bash ../common_make.sh config/boards/m74_9/meta-info.env

View File

@ -7,4 +7,4 @@
export USE_OPENBLT=yes
bash ../common_make.sh microrusefi ARCH_STM32F4
bash ../common_make.sh config/boards/microrusefi/meta-info_f4.env

View File

@ -5,4 +5,4 @@ export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
# export USE_OPENBLT=yes
export INCLUDE_ELF=yes
bash ../common_make.sh microrusefi ARCH_STM32F4
bash ../common_make.sh config/boards/microrusefi/meta-info_f4.env

View File

@ -23,4 +23,4 @@ export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=engine_type_e::MRE_BOARD_NEW_TE
# this QC configuration is used to assert our status with debug info
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
bash ../common_make.sh microrusefi ARCH_STM32F4
bash ../common_make.sh config/boards/microrusefi/meta-info_f4.env

View File

@ -2,4 +2,4 @@
# somehow OpenBLT is not compatible with custom MRE https://rusefi.com/forum/viewtopic.php?p=47085#p47085
bash ../common_make.sh microrusefi ARCH_STM32F4
bash ../common_make.sh config/boards/microrusefi/meta-info_f4.env

View File

@ -4,4 +4,4 @@ export EXTRA_PARAMS="-DIGNORE_FLASH_CONFIGURATION=TRUE"
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
bash ../common_make.sh microrusefi ARCH_STM32F4
bash ../common_make.sh config/boards/microrusefi/meta-info_f4.env

View File

@ -4,6 +4,4 @@ export EXTRA_PARAMS=-DDUMMY -DEFI_CANBUS_SLAVE=TRUE
export VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=engine_type_e::BMW_M73_MRE_SLAVE
bash ../common_make.sh microrusefi ARCH_STM32F4
bash ../common_make.sh config/boards/microrusefi/meta-info_f4.env

View File

@ -1,3 +1,3 @@
#!/bin/bash
bash ../common_make.sh microrusefi ARCH_STM32F7
bash ../common_make.sh config/boards/microrusefi/meta-info_f7.env

View File

@ -2,4 +2,4 @@
export VAR_DEF_ENGINE_TYPE="-DDEFAULT_ENGINE_TYPE=engine_type_e::MRE_BOARD_TEST"
bash ../common_make.sh microrusefi ARCH_STM32F7
bash ../common_make.sh config/boards/microrusefi/meta-info_f7.env

View File

@ -1,3 +1,3 @@
#!/bin/bash
bash ../common_make.sh nucleo_f413 ARCH_STM32F4
bash ../common_make.sh config/boards/nucleo_f413/meta-info.env

View File

@ -5,4 +5,4 @@
SCRIPT_NAME="compile_nucleo_f429.sh"
echo "Entering $SCRIPT_NAME"
bash ../common_make.sh nucleo_f429 ARCH_STM32F4
bash ../common_make.sh config/boards/nucleo_f429/meta-info.env

View File

@ -15,4 +15,4 @@ export EXTRA_PARAMS="-DSTM32F767xx \
-DEFI_ENABLE_ASSERTS=FALSE \
-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"
bash ../common_make.sh nucleo_f767 ARCH_STM32F7
bash ../common_make.sh config/boards/nucleo_f767/meta-info.env

View File

@ -19,4 +19,4 @@ export EXTRA_PARAMS="-DEFI_LUA=FALSE"
export DEBUG_LEVEL_OPT="-O0 -ggdb -g -Wl,--defsym=FLASH_SIZE=768k"
export INCLUDE_ELF=yes
bash ../common_make.sh nucleo_f767 ARCH_STM32F7
bash ../common_make.sh config/boards/nucleo_f767/meta-info.env

View File

@ -15,5 +15,4 @@ export EXTRA_PARAMS="-DSTM32F767xx \
-DEFI_ENABLE_ASSERTS=FALSE \
-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"
bash ../common_make.sh nucleo_f767 ARCH_STM32F7
bash ../common_make.sh config/boards/nucleo_f767/meta-info.env

View File

@ -5,4 +5,4 @@
SCRIPT_NAME="compile_nucleo_h743.sh"
echo "Entering $SCRIPT_NAME"
bash ../common_make.sh nucleo_h743 ARCH_STM32H7
bash ../common_make.sh config/boards/nucleo_h743/meta-info.env

View File

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

View File

@ -2,4 +2,4 @@
# STM32F469 version of the firmware for https://rusefi.com/forum/viewtopic.php?f=4&t=1215
bash ../common_make.sh prometheus/f469 ARCH_STM32F4
bash ../common_make.sh config/boards/prometheus/f469/meta-info.env

View File

@ -2,4 +2,4 @@
export USE_OPENBLT=yes
bash ../common_make.sh proteus ARCH_STM32F4
bash ../common_make.sh config/boards/proteus/meta-info_f4.env

View File

@ -17,4 +17,4 @@ export EXTRA_PARAMS="\
-DRAMDISK_INVALID"
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
export INCLUDE_ELF=yes
bash ../common_make.sh proteus ARCH_STM32F4
bash ../common_make.sh config/boards/proteus/meta-info_f4.env

View File

@ -6,4 +6,4 @@ export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=engine_type_e::PROTEUS_QC_TEST_
# export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
bash ../common_make.sh proteus ARCH_STM32F4
bash ../common_make.sh config/boards/proteus/meta-info_f4.env

View File

@ -3,4 +3,4 @@
export USE_OPENBLT=yes
export DEBUG_LEVEL_OPT="-Os -ggdb -g"
bash ../common_make.sh proteus ARCH_STM32F7
bash ../common_make.sh config/boards/proteus/meta-info_f7.env

View File

@ -3,4 +3,4 @@
export EXTRA_PARAMS="-DEFI_LUA=FALSE"
export DEBUG_LEVEL_OPT="-O0 -ggdb -g -Wl,--defsym=FLASH_SIZE=768k"
export INCLUDE_ELF=yes
bash ../common_make.sh proteus ARCH_STM32F7
bash ../common_make.sh config/boards/proteus/meta-info_f7.env

View File

@ -6,4 +6,4 @@ export VAR_DEF_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=engine_type_e::PROTEUS_QC_TEST_
export DEBUG_LEVEL_OPT="-Os -ggdb -g"
bash ../common_make.sh proteus ARCH_STM32F7
bash ../common_make.sh config/boards/proteus/meta-info_f7.env

View File

@ -2,4 +2,4 @@
# export USE_OPENBLT=yes
bash ../common_make.sh proteus ARCH_STM32H7
bash ../common_make.sh config/boards/proteus/meta-info_h7.env

View File

@ -2,4 +2,4 @@
export DEBUG_LEVEL_OPT="-O0 -ggdb -g"
export INCLUDE_ELF=yes
bash ../common_make.sh proteus ARCH_STM32H7
bash ../common_make.sh config/boards/proteus/meta-info_h7.env

View File

@ -4,4 +4,4 @@
export PROTEUS_LEGACY=TRUE
bash ../common_make.sh proteus ARCH_STM32F7
bash ../common_make.sh config/boards/proteus/meta-info_f7.env

View File

@ -2,4 +2,4 @@
export EXTRA_PARAMS="-DDUMMY"
bash ../common_make.sh s105 ARCH_STM32F4
bash ../common_make.sh config/boards/s105/meta-info.env

View File

@ -9,4 +9,4 @@
export USE_OPENBLT=yes
bash ../common_make.sh subaru_eg33 ARCH_STM32F7
bash ../common_make.sh config/boards/subaru_eg33/meta-info.env

View File

@ -10,4 +10,4 @@
# This is no-bootloader version
#export USE_OPENBLT=yes
bash ../common_make.sh subaru_eg33 ARCH_STM32F7
bash ../common_make.sh config/boards/subaru_eg33/meta-info.env

View File

@ -1,3 +1,3 @@
#!/bin/bash
bash ../common_make.sh tdg-pdm8 ARCH_STM32F4
bash ../common_make.sh config/boards/tdg-pdm8/meta-info.env

View File

@ -1,3 +1,3 @@
#!/bin/bash
bash ../common_make.sh test-build-guards ARCH_STM32F4
bash ../common_make.sh config/boards/test-build-guards/meta-info.env