English
Language : 

CC78K4 Datasheet, PDF (305/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
Usage of saddr Area
-RS
(3) Usage with saddr automatic allocation option of internal static variables
FUNCTION
• Automatically allocates internal static variables (except const type) to saddr2 area regardless of an sreg
declaration.
• Depending on the value of n, the internal static variables to allocate can be specified as follows.
Table 11-11. Variables Allocated to saddr2 Area by -RS Option
Value of n
If 1
If 2
If 4
If omitted
Variables Allocated to saddr2 Area
Variables of char and unsigned char types
Variables if n is 1 and variables of short, unsigned short, int, unsigned it, enum,
small model pointer, and medium model data pointer type
Variables if n is 2 and variables of long, unsigned long, float, double, long double,
medium model function pointer, and large model pointer type
All variables (including structures, unions, and arrays in this case only)
• Variables declared with the keyword sreg are allocated to the saddr2 area regardless of the above
specification.
• The variables allocated to the saddr2 area by this option are handled in the same manner as the sreg
variable. The functions and restrictions for these variables are as described in (1).
METHOD OF SPECIFICATION
Specify the -RS [n] (n: 1, 2, or 4) option.
Remark With the -RS [n] option, modules specifying different n values can also be linked to each other.
User’s Manual U15556EJ1V0UM
305