The following example for a C compiler describes a workflow for creating a new target deployment port (TDP):
In the TDP editor, specify all the Basic settings. Do not hesitate to create intermediate keys to help with future changes. Save the TDP.
In Test RealTime, open the add.rtp project which is located in examples/TDP/tutorial. This is a simple project, which can be used for debugging.
Click Edit > Preferences > Project and select Verbose.
Click Project > Configuration to create a new configuration, and select the the new TDP. Click OK.
Select the new configuration based on the new TDP.
Click Settings > build > build options> build options>... remove all instrumentation. At this point any modifications of the DEFAULT_xxxx in the TDPeditor will be ignored in the project. Therefore, you must duplicate or copy any changes in the Build > Compiler/Link configuration settings.
In the project browser, right click add.c and select Compile. Check that the object file is generated in the correct directory. If any problems occurred, open the TDP Editor and correct the problems in Build Settings > Compilation function. Repeat this step until add.c is properly generated.
In the Build > Build options>... settings, enable coverage instrumentation only and remove all files located in the examples/TDP/tutorial/<xdpName> directory
In the project browser, right click add.c and select Compile. The instrumentation occurs after the preprocessing and before compilation. Check the .i file is generated properly in the correct directory. Check that it contains #line xx "fileName" or # xx "fileName". If any problems occurred, open the TDP Editor and correct the problems in Build Settings > Preprocessing function. Repeat this step until the .i file is properly generated.
Check that add.o or add.obj is generated in the correct directory and not a file named add_aug.o or add_aug.obj. If any problems occurred, open the TDP Editor and correct the problems in Build Settings > Compilation function. Repeat from step 9 until add.o or add.obj are properly generated.
In the project browser, right click TP.c and select Compile. Check that TP.o or TP.obj is generated in the correct directory. If any problems occurred, open the TDP Editor and correct the problems in Library Settings. Repeat this step until TP.o or TP.obj is properly generated.
Check that Test.exe is generated in the correct directory. If any problems occurred, open the TDP Editor and correct the problems in Build Settings > Link function. Repeat this step until Test.exe is properly generated.
Note Any files added in the TDP Editor Build settings are located in $TARGETDIR/cmd by default.
If your project uses cross-compiling on the host computer and if the target platform supports TCP/IP, then a TDP can easily be created for such a configuration. The following example describes how to create a TDP for Gnu when the host computer and remote target share disk space for a common work directory, which is used to export the application to the target.
Copy and rename the TDP clinuxgnu.xdp to use it as a working base, and then open the new TDP in TDP Editor.
Right-click the top level node of the TDP and select Rename to change its name.
Specify all the Basic settings for your compiler. Add the following settings:
NOPATHOUT: this is documented in the TDP Editor embedded documentation.
SOCKET_UPLOAD: specify how to retrieve results via TCP/IP. This is also in TDP Editor embedded documentation.
SHARED_LOCAL_DIR: specify the common tmp working directory as a path name on the local host computer.
SHARED_REMOTE_DIR: specify the common tmp working directory as seen from the remote target.
REMOTE_HOST: specify the name or IP address of the remote target (used by rsh/ssh).
REMOTE_USED: specify the username on the remote target (used by rsh/ssh).
REMOTE_CONNECTION: specify the connection method to be used (rsh/ssh)
In the build settings > execution function, remove all the code and replace with the 2 following lines:
require $SCRIPTDIR . "remoteFcts.pl";
return atl_exec2($exe,$out,$parameters);
For more information, refer to the remoteFcts.pl script located in <testrtdir>/lib/scripts.