![]() |
![]() |
![]() |
![]() |
![]() |
File Structure
Description of Files
The Cmicro Library Functions and Definitions
sdl_cfg.h
This file is automatically generated by the Cmicro SDL to C Compiler into the directory which is currently active. It contains compilation flags used for the automatic scaling of the Cmicro Library and the generated C code. The file must not be edited by the user.
ml_typ.h
This file is the central header file in the Cmicro Package. It contains
- more #includes
- defines, which are of global interest and Cmicro Library internal defines
- typedefs which are of global interest and Cmicro Library internal typedefs
- external declarations which are of global interest and Cmicro Library internal external declarations
sctpredg.h, sctpred.h and sctpred.c
These files contain all definitions necessary to handle SDL data, for example predefined sorts. sctpred.h is included in ml_typ.h.
ml_err.h
This header file defines all error numbers used by the Cmicro Kernel, the Cmicro Library and the SDL Target Tester.
ml_mem.c
This file contains the dynamic memory management functions from Cmicro. It contains among other functions the C functions xmk_Malloc(), xmk_Calloc() and xmk_Free(). Possible reasons to use this module are:
- Compiler does not support dynamic memory management.
- Dynamic memory management of the compiler does not meet the requirements of the application. This may be the case, if the user wants to use "best fit" instead of "first fit", the first of which is normally not supported. It is possible to adapt the memory management to ones needs.
- User wants to use other mechanisms of ml_mem.c, like profiling. Please view Dynamic Memory Allocation.
ml_mon.inc
This file is included by the ml_mon.c file. It exists only for internal purposes and in order to maintain all the defined errors in the system in a better way.
ml_mon.c
This file contains some help functions which are useful in producing screen outputs. It contains C functions for buffer printouts, SDL PId printouts, displaying error messages, and the display of the current scalings used in the executable. The file should usually be included when compiling the kernel.
ml_*.h
Other header files which contain extern declarations of modules of the Cmicro Library.
The Cmicro Kernel
mk_main.c
This file represents the main-interface to the SDL user. It contains functions which are to be called by the SDL user to integrate the Cmicro Kernel in his application.
For SDL Target Tester, there are some more functions to be called during initialization. Please view The SDL Target Tester.
The SDL queue must in any case be initialized before the SDL system is going to execute. The initialization function is called xmk_InitQueue() and is exported from the mk_queu.c module.
mk_user.c
This module is not in the Kernel directory, but in the Template directory. It contains function templates or examples which are to be filled out by the user:
main()The C main function contains by default the full access to all Cmicro features.
ErrorHandler()Central error handling routine is called each time an errors occurs.
WatchdogTrigger()Handling of a hardware watchdog.
In earlier versions of the Cmicro Package the functions xInitEnv(), xInEnv(), xOutEnv() and xCloseEnv() were include in mk_user.c, too. These functions will now be generated by the Targeting Expert and stored in the file env.c.
mk_sche.c
This file is the heart of the Cmicro Kernel. It exports those functions which are used in the mk_main module and it uses those functions of other modules which represent the SDL model. The module serves with all the different scheduling policies described later in the subsection Scheduling.
mk_outp.c
This file contains the SDL operation OUTPUT which is represented by a few functions. There is a C function xmk_Send() representing the SDL output operation. In addition, there is a C function xmk_SendSimple() which is used when a signal contains no parameters and has no explicitly defined priority. This results in a more compact argument list thus reducing the generated C Code.
mk_queu.c
This module contains the data type "SDL queue" and defines all operations on the SDL queue. The queue handling covers all the aspects of the SDL semantics as far as signals are concerned. There is one function xmk_InitQueue() which must be called in the user's main() function before the SDL system is going to execute.
mk_tim1.c
This file contains the SDL operations on timers such as set, reset, active, and some help functions used by the Cmicro Kernel. The timer model is described within the subsection Timers and Operations on Timers. The Cmicro Kernel has to initialize all timers, test for expired timers and reset all timers of a process, when a process instance stops.
mk_stim.c
This file contains some functions which are to be filled up by the user. This is the reason why it is in the Template directory. The functions are used by the Cmicro Kernel to get the system time used in SDL. The contents of this file should be seen as a template. No provision for the connection to hardware timers is provided in the delivered source, as the timer used is application dependent. The user is required to fill out the appropriate functions for the provision of SDL system time. Please view Defining the SDL System Time Functions in mk_stim.c
mk_cpu.c
This file also contains some hardware specific functions which should be seen as templates. It is also in the Template directory.
mk_*.h
Other header files contain extern declarations of modules of the Cmicro Library. The contents and details of the various header files only need to be known if the user wishes to modify parts of the Cmicro Library.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |