scripts: add gen_config, gen_config_board and gen_enum_to_string for Linux (#1081)
This commit is contained in:
parent
91be67f01c
commit
4aba7756e2
|
@ -0,0 +1,57 @@
|
|||
#!/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
|
||||
|
||||
echo "lazy is broken - TS input is not considered a change"
|
||||
rm build/config.gen
|
||||
|
||||
mkdir build
|
||||
|
||||
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 \
|
||||
-with_c_defines false \
|
||||
-initialize_to_zero false \
|
||||
-c_defines controllers/generated/rusefi_generated.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 \
|
||||
-java_destination ../java_console/models/src/com/rusefi/config/generated/Fields.java \
|
||||
-romraider_destination ../java_console/rusefi.xml \
|
||||
-skip build/config.gen
|
||||
|
||||
[ $? -eq 0 ] || (echo "ERROR generating"; exit $?)
|
||||
|
||||
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
|
||||
|
||||
./gen_config_board.sh microrusefi
|
||||
[ $? -eq 0 ] || (echo "ERROR generating microrusefi"; exit $?)
|
||||
|
||||
./gen_config_board.sh frankenso
|
||||
[ $? -eq 0 ] || (echo "ERROR generating frankenso"; exit $?)
|
||||
|
||||
./gen_config_board.sh prometheus
|
||||
[ $? -eq 0 ] || (echo "ERROR generating prometheus"; exit $?)
|
||||
|
||||
#cd config\boards\kinetis\config
|
||||
#!gen_config.bat
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,51 @@
|
|||
#!/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}"
|
||||
|
||||
echo lazy is broken - TS input is not considered a change
|
||||
rm build/config.gen
|
||||
|
||||
java -DSystemOut.name=gen_config_board \
|
||||
-cp ../java_tools/ConfigDefinition.jar:../java_tools/configuration_definition/lib/snakeyaml.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
|
||||
|
||||
[ $? -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 \
|
||||
-ts_destination tunerstudio \
|
||||
-ts_output_name rusefi_${BOARDNAME}.ini \
|
||||
-prepend tunerstudio/${BOARDNAME}_prefix.txt \
|
||||
-prepend config/boards/${BOARDNAME}/prepend.txt \
|
||||
-skip build/config.gen
|
||||
|
||||
[ $? -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
|
|
@ -0,0 +1,10 @@
|
|||
echo "This batch files reads rusefi_enums.h and produses auto_generated_enums.* files"
|
||||
|
||||
rm gen_enum_to_string.log
|
||||
|
||||
java -DSystemOut.name=gen_enum_to_string \
|
||||
-jar ../java_tools/enum2string.jar \
|
||||
-inputPath . \
|
||||
-outputPath controllers/algo \
|
||||
-enumInputFile controllers/algo/rusefi_enums.h \
|
||||
-enumInputFile controllers/algo/rusefi_hw_enums.h \
|
Loading…
Reference in New Issue