English
Language : 

CC78K4 Datasheet, PDF (375/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
(19) Changing compiler output section name
#pragma section…
#pragma section
FUNCTION
• A compiler output section name is changed and a start address is specified. If the start address is omitted,
the default allocation is assumed. For the compiler output section name and default location, refer to
APPENDIX B LIST OF SEGMENT NAMES. In addition, the location of sections can be specified by omitting
the start address and using the link directive file at the time of link. For the link directives, refer to the
RA78K4 Assembler Package Operation User’s Manual.
• To change section names @@CALT and @@CALF with an AT start address specified, the callt and callf
functions must be described before or after the other functions in the source file.
• If data is described after the #pragma directive is described, that data is located in the data change section.
Another change instruction is possible, and if data is described after the rechange instruction, that data is
located in the rechange section. If data defined before a change is redefined after the change, it is located in
the rechanged section. Note that this is valid in the same way for static variables (within the function).
EFFECT
• Changing the compiler output section repeatedly in one file enables location of each section independently, so
that data can be located independently in the desired data unit.
USAGE
• Specify the name of the section to be changed, a new section name, and the start address of the section, by
using the #pragma directive as indicated below.
Describe this #pragma directive at the beginning of the C source.
Describe this #pragma directive after #pragma PC (processor type).
The following items can be described before this #pragma directive.
• Comment statement
• Preprocessing directive that neither defines nor references a variable or a function
However, all the sections in BSEG and DSEG, and the @@CNST, @@CNSTS and @@CNSTM sections in
CSEG can be described anywhere in the C source, and rechange instructions can be performed repeatedly. To
return to the original section name, describe the compiler output section name in the changed section name.
Declare as follows at the beginning of the file.
#pragma section compiler-output-section-name new section-name [AT start address]
• Of the keywords to be described after #pragma, be sure to describe the compiler output section name in
uppercase letters. section, AT can be described in either uppercase or lowercase letters, or in a combination
of these.
User’s Manual U15556EJ1V0UM
375