Target Management
This section describes the target description file in detail. Some of the keywords are actually strings that basically are copied to the makefile created along with the generated code. Their type is “makefile string.” The user of this feature should have certain basic knowledge about Makefile language.
In particular, if the user wants to put $STM_ROOT as part of the value of string or makefile string keywords, the $ (for a Unix target) sign would be duplicated, like “$$STM_ROOT” or write “$(STM_ROOT).”
Some of the keywords contain OS paths. The user should be aware about proper directory separator character.
Type of Possible Values makefile string makefile string Standard system libraries for the target OS Name of the parameter that toggles the name of the output file for target OS C compiler Where the Rational Statemate intrinsics libraries are put in the given Rational Statemate installation Where the (Statemate) scheduler libraries are #Simulated scheduler library Where the (Statemate) simulated scheduler libraries are Where the (Statemate) debugger libraries are Where the Rational Statemate GBA library is put in the given Statemate installation Where the Rational Statemate Panel library is put in the given Statemate installation Additional, perhaps user- supplied, libraries that should participate in the linking of final executable Extension of object file on the target OS Command that should be run when building the output_lib.a (on UNIX) library #File deleting command Self explanatory. It is important that this command is not supposed to be interactive. makefile string Name of the directory where the final executable should be put #K&R C compiler name makefile string makefile string #ANSI C compiler name makefile string #ANSI C compiler flags makefile string #Download script name Name of the script/command that should be run to download the final executable to the target OS Name of the script/command that executes the final executable on the target OSNote: The internal double quote character should be replaced by the single quote character. For example, the line “ /D “PRT” should be replaced with “ /D ‘PRT”.You can manually change or create a new
<target
name>.rtrg
file based on your project’s specific target prototyping development system.Only the structure of the file and the names of the paragraphs should be unchangeable. So, the best way to change or create a new *
.rtrg
file is to copy the current file under a new name (e.g. the name of your target) and to change only the values in each line of the file that is affected by the new target.Note: Each line of the*.rtrg
file is terminated by a “hard return,” which means that each line is effectively a paragraph. This is important to the accurate parsing of the*.rtrg
file.Every line in the
*.rtrg
file affects a certain part of themakefile
, which is created during code generation, or the running of the generated/compiled code.Pay attention to the
#Run
script
name
line. Its value, if it is not empty, concatenates with the name of executable and runs as a shell command after the user selects the Run Code option of the Compile menu. So, users can write their own batch files that will take as a parameter the name of the executable and do any required operation. Such a technique is used to download and execute the generated code in a remote manner (refer to Downloading and Execution)The content of the
vxworks.rtrg
file is listed for reference in Target Description File.It is necessary to define the nature of the Target for the prototyping system. The initial step in this process is done using the dialog screen shown in the following figure. It is started using the File > Target Management menu item from the Profile Editor. The Target Management window opens.
There are several predefined targets presented in this dialog screen for you to choose from. Select the desired target by clicking on it. The selection is highlighted.
Because the rapid prototyping code generator supports an open set of user-defined targets, the list of supported targets can be supplemented with new targets or variations of existing targets. This is possible because each target selection corresponds to a target definition file using the naming format
<OS name>.rtrg
. All of the target related parameters are defined in that file. The buttons along the right hand side of the dialog screen allow for management of this file.Advanced users or project teams may decide to modify the target description files. Always work with a copy of a working file if at all possible. Save it under an appropriate name and document your changes so you can back up if something doesn’t work like you expected it to.
Note: The target definition file is similar to the file used for the standard C Code Generator, which uses a different extension (.trg). The file is an ASCII text file.Note that the targets listed here are the files’ prefix. All of the targets listed are those that are found (i.e, *
.trg/*.rtrg
files) in theprt/rprt
directory.