Configuring Assembler

A Build Tool, such as the Assembler, requires information from the configuration files. There are two types of configuration data:

After opening the Assembler, you would load the configuration file for your project if it already had one. However, you will create a new configuration file for the project in this tutorial and save it so that when the project is reopened, its previously saved configuration state is used.

Now let's save this configuration in a newly created folder that will become the project

directory.

  1. Select File > New / Default Configuration to open a new default configuration.
  2. Select File > Save Configuration As to save this configuration.

    The Saving Configuration as dialog box appears.

  3. Navigate to the desired location and click the Create New Folder icon on the dialog box toolbar.
  4. Enter a name for the project directory.
    Figure 1. Loading Configuration Dialog Box
    Loading Configuration Dialog Box
  5. Click Open.

    In this case, ModelT becomes the project directory in the Projects folder.

  6. Click Save.

The project.ini file is created in the ModelT folder and becomes the local configuration file for this project.

The current directory for the Microcontroller Assembler is changed to your project directory.

The following image shows the assembler window displaying the current directory.

Figure 2. Assembler Displaying Current Directory
Assembler Displaying Current Directory

If you were to examine the project directory with the Windows Explorer at this point, it would only contain the project.ini configuration file that the Assembler just created.

The following image displays the project.ini configuration file that the Assembler just created.

Figure 3. Project directory in Windows Explorer
Project directory in Windows Explorer

If you further examined the contents of the project.ini configuration file, you would see that it contains Assembler options in the [AHCS12Z_Assembler] portion of the file. The project.ini file for this project only has an [AHCS12Z_Assembler] section, as the following listing displays.

Listing: Contents of project.ini File
[AHCS12Z_Assembler]
StatusbarEnabled=1

ToolbarEnabled=1

WindowPos=0,1,-1,-1,-1,-1,494,406,953,697

EditorType=4

The AHCS12Z_Assembler options are described in detail in [XXX_Assembler] Section in the Appendices.

Next, you have to set the object-file format that you will use (HIWARE or ELF/DWARF).

  1. Select Assembler > Options.

    The HCS12Z Assembler Option Settings dialog box appears.

  2. Click the Output tab. Check the Generate a listing file checkbox.
  3. Check the Object File Format checkbox. Select ELF/DWARF 2.0 Object File Format from the options displayed for the Object File Format checkbox.
  4. Check the Do not print included files in list file checkbox if you want the listing file to be shorter.
    Figure 4. S12Z Assembler Option Settings Dialog Box
    S12Z Assembler Option Settings Dialog Box
  5. Click OK to close the HCS12Z Assembler Option Settings dialog box.

    Save the changes to the configuration by:

    • selecting File > Save Configuration (Ctrl + S) or
    • pressing the Save button on the toolbar.

The assembler is now set with the object-file format that you have selected.

The following listing shows the project.ini file's contents, after the changes to the configuration are saved.

Listing: project.ini File with Additional Assembly Options
[AHCS12Z_Assembler]
StatusbarEnabled=1

ToolbarEnabled=1

WindowPos=0,1,-32000,-32000,-1,-1,495,471,941,739

EditorType=4

Options=-F2 -L=%(TEXTPATH)\%n.lst -Li