| Real-Time Workshop® | ![]() |
addLinkFlags(buildinfo, options, groups)
groups is optional.
Build information returned by RTW.BuildInfo.
A character array or cell array of character arrays that specifies the linker options to be added to the build information. The function adds each option to the end of a linker option vector. If you specify multiple options within a single character array, for example '-MD -Gy', the function adds the string to the vector as a single element. For example, if you add '-MD -Gy' and then '-T', the vector consists of two elements, as shown below.
'-MD -Gy' '-T'
A character array or cell array of character arrays that groups specified linker options. You can use groups to
Document the use of specific linker options
Retrieve or apply groups of linker options
You can apply
A single group name to a compiler option
A single group name to multiple compiler options
Multiple group names to collections of multiple compiler options
| To... | Specify groups as a... |
|---|---|
| Apply one group name to all linker options | Character array. To specify linker options to be used in the standard Real-Time Workshop makefile build process, specify the character array 'OPTS' or 'OPT_OPTS'. |
| Apply different group names to linker options | Cell array of character arrays such that the number of group names matches the number of elements you specify for options. Available for nonmakefile build environments only. |
The addLinkFlags function adds specified linker options to the model's build information. The Real-Time Workshop software stores the linker options in a vector. The function adds options to the end of the vector based on the order in which you specify them.
In addition to the required buildinfo and options arguments, you can use an optional groups argument to group your options.
Add the linker -T option to build information myModelBuildInfo and place the option in the group Temp.
myModelBuildInfo = RTW.BuildInfo; addLinkFlags(myModelBuildInfo, '-T','Temp');
Add the linker options -MD and -Gy to build information myModelBuildInfo and place the options in the group Debug.
myModelBuildInfo = RTW.BuildInfo; addLinkFlags(myModelBuildInfo, '-MD -Gy','Debug');
Add the linker options -MD, -Gy, and -T to build information myModelBuildInfo. Place the options -MD and-Gy in the group Debug and the option -T in the groupTemp.
myModelBuildInfo = RTW.BuildInfo;
addLinkFlags(myModelBuildInfo, {'-MD -Gy' '-T'},
{'Debug' 'Temp'});
addCompileFlags, addDefines
Programming a Post Code Generation Command
![]() | addIncludePaths | addLinkObjects | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |