English
Language : 

CC78K0S Datasheet, PDF (319/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Usage of saddr Area
-RD
(2) Usage with saddr automatic allocation option of external variables/external static variables
FUNCTION
• External variables/external static variables (except const type) are automatically allocated to the saddr area
regardless of whether an sreg declaration is made or not.
• Depending on the value of n, the external variables and external static variables to be allocated can be
specified as follows.
Table 11-8. Variables Allocated to saddr Area by -RD Option
Value of n
1
2
4
When omitted
Variables Allocated to saddr Area
Variables of char and unsigned char types
Variables for when n = 1, plus variables of short, unsigned short, int, unsigned int,
enum, and pointer type
Variables for when n = 2, plus variables of long, unsigned long, float, double, and
long double type
All variables (including the structures, unions, and arrays in this case only)
• Variables declared with the keyword sreg are allocated to the saddr area, regardless of the above
specification.
• The above rule also applies to variables referenced by the extern declaration, and processing is performed as
if these variables were allocated to the saddr area.
• The variables allocated to the saddr area by this option are treated in the same manner as sreg variables.
The functions and restrictions of these variables are as described in (1).
METHOD OF SPECIFICATION
Specify the -RD [n] (n: 1, 2, or 4) option.
RESTRICTIONS
• In the -RD [n] option, modules specifying a different n value cannot be linked to each other.
User’s Manual U14872EJ1V0UM
319