IBM
Contents Index Previous Next



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.

Figure 528 : Partitioning diagram in the Targeting Expert

The different entries have got the following meaning:

application

This is the collection of all the deployed SDL systems. It is used as an object to allow configurations of several nodes only, i.e. it is not possible to make an application.

node

A node symbolizes an instance of the platform/computational resource that components execute on, i.e. it is not possible to make a node.

component

A component is interpreted as an executable program.

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.

Hint:

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.

Actions to perform:

  • Select the component which should be configured.

Note:

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.

Actions to perform:

Figure 529 : Integration selection in the main window

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.

Hint:

If there is no set of pre-defined integration settings that fits your needs (e.g. a not yet supported compiler), it is recommended to select <user-defined> and to do the further configurations by hand.

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:

Note:

Directly after the SDL to C compiler is selected (i.e. after pre-defined integration settings are selected) the Targeting Expert checks if there is already an automatic configuration file sdl_cfg.h or extreme_user_cfg.h (done by the SDL to C compiler) available.

If not, the SDL to C compiler should be invoked to generate an automatic configuration.

For Cadvanced this is only done if the flag USER_CONFIG is set in the compiler options (e.g. -DUSER_CONFIG).

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.

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".

Actions to perform:

To select the desired configuration dialog, please select the correspondent entry in the partitioning diagram.

Figure 530 : Tree structure 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.

Figure 531 : Compiler configuration

Click Default if you want to restore the default values.

Variable Path it points to

sdtdir

<installationdir>/sdt/sdtdir/<platform> as long as Library directory is not set

scttargetdir

Absolute path to the current target directory (depends on the selected component)

sctobjdir

$(scttargetdir) + the relative path selected in Object directory

sctuseinclude (Cadvanced only)

$(sdtdir)/INCLUDE

sctincludedir (Cmicro only)

$(sdtdir)/cmicro/include

sctkerneldir (Cmicro only)

$(sdtdir)/cmicro/kernel

scttesterdir (Cmicro only)

$(sdtdir)/cmicro/tester

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.

Figure 532 :Single step compilation model

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.

Figure 533 :Three step compilation model

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.

Figure 534 : Source files used

Compiler Flag

Note:

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.

Figure 535 : Flag selection

Caution!

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

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.

Figure 536 : Additional compiler configuration

Linker

To link all the compiled files (generated ones, the ones building the library and additional ones) you must configure a linker.

Figure 537 : Linker configuration

Click Default if you want to restore the default values.

Library Manager

Note:

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

Figure 538 : Library Manager Configuration

Note:

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.

Figure 539 : Make tool configuration

Click Default if you want to restore the default values.

Hint:

"Using temporary response file" means that the compiler's and the linker's command line options are passed to the compiler/linker via a temporary file generated by the make tool.

This feature can only be used if the compiler in use supports this facility.

Note:

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

Note:

If the directory <target_directory>/<object_directory> does not exist it will be automatically created.

Note:

The Cmicro target library will be expected in a sub-directory called cmicro.

The Cadvanced library will be expected in a sub-directory called INCLUDE.

The Cextreme library will be expected in a sub-directory called cextreme.

Hint:

It is probably useful to use the utility functions delivered in combination with the Targeting Expert. Please see Utilities

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

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.

Figure 540 : Configuration flag dialog

When all the configurations have been done the Targeting Expert generates

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.

Actions to perform:

Configure how to Make the Component

The possible options are divided into four pages:

Note:

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

Figure 541

Note:

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.

Note:

If the generation of environment functions is switched on it may be needed to add the environment source file to Source Files.

Please see
Communication

Figure 542 : Communication configuration

Note:

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).

Figure 543 : TCP/IP communication wizard

As described in the dialog there are settings done in different sections of the Targeting Expert:

Furthermore the generation of

will be switched on.

Caution!

If the TCP/IP communication is switched on, a routing source file has to be provided, so that the signals destination can be calculated correctly! Otherwise all the signals will be sent to the sending application.

Caution!

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

Figure 544 : Env. header file configuration

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.

Note:

The CHANNELS section cannot be configured for Cmicro because the SDL systems structure (blocks and channels) will be lost after code generation.

Execution

Figure 545 : Download and test tool configuration

Note:

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.

Make the Component

The whole make process consists of several different tasks which will automatically be executed one after another. These tasks are:

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.

There are two possibilities:

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.

Hint:

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.

Hint:

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.

Note:

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.

Hint:

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
Contents Index Previous Next