Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
C Language Features
 2012 Microchip Technology Inc.
DS52053B-page 233
5.15.2.1
PROGRAM SPACE PSECTS
checksum
 This is a psect that is used to mark the position of a checksum that has 
been requested using the --CHECKSUM option, see 
Section 4.8.17 “--ASMLIST: Generate Assembler List Files”. The check-
sum value is added after the linker has executed so you will not see the con-
tents of this psect in the assembly list file, nor specific information in the map 
file.
Linking this psect at a non-default location will have no effect on where the 
checksum is stored, although the map file will indicate it located at the new 
address. Do not change the default linker options relating to this psect.
cinit
 Used by the C initialization runtime startup code. Code in this psect is output 
by the code generator along with the generated code for the C program and 
does not appear in the runtime startup assembly module.
This psect can be linked anywhere within a program memory page, provided 
it does not interfere with the requirements of other psects.
config
 Used to store the configuration words.
This psect must be stored in a special location in the HEX file. Do not change 
the default linker options relating to this psect.
const These PIC18-only psects hold objects that are declared const and string liter-
als which are not modifiable. It is used when the total amount of const data 
in a program exceeds 64k.
This psect can be linked anywhere within a program memory page, provided 
it does not interfere with the requirements of other psects.
eeprom
 (PIC18: eeprom_data) Used to store initial values in the EEPROM memo-
ry.
Do not change the default linker options relating to this psect.
idata
 These psects contain the ROM image of any initialized variables. These 
psects are copied into the data psects at startup. In this case, the class name 
is used to describe the class of the corresponding RAM-based data psect. 
These psects will be stored in program memory, not the data memory space.
These psects are implicitly linked to a location that is anywhere within the 
CODE linker class. The linker options can be changed allowing this psect to 
be placed at any address within a program memory page, provided it does 
not interfere with the requirements of other psects.
idloc
 Used to store the ID location words.
This psect must be stored in a special location in the HEX file. Do not change 
the default linker options relating to this psect.
init
 Used by assembly code in the runtime startup assembly module. The code in 
this and the cinit define the runtime startup code. PIC18 devices also use 
an end_init psect, which contains the code which transfers control to the 
main function.
If no interrupt code is defined code from the Reset vector may “fall through” 
into this psect. It is recommended that the default linker options relating to 
this psect are not changed in case this situation is in effect.
intcode
intcodelo Are the psects which contains the executable code for the 
high-priority (default) and low-priority interrupt service routines, respectively. 
These psects are linked to interrupt vector at address 0x8 and 0x18, respec-
tively.
Do not change the default linker options relating to these psects. See 
Section 4.8.22 “--CODEOFFSET: Offset Program Code to Address” if 
you want to move code when using a bootloader.