qmi.utils.adbasic_compiler.run_adbasic_compiler

qmi.utils.adbasic_compiler.run_adbasic_compiler(adwin_dir: str, processor_type: str, adbasic_arguments: list[str], working_dir: str | None = None, parse_stderr: bool = True, remove_c_directory: bool = False, pretty_print: bool = False) AdbasicResult

Run the ADbasic compiler.

Parameters:
  • adwin_dir – Base directory of ADwin software installation (e.g. /opt/adwin).

  • processor_type – The type of processor the command is run for.

  • adbasic_arguments – List of command-line options for the ADbasic compiler.

  • working_dir – Working directory when running the compiler.

  • parse_stderr – True to parse error messages from the ADbasic compiler and return them. False to ignore error messages from the compiler.

  • remove_c_directory – True to remove the directory with intermediate C files from the compiler.

  • pretty_print – True to print compiler messages in pretty colors. False to log messages via the Python log system.

Returns:

Tuple containing results from the compilation process.

If parse_stderr is True, this result will contain parsed compiler error messages.

Return type:

AdbasicResult

Raises:

AdbasicCompilerException – If an unexpected error occurs while interacting with the ADbasic compiler.