8.4.3 __pc_data

The value of __pc_data is determined in the following order of precedence.

(1)

When __pc_data is defined in the application, that value is used.

Note

The compiler generates code based on the assumption that __pc_data is aligned at the 2-byte boundary. Therefore, make sure the defined value is a multiple of 2 when defining __pc_data in the application.

 

(2)

When there is only a reference to __pc_data in the application, the optimizing linker (rlink) automatically determines the __pc_data value in the following order of precedence.

(2-1) If there is a pcconst16 attribute section, the value is the intermediate value of the minimum address and

maximum address of all of those sections.

(2-2) If there is a pcconst23 attribute section, the value is the intermediate value of the minimum address and

maximum address of all of those sections.

(2-3) If there is a pcconst32 attribute section, the value is the minimum address of all of those sections.

(2-4) If none of the above sections exist and there is only a reference to __pc_data, the value is 0.

 

Note, however, that if the value attempted to be defined is an odd value, 1 is added to that value.