2020-01-02 15:58:28 -08:00
|
|
|
#!/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
|
|
|
|
|
|
|
|
echo "BOARDNAME=${BOARDNAME}"
|
|
|
|
|
|
|
|
java -DSystemOut.name=gen_config_board \
|
2020-06-27 11:23:51 -07:00
|
|
|
-Drusefi.generator.lazyfile.enabled=true \
|
2020-06-16 11:12:27 -07:00
|
|
|
-cp ../java_tools/ConfigDefinition.jar \
|
2020-01-02 15:58:28 -08:00
|
|
|
com.rusefi.board_generator.BoardReader \
|
|
|
|
-board ${BOARDNAME} \
|
|
|
|
-firmware_path . \
|
|
|
|
-out tunerstudio \
|
|
|
|
-enumInputFile controllers/algo/rusefi_enums.h \
|
|
|
|
-enumInputFile controllers/algo/rusefi_hw_enums.h
|
|
|
|
|
|
|
|
[ $? -eq 0 ] || (echo "ERROR generating TunerStudio config for ${BOARDNAME}"; exit $?)
|
|
|
|
|
|
|
|
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 \
|
2020-01-02 15:58:28 -08:00
|
|
|
-ts_destination tunerstudio \
|
2020-06-28 07:00:11 -07:00
|
|
|
-cache tunerstudio/cache/${BOARDNAME} \
|
2020-06-14 09:38:33 -07:00
|
|
|
-firing_order controllers/algo/firing_order.h \
|
2020-01-02 15:58:28 -08:00
|
|
|
-ts_output_name rusefi_${BOARDNAME}.ini \
|
|
|
|
-prepend tunerstudio/${BOARDNAME}_prefix.txt \
|
2020-06-14 09:40:00 -07:00
|
|
|
-prepend config/boards/${BOARDNAME}/prepend.txt
|
2020-01-02 15:58:28 -08:00
|
|
|
|
|
|
|
[ $? -eq 0 ] || (echo "ERROR generating TunerStudio config for ${BOARDNAME}"; exit $?)
|
|
|
|
|
|
|
|
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
|