rusefi-1/firmware/gen_config.sh

64 lines
2.4 KiB
Bash
Raw Normal View History

#!/bin/bash
#set -x
#TS_PATH="/home/<user>/TunerStudioProjects/"
echo "This batch files reads rusefi_config.txt and produses firmware persistent configuration headers"
echo "the storage section of rusefi.ini is updated as well"
rm gen_config.log
rm gen_config_board.log
mkdir build
bash gen_signature.sh all
2020-06-19 07:45:00 -07:00
java -DSystemOut.name=gen_config \
-Drusefi.generator.lazyfile.enabled=true \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/rusefi_config.txt \
-romraider integration \
-ts_destination tunerstudio \
-ts_output_name generated/rusefi.ini \
-cache . \
2020-07-05 22:01:30 -07:00
-cache_zip_file tunerstudio/generated/cache.zip \
2020-06-19 07:45:00 -07:00
-with_c_defines false \
-initialize_to_zero false \
-tool gen_config.sh \
-c_defines controllers/generated/rusefi_generated.h \
-firing_order controllers/algo/firing_order.h \
-c_destination controllers/generated/engine_configuration_generated_structures.h \
-c_fsio_constants controllers/generated/fsio_enums_generated.def \
-c_fsio_getters controllers/generated/fsio_getters.def \
-c_fsio_names controllers/generated/fsio_names.def \
-c_fsio_strings controllers/generated/fsio_strings.def \
2020-07-03 11:53:47 -07:00
-java_destination ../java_console/models/src/main/java/com/rusefi/config/generated/Fields.java \
2020-07-05 22:01:30 -07:00
-signature tunerstudio/generated/signature_all.txt \
-signature_destination controllers/generated/signature_all.h \
2020-06-19 07:45:00 -07:00
-romraider_destination ../java_console/rusefi.xml
Convert jenkins build_extra_bundles scripts to sh (#1554) * Add checkout * remove empty with statement * Actually we do need push depth * convert build_working_folder * convert prepare_bundle * fixed extension * fixed closing bracket * fixed comparison and assignments * no comment * convert compile_and_upload and clean * convert build_simulator * Finish converting build_working_folder * convert build_java_console * Add hashbangs * remove findcyg instruction * changed paths * remove call * add path * fixed script names * add prams * fix cd * convert clean_env_variables * convert common_make.sh * Added linux hex2dfu binary * add file extension to linux hex2dfu * add file extension to linux hex2dfu * remove spurious paren * fixed board name * convert compile-frankenso-na6 * convert compile-frankenso-pal * add hashbang * convert compile-kinetis * convert compile-mre-f4 * convert compile-mre-f4-hardware-QC-special-build * convert compile-mre-f4-slave * convert compile-mre-f7 * convert compile-mre-f7-test * switch to underscores * converting boards to sh * convert prometheus * convert proteus * fixed path * switch to underscores * chmod and add extension * add quotes * Add check for Windows * Add chmod * fix script name * fix error checking * quote vars * remove checking from batch shims * fix typo * change error checking to support nix style error codes * switch to 1 retval * cd back to firmware * Add escapes * change from cd to rel path * add p flags to mkdir Co-authored-by: David Holdeman <David Holdeman>
2020-07-01 11:09:01 -07:00
[ $? -eq 0 ] || { echo "ERROR generating default"; exit 1; }
if [ -z "${TS_PATH}" ]; then
echo "TS_PATH not defined"
# it's nice to have default location
TS_PATH="${HOMEDRIVE}${HOMEPATH}\Documents\TunerStudioProjects"
fi
echo "This would automatically copy latest file to 'dev' TS projects to ${TS_PATH}"
cp -v tunerstudio/generated/rusefi.ini $TS_PATH/dev/projectCfg/mainController.ini
cp -v tunerstudio/generated/rusefi_mre_f4.ini $TS_PATH/mre_f4/projectCfg/mainController.ini
2020-07-05 21:48:43 -07:00
for BOARD in "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
Convert jenkins build_extra_bundles scripts to sh (#1554) * Add checkout * remove empty with statement * Actually we do need push depth * convert build_working_folder * convert prepare_bundle * fixed extension * fixed closing bracket * fixed comparison and assignments * no comment * convert compile_and_upload and clean * convert build_simulator * Finish converting build_working_folder * convert build_java_console * Add hashbangs * remove findcyg instruction * changed paths * remove call * add path * fixed script names * add prams * fix cd * convert clean_env_variables * convert common_make.sh * Added linux hex2dfu binary * add file extension to linux hex2dfu * add file extension to linux hex2dfu * remove spurious paren * fixed board name * convert compile-frankenso-na6 * convert compile-frankenso-pal * add hashbang * convert compile-kinetis * convert compile-mre-f4 * convert compile-mre-f4-hardware-QC-special-build * convert compile-mre-f4-slave * convert compile-mre-f7 * convert compile-mre-f7-test * switch to underscores * converting boards to sh * convert prometheus * convert proteus * fixed path * switch to underscores * chmod and add extension * add quotes * Add check for Windows * Add chmod * fix script name * fix error checking * quote vars * remove checking from batch shims * fix typo * change error checking to support nix style error codes * switch to 1 retval * cd back to firmware * Add escapes * change from cd to rel path * add p flags to mkdir Co-authored-by: David Holdeman <David Holdeman>
2020-07-01 11:09:01 -07:00
[ $? -eq 0 ] || { echo "ERROR generating board $BOARD_NAME $BOARD_SHORT_NAME"; exit 1; }
done
cd config/boards/kinetis/config
bash gen_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }
exit 0