To assemble the main.asm file:
The following image shows main.asm file.
The main.asm file starts assembling.
The following image shows the result of assembling of main.asm file.
The project window provides information about the assembly process or generates error messages if the assembly was unsuccessful. In this case, the A2309 File not found error message is generated. As the following image displays, if you right-click on the text containing the error message, a context menu appears.
Select Help on "file not found" and help for the A2309 error message appears, as the following image displays.
You know that the file exists because it is included in the Sources folder that you imported into the project directory. The help message for the A2309 error states that the Assembler is looking for this "missing" include file first in the current directory and then in the directory specified by the GENPATH environment variable. This suggests that the GENPATH environment variable should specify the location of the derivative.inc include file.
To fix this error:
The path to the derivative.inc file D:\Projects\Model T\Sources appears in the area below the Add button.
An asterisk appears in the title bar of the Assembler window, so save the change to the configuration.
The asterisk disappears.
The new path is updated for the derivative.inc file.
Now that you have supplied the path to the derivative.inc file, assemble the main.asm file again.
Select File > Assemble and again navigate to the main.asm file and click Open . The following image displays the successful assembling of the project with the second attempt.
The Macro Assembler indicates successful assembling and indicated that the Code Size was 39 bytes. The message *** 0 error(s), indicates that the main.asm file assembled without errors. Do not forget to save the configuration one additional time.
The Assembler also generated a main.dbg file (for use with the Simulator/Debugger), a main.o object file (for further processing with the Linker), and a main.lst output listing file in the project directory. The binary object-code file has the same name as the input module, but with the *.o extension - main.o. The debug file has the same name as the input module, but with the *.dbg extension - main.dbg and the assembly output listing file has the *.lst extension. The following image displays the project directory after the successful assembly of the project.
The ERR.TXT file is present in the project directory because of the earlier failed attempts at assembling. The ERR.TXT file is empty after a successful assembly. You can delete this file. The following listing shows the project.ini file.
[AHCS12Z_Assembler] StatusbarEnabled=1 ToolbarEnabled=1 WindowPos=0,1,-1,-1,-1,-1,319,392,953,747 EditorType=4 Options=-F2 -L=%(TEXTPATH)\%n.lst -Li RecentCommandLine0=""D:\Projects\Model T\Sources\main.asm"" CurrentCommandLine=""D:\Projects\Model T\Sources\main.asm"" RecentCommandLine1=D:\Projects\Sources\main.asm [Environment Variables] GENPATH=D:\Projects\Model T\Sources OBJPATH= TEXTPATH= ABSPATH= LIBPATH=
The haphazard running of this project was intentionally designed to fail to illustrate what occurs if the path of any include file is not properly configured. Be aware that include files may be included by either *.asm or *.inc files. In addition, remember that the lib folder in the CodeWarrior installation contains several derivative-specific include and prm files available for inclusion into your projects.