The following section describes the options available on the Application Configuration tab.
• If you select this check box, an initializing function (or Task in OSEK) called TASKINIT will be added to the generated application.
• The implementation code for TASKINIT is in the file usercode.c in the prt directory (originates in the OSI), and is later copied to the file <profile-name>.c in the output directory.
• The TASKINIT function contains code related to initialization of the application, such as initialization of the panels, GBA, and model data.
• You can add additional initialization code manually to usercode.c before generation, or add code in the On Init Code text box, described below.
• If you are using an OSEK-based OSI, you can specify whether this task is basic or extended, specify the task priority, or define attributes in the Task Specific Attributes window. Generate Timer Overflow Function/Task
• If you select this check box, functions (or Tasks in OSEK) will be generated for each of the timers used with the timeouts in the model. The code in these functions handles the overflowing of the timer, and contains only generated code. If you want to modify this code, modify the appropriate APIs in the OSDT.
• If you are using an OSEK-based OSI, you can specify whether these task are basic or extended, specify the task priority, or define attributes in the Task Specific Attributes window.
• If you select this check box, a function (or Task in OSEK) will be generated to support the Testbenches in the profile. If not selected, no testbench code is generated.
• If you are using an OSEK-based OSI, you can specify whether this task is basic or extended, specify the task priority, or define attributes in the Task Specific Attributes window.
• If you select this check box, a function (or Task in OSEK) called PANEL_DISPATCH will be added to the generated application.
• The implementation code for PANEL_DISPATCH is in the file usercode.c in the prt directory (originates in the OSI), and is later copied to the file <profile-name>.c in the output directory.
• This function includes code for actions such as panel data update and panel graphics update. If you wish to use panels, this check box must be selected.
• If you are using an OSEK-based OSI, you can specify whether this task is basic or extended, specify the task priority, or define attributes in the Task Specific Attributes window.
• This check box should be selected if you want the panels and the application to run on different computers. This option can only be used if the remote host has file system capabilities (such as open, read).
• If you are using this option, you must define a Target Directory. This directory is used for writing data used for communication between the panels and the application. Therefore, it must be a directory with write permission.
• Any code entered in this text box will be placed in a macro called ON_INIT_CODE, generated in macro_def.h
• This macro is called from the function TASKINIT (which is included in the generated application if Generate Initializing Function /Task was selected).
• The text box only accepts a single line of text, but it can contain a number of statements separated by a “;”.
• This text box allows you to provide values for flags in addition to those used by Rational Statemate. These are generated in the filecmp_flg.h
. Each flag is generated in a single line of code using the format:#define
<Flag>
.
• When entering text in this text box, use ';' or “,” to separate the different flags.
• Flags can be specified by providing only the flag name (for example, AAA) or by providing the flag name and a value to assign (for example, AAA=4).
• Theifdef
statements for these flags can be added to code manually or can be used in defining APIs such as the memory management APIs in the OSDT. Generate User-Code in "glob_func.c" If this check box, is selected, all user code (functions and subroutines) will be generated into a file calledglob_func.c
.In this context, user code refers to the bodies of functions defined using Rational Statemate.If this option is not selected, the code generator will generate this code in the relevant modules, as follows:
• For regular subroutines, the code is generated in the module to which the subroutine belongs.
• For subroutines defined with a GDS scope, the code is generated inglob_func.c
.
• For subroutines defined with a generic scope: bodies of functions are generated in the fileg_<Generic-
Name>.c
.
• For call-back functions for elements like data-items — code is generated inglob_func.c
.
• Before each section of functions in module/generic files, the code will include the definition of the APIUSER_FUNCTIONS_BODY_DEFINITION_SECTION_HEA
DER()
• After each section of functions in module/generic files, the code will include the definition of the APIUSER_FUNCTIONS_BODY_DEFINITION_SECTION_FOO
TER()
.