![]() |
![]() |
![]() |
![]() |
![]() |
File Structure
An application generated by the Cextreme Code Generator consists and depends on a number of files.
The generated code reflects the contents and behavior of the system described by the SDL model. This code consists of a number of .c and .h files that are put in the target directory (or, in some circumstances, in a subdirectory to the target directory).
In addition to the generated code, there is a number of files that supports the building of an application. These files, and how they should be managed is discussed in this section.
Essential files
Files found in target directory
Depending on the code generation options, files with the following suffixes and extensions might be found in the same directory as the generated C files.
- .m
- _env.tpm
- This is a template makefile to be used to include other .c files that should be compiled and become part of the executable. The Cextreme Code Generator generates this template at the same time it generates a file with the environment functions. You can then modify the template and store it under a new name, so it does not get overwritten, and then specify that the modified file should be used during compilation.
- .ifc files
- _env.c
- This file contains templates for the environment functions. The environment functions are used to connect the SDL model to its environment. In many cases the details in the environment functions are filled in by adding a user specified file containing a number of macro definitions. If that is the case, the _env.c file can be regenerated and still be valid. In more difficult cases the structure of the generated environment template does not fit and then the template should be copied to a new name and modified. In this case the _env.tpm file needs to be modified as well to compile the correct environment file.
- auto_cfg.h
- extreme_user_cfg.h
- .o / .obj
Files found in kernel directory
A number of files are found in the kernel directory, usually located at: <installation_dir>/sdlkernels/cextreme/kernel
Files found in RTOS directory
The source file and examples for RTOS Integrations are not included in the standard delivery. They are available as free downloads from the IBM Rational Support web site.
In a subdirectory named RTOS/ThreadedIntegrations all the available RTOS (real-time operating system) integrations can be found, each integration in a subdirectory of its own.
Each integration contains two files, rtapidef.h and rtapidef.c. As of today, the following integrations are supported:
- POSIX pthreads integration in subdirectory POSIX
- Win32 integration in subdirectory Win32
- VxWorks integration in the subdirectory VxWorks
Include structure for C files
extreme_kern.h
The top level for definitions is the extreme_kern.h file. This file is included by all .c files and includes in turn a number of other .h files according to the list below.
- standard C header files like string.h, stdlib.h, limits.h etc.
- extreme_user_cfg.h
- auto_cfg.h
- comphdef.h (compiler/hardware integration)
- rtapidef.h (run-time API integration)
- sctpred.h
extreme_kern.c
Include is also used for .c files. In this way the complete kernel will be compiled when the top element, extreme_kern.c, is compiled.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |