2020-07-09 07:27:20 -07:00
|
|
|
#!/bin/bash
|
2020-01-02 15:58:28 -08:00
|
|
|
|
2020-07-05 19:44:45 -07:00
|
|
|
# file gen_config_board.sh
|
|
|
|
|
2020-01-02 15:58:28 -08:00
|
|
|
#set -x
|
|
|
|
|
2020-07-05 19:39:55 -07:00
|
|
|
echo "This script reads rusefi_config.txt and produces firmware persistent configuration headers"
|
|
|
|
echo "the storage section of rusefiXXX.ini is updated as well"
|
2020-01-02 15:58:28 -08:00
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "Board name parameter expected"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
BOARDNAME=$1
|
2020-06-28 10:39:09 -07:00
|
|
|
SHORT_BOARDNAME=$2
|
2020-01-02 15:58:28 -08:00
|
|
|
|
2020-06-28 10:39:09 -07:00
|
|
|
echo "BOARDNAME=${BOARDNAME} SHORT_BOARDNAME=${SHORT_BOARDNAME}"
|
|
|
|
|
2020-07-09 07:27:20 -07:00
|
|
|
bash gen_signature.sh ${SHORT_BOARDNAME}
|
2020-01-02 15:58:28 -08:00
|
|
|
|
|
|
|
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 \
|
2020-07-05 20:09:43 -07:00
|
|
|
-yaml config/boards/${BOARDNAME}/mapping.yaml \
|
2020-01-02 15:58:28 -08:00
|
|
|
-firmware_path . \
|
2020-07-05 22:09:05 -07:00
|
|
|
-output_file tunerstudio/generated/${BOARDNAME}_prefix.txt \
|
2020-01-02 15:58:28 -08:00
|
|
|
-enumInputFile controllers/algo/rusefi_enums.h \
|
|
|
|
-enumInputFile controllers/algo/rusefi_hw_enums.h
|
|
|
|
|
2020-07-01 11:09:01 -07:00
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating TunerStudio config for ${BOARDNAME}"; exit 1; }
|
2020-01-02 15:58:28 -08:00
|
|
|
|
2020-07-05 21:29:30 -07:00
|
|
|
# work in progress: migrating to rusefi_${BUNDLE_NAME}.txt
|
|
|
|
java -DSystemOut.name=gen_config_board \
|
|
|
|
-jar ../java_tools/ConfigDefinition.jar \
|
|
|
|
-definition integration/rusefi_config.txt \
|
|
|
|
-tool gen_config.sh \
|
|
|
|
-ts_destination tunerstudio \
|
2020-07-05 21:48:43 -07:00
|
|
|
-cache ${SHORT_BOARDNAME} \
|
2020-07-05 22:01:30 -07:00
|
|
|
-cache_zip_file tunerstudio/generated/cache.zip \
|
2020-07-05 21:29:30 -07:00
|
|
|
-firing_order controllers/algo/firing_order.h \
|
2020-07-05 22:29:00 -07:00
|
|
|
-ts_output_name generated/rusefi_${SHORT_BOARDNAME}.ini \
|
2020-07-05 22:01:30 -07:00
|
|
|
-signature tunerstudio/generated/signature_${SHORT_BOARDNAME}.txt \
|
2020-07-05 21:29:30 -07:00
|
|
|
-signature_destination controllers/generated/signature_${SHORT_BOARDNAME}.h \
|
2020-08-14 12:56:59 -07:00
|
|
|
-enumInputFile controllers/algo/rusefi_enums.h \
|
2020-07-05 22:09:05 -07:00
|
|
|
-prepend tunerstudio/generated/${BOARDNAME}_prefix.txt \
|
2020-07-05 21:29:30 -07:00
|
|
|
-prepend config/boards/${BOARDNAME}/prepend.txt
|
|
|
|
|
2020-07-01 11:09:01 -07:00
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating TunerStudio config for ${BOARDNAME}"; exit 1; }
|
2020-01-02 15:58:28 -08:00
|
|
|
|
|
|
|
exit 0
|