English
Language : 

CC78K0S Datasheet, PDF (368/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(15) 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
RA78K0S Assembler Package User’s Manual Operations (U14876E).
• To change the section name @@CALT with an AT start address specified, the callt function 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 directive is possible, so if data is described after the rechange directive, 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. Furthermore, 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 in the desired data units.
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 statements
• Preprocessing directives that neither define nor reference variables or functions
However, all sections in BSEG and DSEG, and the @@CNST section in CSEG can be described anywhere in
the C source, and rechange directives can be performed repeatedly. To return to the original section name,
describe the compiler output section name in the changed section.
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 both.
368
User’s Manual U14872EJ1V0UM