rusefi/firmware/gen_config_board.sh

58 lines
1.8 KiB
Bash
Raw Normal View History

#!/bin/sh
#set -x
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"
if [ -z "$1" ]; then
echo "Board name parameter expected"
exit 1
fi
BOARDNAME=$1
SHORT_BOARDNAME=$2
echo "BOARDNAME=${BOARDNAME} SHORT_BOARDNAME=${SHORT_BOARDNAME}"
sh gen_signature.sh ${SHORT_BOARDNAME}
java -DSystemOut.name=gen_config_board \
-Drusefi.generator.lazyfile.enabled=true \
-cp ../java_tools/ConfigDefinition.jar \
com.rusefi.board_generator.BoardReader \
-board ${BOARDNAME} \
-firmware_path . \
-out tunerstudio \
-enumInputFile controllers/algo/rusefi_enums.h \
-enumInputFile controllers/algo/rusefi_hw_enums.h
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 TunerStudio config for ${BOARDNAME}"; exit 1; }
java -DSystemOut.name=gen_config_board \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/rusefi_config.txt \
2020-06-14 09:38:33 -07:00
-tool gen_config.sh \
-ts_destination tunerstudio \
-cache ${BOARDNAME} \
-cache_zip_file tunerstudio/cache.zip \
2020-06-14 09:38:33 -07:00
-firing_order controllers/algo/firing_order.h \
-ts_output_name rusefi_${BOARDNAME}.ini \
-signature tunerstudio/signature_${SHORT_BOARDNAME}.txt \
-signature_destination controllers/generated/signature_${SHORT_BOARDNAME}.h \
-prepend tunerstudio/${BOARDNAME}_prefix.txt \
2020-06-14 09:40:00 -07:00
-prepend config/boards/${BOARDNAME}/prepend.txt
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 TunerStudio config for ${BOARDNAME}"; exit 1; }
if [ -z "${TS_PATH}" ]; then
echo "TS_PATH not defined"
else
if [ -d "${TS_PATH}/dev_${BOARDNAME}/" ]; then
echo "This would automatically copy latest file to 'dev_${BOARDNAME}' TS project $TS_PATH"
cp -v tunerstudio/rusefi_microrusefi.ini ${TS_PATH}/dev_${BOARDNAME}/projectCfg/mainController.ini
fi
fi
exit 0