2.7.1 Changing the allocation of a load module using the PIC/PID function

The allocation of a load module can be changed through the [Download files] property under the [Download] category on the [Download File Settings] tab in the Property panel.

Figure 2.24

[Download] Category

-

[Download files]

Click on the [...] button to open the Download Files dialog box.

 

Set up information on the load module in the [Download file property] area in the [Download file list] area of the Download Files dialog box.

-

[File]

Specify the load-module file using the PIC/PID function.

-

[Specify the PIC/PIROD/PID offset]

Select [Yes]. [PIC Offset], [PIROD Offset] and [PID Offset] will appear.

-

[PIC Offset]

Specify an offset in the code section from the original address allocated at the time the load module was created.

-

[PIROD Offset]

Specify an offset in the constant section from the original address allocated at the time the load module was created.

-

[PID Offset]

Specify an offset in the data section from the original address allocated at the time the load module was created.

Figure 2.25

Adding a Download File and Changing Conditions for Downloading (Download Files Dialog Box)

 

When the load module is downloaded after the values of [PIC Offset], [PIROD Offset] and [PID Offset] have been changed, the allocation of addresses for the code section and external or static variables is changed as shown in the figure below.

The figure shows examples of downloading a load module; "4000" and "0" are specified for [PIC Offset], [PIROD Offset], and [PID Offset] in the Download Files dialog box in the figures above and below, respectively.

In the figure above, "0x4000" is added to the base address.

Figure 2.26

Example of Downloading after the Offset Values of [PIC Offset], [PIROD Offset] and [PID Offset] Have been Changed