Calibration Compiler

1 Values_From = SRC;
2 BIN_Type = MOTOROLA;
3 BIN_Input = "tbl1.mot";
4 BIN_Output = "tbl2.mot";
5 ASM_Output = "tbl1.asm";
6 SRC_Input = "tbl1.src";
7 SRC_Output = "tbl2.src";
8  
9 ASM_Mnemonics = (1,"db","$%02X"),
10 (2,"dw","$%04X"),(4,"dd","$%08X");
11  
12 //=== First Table
13 Table_Name = "Spark";
14 Description = "Spark Advance Table °Adv = F(RPM,Load)";
15 Dimension = 12,10;
16 Dimension_Names = "Load","RPM";
17 Dimension_Units = "[kPa]","[RPM]";
18 Dimension_Origins = 1000.0,0.0;
19 Dimension_Steps = 100.0,400.0;
20 Dimension_Formats = "%5.0lf","%5.0lf";
21 Location_Type = ABSOLUTE,0x8000;
22 Disassembler_Formula = X/100.0;
23 Assembler_Formula = X*100.0;
24 Output_Format = 2, HEX, TWOCOMPL, LSB_FIRST, 4, "%10.2lf";
25  
26  
27 //=== First Variable
28 Variable_Name = "Idle_RPM";
29 Description = "Idle RPM Value";
30 Location_Type = ABSOLUTE,0xA000;
31 Disassembler_Formula = X/100.0;
32 Assembler_Formula = X*100.0;
33 Output_Format = 2, HEX, UNSIGNED, LSB_FIRST, 1, "%10.2lf";
34  
35  
36 //=== Second Table
37 Table_Name = "Fuel";
38 Description = "Fuel Table Flow=F(Throttle)";
39 Dimension = 20;
40 Dimension_Names = "Throttle";
41 Dimension_Units = "[V]";
42 Dimension_Origins = 0.0;
43 Dimension_Steps = 1.0;
44 Dimension_Formats = "%3.0lf";
45 Location_Type = ABSOLUTE,0x9000;
46 Disassembler_Formula = X*2.0;
47 Assembler_Formula = X/2.0;
48 Output_Format = 2, HEX, UNSIGNED, LSB_FIRST, 4, "%10.2lf"; Values_From = SRC;
49 BIN_Type = MOTOROLA;

Year of completion:  1990
Purchased/Utilized By: IMPCO Technologies, Cerritos, CA
                                        AirSensors, Seattle
                                        Mail order, catalog sales

Application: Development of Automotive and Other Controllers

Majority of effort developing controller software is spent calibrating/tuning control parameters. In microprocessor-based controllers these parameters are most often stored in the microprocessor’s program memory (calibration tables, parameters, or even immediate program data). Changing the parameters in a situation like that requires recompiling, re-linking, and re-loading the code. Calibration Compiler allows changing calibrations directly in the binary code. This can greatly simplify the development effort. Another advantage is that the Calibration Compiler can simplify teamwork on a complex project, since an application engineer can do his work without having to learn compilers, assemblers, linkers, and using them.

Calibration Compiler provides means to:

  • extract the calibration parameters and tables out of the target processor’s binary code
  • convert them to engineering units and through any possible mathematical function to make them easy to understand
  • modify them
  • put them back inside the target microprocessor code without using assembler or linker

Calibration Compiler can simplify work with any microprocessor application, but it becomes especially useful if the user can replace the program memory of the target system with a dual-ported RAM. In such a configuration the user can calibrate the code on the run, without even resetting the target system.

Calibration Compiler achieves the above goals by defining a script language for describing tables and variables in the target processor’s code that the user needs to calibrate. He can, for example, state that at the specific memory location there is a n-dimensional table containing m-byte entries that represent some physical property after running the values of the entries through a given mathematical expression (polynomial for example). The location of a table or variable to calibrate can be given as the address in target memory or the name the symbol in the linker map file of the target code. This way, there is no need to change the Calibration Compiler script when the target code is changed and the variables or table change their location.