English
Language : 

CC78K4 Datasheet, PDF (448/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
(42) Absolute address allocation specification
Absolute Address Allocation Specification
_ _directmap
FUNCTION
• The initial value of an external variable declared by _ _directmap and a static variable in a function is
regarded as the allocation address specification, and variables are allocated to the specified addresses.
• The _ _directmap variable in the C source is treated as an ordinary variable.
• Because the initial value is regarded as the allocation address specification, the initial value cannot be
defined and remains an undefined value.
• The specifiable address specification range, secured area range linked by the module for securing the area
for the specified addresses, and variable duplication check range are shown below.
With small model
Address Specification Range
0x80 to 0xFFFF
Secured Area Range
0xFD00 to 0xFEFF
Duplication Check Range
0xF000 to 0xFEFF
With large model (-CS0 specified)
Address Specification Range
0x80 to 0xFFFFFF
Secured Area Range
0xFD00 to 0xFEFF
Duplication Check Range
0xF000 to 0xFEFF
With large model (-CS15 specified)
Address Specification Range
0x80 to 0xFFFFFF
Secured Area Range
0xFFD00 to 0xFFEFF
Duplication Check Range
0xFF000 to 0xFFEFF
With medium model (-CS0 specified)
Address Specification Range
0xF000 to 0xFFFF
Secured Area Range
0xFD00 to 0xFEFF
Duplication Check Range
0xF000 to 0xFEFF
With medium model (-CS15 specified)
Address Specification Range
0xFF000 to 0xFFFFF
Secured Area Range
0xFFD00 to 0xFFEFF
Duplication Check Range
0xFF000 to 0xFFEFF
• If the address specification is outside the address specification range, an F799 error is output.
• If the allocation address of a variable declared by _ _directmap is duplicated and is within the duplication
check range, a W762 warning message is output and the name of the duplicated variable is displayed.
• If the address specification range is inside the saddr1 area, the _ _sreg1 declaration is made automatically
and the saddr1 instruction is generated. If the address specification range is inside the saddr2 area, the _
_sreg declaration is made automatically and the saddr2 instruction is generated.
• When the -CSA option is specified, a W338 warning message is output and the _ _directmap declaration in
the file is ignored.
EFFECT
One or more variables can be allocated to the same arbitrary address.
448
User’s Manual U15556EJ1V0UM