Technical data
#pragma Directives [3]
Note: Use of this directive prevents the cache_bypass directive from being
processed because when uses_eregs is in effect, no E registers are available
to the compiler.
3.5.7 soft Directive
Scope: Global
The soft directive specifies external identifiers with references that are to be
considered soft. Soft external references can be to a function or to a data object.
Soft externals do not increase your program’s total memory requirements.
The format of this directive is as follows:
#pragma _CRI soft [var...]
var List of one or more soft externals, separated by commas (,) and
optionally enclosed in parentheses.
Declaring a soft external directs the linker to link the object or function only if it is
already linked (that is, if it has been referenced without soft externals in another
code file); otherwise, it is left as an unsatisfied external. If you declare a soft
external, you also direct the linker to inhibit an unsatisfied external message if
it is left unsatisfied.
Note: The loader treats soft externals as unsatisfied externals, so they remain
silently unsatisfied if all references are under the influence of a soft directive.
Thus, it is your responsibility to ensure that run-time referencesto soft external
names do not occur unless the loader (using some "hard" reference elsewhere)
has actually loaded the entry point in question. You can determine whether a
soft external has been loaded by calling the loaded(3) library function.
The soft directive must appear at global scope. Soft externals must have the
following attributes:
• They must be declared, but not defined or initialized, in the source file.
• They cannot be declared with a static storage class.
• They cannot be declared as task common.
The following example illustrates these restrictions:
S–2179–36 55










