fome-fw/firmware/gen_config.sh

60 lines
2.0 KiB
Bash
Raw Normal View History

#!/bin/sh
#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
sh 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 \
-cache . \
-cache_zip_file tunerstudio/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 \
-signature tunerstudio/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"
else
echo "This would automatically copy latest file to 'dev' TS project at ${TS_PATH}"
cp -v tunerstudio/rusefi.ini $TS_PATH/dev/projectCfg/mainController.ini
cp -v tunerstudio/rusefi_microrusefi.ini $TS_PATH/dev_mre/projectCfg/mainController.ini
fi
for BOARD in "microrusefi mre" "frankenso fra" "prometheus pth" "proteus pro"; do
BOARD_NAME="${BOARD% *}"
BOARD_SHORT_NAME="${BOARD#* }"
sh 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
sh gen_config.sh
exit 0