diff --git a/firmware/gen_config_board.sh b/firmware/gen_config_board.sh index 2eef8a3aa6..1dbba94354 100755 --- a/firmware/gen_config_board.sh +++ b/firmware/gen_config_board.sh @@ -41,10 +41,11 @@ source gen_config_common.sh echo "Using COMMON_GEN_CONFIG [$COMMON_GEN_CONFIG]" # work in progress: migrating to rusefi_${BUNDLE_NAME}.txt +# in rare cases order of arguments is important - '-tool' should be specified before '-definition' java -DSystemOut.name=logs/gen_config_board \ + -tool gen_config.sh \ $COMMON_GEN_CONFIG \ -romraider integration \ - -tool gen_config.sh \ -field_lookup_file controllers/lua/generated/value_lookup_generated.cpp \ -board ${BOARDNAME} \ -ts_output_name generated/${INI} \ diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigDefinition.java b/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigDefinition.java index e9fdf6789b..9baf65085c 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigDefinition.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigDefinition.java @@ -92,9 +92,11 @@ public class ConfigDefinition { String key = args[i]; switch (key) { case "-tool": + // lame: order of command line arguments is important ToolUtil.TOOL = args[i + 1]; break; case KEY_DEFINITION: + // lame: order of command line arguments is important, this arguments should be AFTER '-tool' argument definitionInputFile = args[i + 1]; state.headerMessage = ToolUtil.getGeneratedAutomaticallyTag() + definitionInputFile + " " + new Date(); inputFiles.add(definitionInputFile);