English
Language : 

CC78K0S Datasheet, PDF (375/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
#pragma section…
#pragma section…
[Examples of Changing Startup Routine in Connection with Changing Section Name Related to ROMization]
Here are examples of changing the startup routine (cstart.asm or cstartn.asm) and end module (rom.asm) in
connection with changing a section name related to ROMization.
(C source)
#pragma section @@R_INIT RTT1
#pragma section @@INIT
TT1
If a section name that stores an external variable with an initial value has been changed by describing #pragma
section indicated above, the user must add to the startup routine the initial processing of the external variable to
be stored to the new section.
To the startup routine, therefore, add the declaration of the first label of the new section and the portion that
copies the initial value, and add the portion that declares the end label to the end module, as described below.
RTT1_S and RTT1_E are the names of the first and end labels of section RTT1, and TT1_S and TT1_E are the
names of the first and end labels of section TT1.
(Example of changing startup routine cstartx.asm)
<1> Add the declaration of the label indicating the end of the section with the changed name
EXTRN
EXTRN
.
.
.
_main,_exit,_@STBEG
_?R_INIT,_?R_INIS,_?DATA,_?DATS
EXTRN
RTT1_E,TT1_E
.
.
.
← Adds EXTRN declaration of RTT1_E and TT1_E
User’s Manual U14872EJ1V0UM
375