![]() |
![]() |
![]() |
![]() |
![]() |
Targeting Work Flow
Introduction
You can start the Targeting Expert form the Organizer's Generate menu when having a deployment diagram, the SDL system or a block/process of the SDL system selected.
Estimated the SDL system is selected the Targeting Expert converts the system into a default partitioning diagram model (deployment diagram). This is done because the Targeting Expert can only handle partitioning diagram models as an input. The tree window shown in Figure 528 gives an idea how the default partitioning diagram model looks like.
The different entries have got the following meaning:
I.e. an application or node can be configured but not build. Only components can end up in executable programs.
In the start-up phase, directly after the partitioning diagram model has been displayed, the Targeting Expert generates a sub-directory structure into which all the configuration settings, object files and so on will be put. Please see Target Sub-Directory Structure for more information.
Now you can use the Targeting Expert to configure each component.
If you switch the Targeting Assistant on in the "Help" menu, there are tool tips displayed for each entry on the main window.
Operation Steps
The following operation steps should be done at least once when doing targeting for a component the very first time. When the Targeting Expert is used again later to optimize the target it is of course not necessary to do all the steps once more.
All the settings you define and the actions automatically performed by the Targeting Expert have an influence only on the component selected in the Targeting Expert tree window (see Figure 528).
If the configuration should be re-used (this is sometimes reasonable if several components should be built using exactly the same settings), you can modify the way your settings are handled. Please see Handling of Settings.
- Select the Pre-defined Integration Settings
- Select an SDL to C Compiler (if not already done in the pre-defined integration settings)
- Select a C Compiler (if not already done in the pre-defined integration settings)
Select the Pre-defined Integration Settings
With every SDL Suite distribution there are several Pre-defined Integration Settings which you can use to get a target executable in an easy manner.
To get an optimized target executable concerning size and speed these pre-defined integration settings should only be seen as templates.
Please see Distributed Pre-defined Integration Settings.
The pre-defined integration settings can be selected in the integration tool bar in the main window (see Figure 529). All the pre-defined integration settings are sorted into the groups
Additionally the integration <user defined>, which does not belong to an integration type and is not pre-defined, can be selected.
Select an SDL to C Compiler
The SDL to C compiler to be used will automatically be set if you select one of the pre-defined integration settings. It is only necessary to select the SDL to C compiler if the <user-defined> settings have been selected. All the available SDL to C compilers will be given in the combo box shown in Figure 529.
Depending on the licenses found the following SDL to C compilers are supported:
Select a C Compiler
After a pre-defined integration setting is selected the Targeting Expert tries to automatically set the compiler to be used, i.e.
- if there is only one compiler supported with the selected pre-defined integration settings than that one is set.
- if there are more than one compiler supported the Targeting Expert tries to set the default compiler selected in the Preferences. (Please see The Preference Manager)
However, it is possible to set another compiler by selecting it in the combo box shown in Figure 529.
If the <user defined> integration has been chosen, a new compiler can be added by selecting the entry "Add new compiler description".
To select the desired configuration dialog, please select the correspondent entry in the partitioning diagram.
Configure Compiler, Linker and Make
This part of the configuration is divided into four sub-steps which are taken from the selected pre-defined integration settings as far as possible.
Compiler
You enter the needed compiler configuration in a special input mask. The compiler you specify here will be used to compile the generated code and the target library.
Click Default if you want to restore the default values.
- Compiler Name
- Options
- Enter the placeholder %s where the source file name of the file to be compiled has to be inserted (used for the makefile generation).
- Enter the dummy parameter %o where the object file's name has to be inserted (used for the makefile generation).
- Enter the dummy parameter %I where the include path option has to be placed (see below).
- Compile as C++
- The compiler options to compile C files as C++ files will be added/removed from the Options. For a definition of the used compiler options see the Parameter File sdttaex.par.
- Compile as debug
- The compiler options to generate the object files including debug information will be added/removed from the Options. For a definition of the used compiler options see the Parameter File sdttaex.par.
- Library Flag
- Include
- Enter the compiler option needed to specify include paths and the include paths themselves here. The complete contents of this entry will replace the entry %I in the Options (see above).
- The include path can contain the following environment variables (The environment variables will be expanded during the make execution):
<installationdir>/sdt/sdtdir/<platform> as long as Library directory is not set
Absolute path to the current target directory (depends on the selected component)
$(scttargetdir) + the relative path selected in Object directory
If only the information up to here is specified in this dialog, each C file is compiled in one single step as shown in Figure 532.
For some target compilers, compilation is done in three steps using three different tools. If that is the case, the compilation of each C file is done like shown in Figure 533. In this case the following entries also need to be given.
- C parser name
- Options (C parser)
- Input extension (C parser)
- Assembler
- Options (Assembler)
- Input Extension (Assembler)
Source Files
All the files (except the coder and the generated files) which will be compiled and linked to the target executable are listed here.
- Used kernel and library files and
Used SDL Target Tester files (Cmicro only)Compiler Flag
This section is only available if the Advanced Mode is selected and the SDL to C compiler Cmicro is used.
When compiling the generated code and/or the SDL to C compiler's library you need to set a compiler flag to adjust the code.
The list of available compilers shown in Figure 535 belongs to the Cadvanced target library.
You must select the correct compiler flag in order to avoid compilation errors.
For more information concerning the compiler specific adjustment of the libraries see
- scttypes.h (Cadvanced), see Compiler Definition Section in scttypes.h.
- ml_typ.h (Cmicro), see Adaptation to Compilers
- extreme_kern.h (Cextreme), see Integration with Compiler and Operating System.
Additional Compiler
If there are other files than the generated ones or the SDL to C compiler's library to be compiled all the requested things in this section have to be entered.
- Compiler Name
- Options
- Enter the placeholder %s where the source file name of the file to be compiled has to be inserted (used for the makefile generation).
- Enter the dummy parameter %o where the object file's name has to be inserted (used for the makefile generation).
- Enter the dummy parameter %I where the include path option has to be placed (see below).
- Include
- Enter the compiler option needed to specify include paths and the include paths themselves here. The complete contents of this entry will replace the entry %I in the Options (see above).
- Obj. extension
- List of files
- Dependencies
Linker
To link all the compiled files (generated ones, the ones building the library and additional ones) you must configure a linker.
Click Default if you want to restore the default values.
- Linker name
- Options
- Enter the dummy parameter %O in the place of the list of all compiled files and the additional object files to link (used for the makefile generation).
- Enter the dummy parameter %L in the place of the list of all the libraries (if there are some) which have to be linked.
- Enter the dummy parameter %e in the place where the executable file's name has to be inserted (used for the makefile generation).
- Exe. extension
- Additional object files and Additional libraries
Library Manager
This section is available only if an SDL and/or ASN.1 coder is selected. Please see Communication for details on how to select a coder.
The library manager offers the command that will be used to build a library from all the coder files. The dialog is shown in Figure 538
If no library manager is given all the coder object files will be linked directly to the target application.
Click Default if you want to restore the default values.
Make
You can select the make tool to do all the compile and link actions here.
Click Default if you want to restore the default values.
- Make tool
- Select the make tool you wish to use. Currently the following make tools are supported: (see Make Applications)
If the make tool you would like to use is not in the list. Please add a new definition in sdttaex.par. For more information view Make Applications
- Generate makefile
- Generator
- The Targeting Expert is designed to execute external makefile generators whenever the build-in makefile generator (intern) is not sufficient.
- Enter the name (and the path) of the external makefile generator here. Please see External Makefile Generator for further information about how to build an external makefile generator.
- Makefile
- Object directory
If the directory <target_directory>/<object_directory> does not exist it will be automatically created.
- Pre-make
- Pre-compile
It is probably useful to use the utility functions delivered in combination with the Targeting Expert. Please see Utilities
- Post-link
Configure and Scale the Target Library
The configuration and the scaling of the used target library is done by setting/resetting compiler macros (#define in C). These macros will be called "flags" in the further description.
For more information concerning allowed flags see
- sct_mcf.h (Cadvanced), see Some Configuration Macros.
- ml_mcf.h (Cmicro), see Compilation Flags
- extreme_user_cfg.h (Cextreme), see Optimization and Configuration.
The Targeting Expert offers an easy way of setting/resetting these flags. All the allowed flags are divided into different groups, e.g. SDL support and environment.
Figure 540 shows an example for Cmicro.
When all the configurations have been done the Targeting Expert generates
- ml_mcf.h (a C header file for Cmicro) which will be included in ml_typ.h during the compilation of the corresponding files.
This is done for all the pre-defined integrations using the SDL to C compiler Cmicro.- sct_mcf.h (a C header file for Cadvanced) which will be included in scttypes.h if the flag USER_CONFIG is defined.
The flag USER_CONFIG is only defined for the pre-defined integrations Application (applclenv) and Application, debug (debclenvcom) using the SDL to C compiler Cadvanced.- extreme_user_cfg.h (a C header file for Cextreme) which will be included in extreme_kern.h during compilation.
Configure the SDL Target Tester (Cmicro only)
The configuration of the SDL Target Tester is very similar to the configuration of the target library.
The settings done for the target will also be generated into the file ml_mcf.h. (Please see Configure and Scale the Target Library.)
Configure the Host (Cmicro only)
The settings for the host will be generated into the file sdtmt.opt which will be read by the SDL Target Tester during start-up to get information about the gateway to be used and the target's memory layout. Please see Communication Setup on the Host System for more information about how to configure the SDL Target Tester's host application.
Configure how to Make the Component
The possible options are divided into four pages:
All the Analyzer options entered in the Organizer will be re-used by the Targeting Expert.
When a warning or error is found during analysis a warning message will popup. By setting the Organizer preference Organizer*ShowLogLevel to Never this dialog will be suppressed.
SDL to C Compiler
Because the Advanced Mode is switched off there might be some controls disabled because it does not make sense to modify them for the selected integration.
- Analyze/generate code
- Analyzer options
- The Organizer's Analyzer-Options dialog is displayed and the Analyzer options used for all the integrations can be modified. Please see Analyze SDL.
- Save commands
- All files
- Capitalization lower case
- Full variable prefix
- Instance information file
- An instance information file will be generated. Please see SDL Instance Information.
- Separation
- File name prefix
- Environment header file
- Environment functions
If the generation of environment functions is switched on it may be needed to add the environment source file to Source Files.
- Please see
- Initializing the Environment / Interface to the Environment for Cmicro
- Building an Application for Cadvanced
- Signal number file (Cadvanced only)
- Conversion style (Cmicro only)
- Filename (Cmicro only)
- Amount of comments (Cextreme only)
- Generate run time tests (Cextreme only)
- Generate sdt references (Cextreme only)
- Generate trace code (Cextreme only)
Communication
- Generate/do not generate SDL coder functions.
(Please see Type description nodes for SDL types.)- Generate/do not generate ASN.1 coder functions.
(Please see ASN.1 Type Information Generated by ASN.1 Utilities.) The names of the generated encode/decode functions will be prefixed by the optional text put in the ASN.1 coder prefix field. In the generated ASN.1 coder structures specified prefix is added after the standard yASN1_ prefix, for example:
CHOICE_TYPE_DECL(EXTERN_INFO,yASN1_MyPrefix_NetworkAddress);
CHOICE_TYPE_DEF(GLOBAL_INFO,yASN1_MyPrefix_NetworkAddress,EXTMARKER_ABSENT,NONE_EXTMARKER, ... );- TCP/IP signal sending
The TCP/IP communication is supported only for a threaded integration using the SDL to C compiler Cadvanced.
The signal sending to other components can be done via a communications link. If it is switched on, a wizard dialog to set up all the needed information pops up (see Figure 543).
As described in the dialog there are settings done in different sections of the Targeting Expert:
- an Environment header file
- Environment functions and
- SDL coder functions
If the TCP/IP communication is switched off the routing source file needs to be removed from the list of source files to compile by hand!
Env. Header File
The way the environment header file(.ifc file) is generated can be configured here. Please see "System Interface Header File" on page 2779 in chapter 57, Building an Application for more information.
The CHANNELS section cannot be configured for Cmicro because the SDL systems structure (blocks and channels) will be lost after code generation.
Execution
The selected download application will automatically be started if make was successful. The Targeting Expert does not try to invoke a download application if "Use download application" is un-checked.
- Test Application
- The applications that are part of the SDL Suite, i.e.The SDL Simulator, The SDL Explorer and The SDL Target Tester.
- The applications from other vendors, e.g. a debugger or emulator.
Make the Component
The whole make process consists of several different tasks which will automatically be executed one after another. These tasks are:
- Analyze and Generate Code
- Generate a Makefile
- Compile and link
- Execute (target application or the application in Download Application and/or Test Application)
The execution of the next task will be stopped if the current task returns with an error. The Targeting Expert event log will give information about the process' state.
Analyze and Generate Code
The selected SDL to C compiler will be invoked and code will be generated for the selected component.
- make
In that case only code for the modified parts of the SDL system will be generated.- full make
Code for the complete SDL system is generated. Even if there are no modifications.Generate a Makefile
The makefile to be used will be generated. Please see Make for information on how to give the makefile's name and how to switch the makefile generation on or off.
If the build-in makefile generation does not fit your needs it is possible to customize the makefile generation.
Please see External Makefile Generator to get information on how to build a makefile generator.
Compile and link
The external make tool will be invoked using the generated makefile. Please see Make for information on how to select the make tool.
To force a compilation of all the C source files the object files have to be deleted first. Please use the Clean entry in the Make Menu.
Execute
The target executable will be executed.
It is sometimes not possible to invoke the target executable from the Targeting Expert, e.g. if the target executable is built for a micro controller. In this case you can select a download application or any other test tool (e.g. debugger) which will be executed instead. Please see Download Application and Test Application.
For running test cases the target executable's output to stdout and stderr will be re-directed automatically into the Targeting Expert event Log. The target simply should be executed by entering "%t" as the test application (Please see Test Application).
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |