2020-07-09 07:27:20 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-07-30 13:28:27 -07:00
|
|
|
echo "This batch files reads rusefi_enums.h and produces auto_generated_enums.* files"
|
2020-01-02 15:58:28 -08:00
|
|
|
|
|
|
|
rm gen_enum_to_string.log
|
|
|
|
|
2022-09-02 20:15:47 -07:00
|
|
|
# todo: remove me soon, UsageReader generates java by itself now!
|
|
|
|
#java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile console/binary/generated/live_data_ids.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums
|
|
|
|
#[ $? -eq 0 ] || { echo "ERROR generating live data ids"; exit 1; }
|
2021-10-16 15:15:10 -07:00
|
|
|
|
2021-10-23 17:18:09 -07:00
|
|
|
java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile controllers/sensors/sensor_type.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums
|
2021-10-16 15:15:10 -07:00
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating sensors"; exit 1; }
|
|
|
|
|
2022-01-12 18:59:21 -08:00
|
|
|
java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile controllers/algo/engine_types.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums -definition integration/rusefi_config.txt
|
2021-10-23 20:21:37 -07:00
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating types"; exit 1; }
|
|
|
|
|
2021-10-23 17:18:09 -07:00
|
|
|
java -DSystemOut.name=logs/gen_enum_to_string \
|
2021-07-12 18:31:40 -07:00
|
|
|
-jar ../java_tools/enum2string.jar \
|
|
|
|
-outputPath controllers/algo \
|
|
|
|
-generatedFile commonenum \
|
|
|
|
-enumInputFile controllers/algo/rusefi_enums.h
|
|
|
|
|
2021-10-16 14:49:02 -07:00
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating enums"; exit 1; }
|
|
|
|
|
2022-09-18 17:56:53 -07:00
|
|
|
java -DSystemOut.name=logs/gen_enum_to_string \
|
|
|
|
-jar ../java_tools/enum2string.jar \
|
|
|
|
-outputPath hw_layer/drivers/can \
|
|
|
|
-generatedFile can_category \
|
|
|
|
-enumInputFile hw_layer/drivers/can/can_category.h
|
|
|
|
|
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating enums"; exit 1; }
|
|
|
|
|
2022-09-23 17:39:41 -07:00
|
|
|
java -DSystemOut.name=logs/gen_enum_to_string \
|
|
|
|
-jar ../java_tools/enum2string.jar \
|
|
|
|
-outputPath controllers/trigger/decoders \
|
|
|
|
-generatedFile sync_edge \
|
|
|
|
-enumInputFile controllers/trigger/decoders/sync_edge.h
|
|
|
|
|
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating enums"; exit 1; }
|
|
|
|
|
2021-10-23 19:07:07 -07:00
|
|
|
java -DSystemOut.name=logs/gen_enum_to_string \
|
|
|
|
-jar ../java_tools/enum2string.jar \
|
|
|
|
-outputPath controllers/algo \
|
|
|
|
-generatedFile enginetypes \
|
|
|
|
-enumInputFile controllers/algo/engine_types.h
|
|
|
|
|
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating enums"; exit 1; }
|
|
|
|
|
2021-07-03 18:01:29 -07:00
|
|
|
# TODO: rearrange enums so that we have WAY less duplicated generated code? at the moment too many enums are generated 4 times
|
|
|
|
|
2021-10-23 17:18:09 -07:00
|
|
|
java -DSystemOut.name=logs/gen_enum_to_string \
|
2020-01-02 15:58:28 -08:00
|
|
|
-jar ../java_tools/enum2string.jar \
|
|
|
|
-outputPath controllers/algo \
|
|
|
|
-enumInputFile controllers/algo/rusefi_hw_enums.h \
|
2020-07-04 18:02:50 -07:00
|
|
|
|
2021-10-16 14:49:02 -07:00
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating hw_enums"; exit 1; }
|
|
|
|
|
2021-10-23 17:18:09 -07:00
|
|
|
java -DSystemOut.name=logs/gen_enum_to_string \
|
2021-10-16 14:49:02 -07:00
|
|
|
-jar ../java_tools/enum2string.jar \
|
|
|
|
-outputPath controllers/sensors \
|
|
|
|
-generatedFile sensor \
|
|
|
|
-enumInputFile controllers/sensors/sensor_type.h
|
|
|
|
|
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating sensors"; exit 1; }
|
|
|
|
|
2020-07-04 18:02:50 -07:00
|
|
|
pwd
|
|
|
|
cd config/boards/kinetis/config
|
2022-08-16 12:43:03 -07:00
|
|
|
./kinetis_gen_enum_to_string.sh
|
2020-09-27 07:40:37 -07:00
|
|
|
cd ../../../..
|
|
|
|
|
2022-08-16 12:43:03 -07:00
|
|
|
cd config/boards/cypress/config
|
|
|
|
./hellen_cypress_gen_enum_to_string.sh
|
|
|
|
cd ../../../..
|
2021-02-18 15:18:13 -08:00
|
|
|
|
|
|
|
bash config/boards/subaru_eg33/config/gen_enum_to_string.sh
|