Now compile the start08.c file.
The Select File to Compile dialog box appears.
The start08.c file begins compiling. In this case, the file fails to compile.
The RS08 Compiler window provides information about the compilation process and generates error messages if the compilation fails. In this case the C5200: `FileName' file not found error message appears twice, once for startrs08.h and once for startrs08_init.c.
A context menu appears.
The C5200: `FileName' file not found error message appears.
The Tips section in the help f or the C5200 error states that the correct paths and names for the source files must be specified.
The following folder contains the missing header file, startrs08.h:
<CWInstallDir> \ MCU\lib\rs08c\include
The following folder contains the missing startrs08_init.c file.
CWInstallDir\MCU\lib\rs08c\src
To resolve the error, modify the compiler configuration so that it can locate any missing files.
The Configuration dialog box appears.
The Browse for Folder dialog box appears.
The Configuration dialog box is now active.
The specified path appears in the lower panel.
The path to the header files <CWInstallDir>\MCU\lib\hc08c\include appears in the lower pane.
The path to the header files < CWInstallDir>\MCU\lib\rs08c\src appears in the lower panel.
An asterisk now appears in the RS08 Compiler window's title bar, indicating that the configuration file contains unsaved changes.
You have now saved the new paths to the missing files to compile the start08.c file.
Now that you have supplied the paths to the missing files, you can try again to compile the start08.c file.
The Compiler indicates successful compilation for the start08.c file.
The compiler displays following results:
Now compile the main.c file:
The C source code file, main.c, fails to compile, as the compiler can locate only three of the four header files required. It could not find the derivative.h header file and generated another C5200 error message.
The derivative.h file is in the Project_Headers folder in the X15 project folder, so add another header path to resolve the error.
The Configuration dialog box appears.
The Browse for Folder dialog box appears.
The Browse for Folder dialog box closes.
The selected path appears the lower pane.
If there is no other missing header file included in the derivative.h file, you are ready to compile the main.c file.
The message " *** 0 error(s)," indicates that main.c compiles without errors. Save the changes in the project configuration.
The compiler places the object file in the Sources folder along with the C source code file, and generates output listing files into the project folder. The binary object files and the input modules have identical names except for the extension used. Any assembly output files generated for each C source code file is similarly named.
At this time, only two of the three C source code files have been compiled. Locate the remaining C source code file, MC9RS08KA1.c, in the Lib folder of the current directory, X15.
The compiler places the object-code files it generates in the same folder that contains the C source code files. However, you can also specify a different location for the object-code files.
To redirect the object-code file for the MC9RS08KA1.c file to another folder, modify the compiler configuration so that when the MC9RS08KA1.c is compiled, the object code file goes into a different folder. For more information, refer to the OBJPATH: Object File Path.
The new object path appears in the lower panel.
The Configuration dialog box closes.
The Select File to Compile dialog box appears.
The selected file compiles.
The compiler log states that MC9RS08KA1.o, the object code file, was created in the ObjectCode folder, as specified. Save the configuration again in case you wish to recompile any of the C source code files in the future.
The haphazard builds of this project are intentionally designed to illustrate what happens if paths are not properly configured while compiling a project using the Compiler tool. The header files may be included by either C source or other header files. The lib folder in the CodeWarrior installation contains many derivative-specific header and other files available for inclusion into your projects.
When you build another project with the Build Tool Utilities, make sure that the settings for the input and output files are done in advance.
Now that the project's object code files are available, you can use the linker build tool, linker.exe, together with an appropriate *.prm file, to link these object-code files with the library files and create an *.abs executable output file.
For more information, refer to the Linker section in the Build Tool UtilitiesManual. However, the project set up and configuration is faster and easier using the New Bareboard Project wizard.