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

An application load-module file can be added to the master through the [Download files] property under the [Download] category on the [Download File Settings] tab in the Property panel.

Figure 2.93

[Download] Category

-

[Download files]

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

 

Click on the [Add] button in the [Download file list] area of the Download Files dialog box and set up information on the application load module in the [Download file property] area.

-

[File]

Specify the application load-module file to be downloaded.

-

[Specify the PIC/PID offset]

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

-

[PIC Offset]

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

-

[PID Offset]

Specify an offset to be set in the PID register selected at the time the load module was created.

Figure 2.94

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] and [PID Offset] have been changed, the allocation of addresses for the P section and external or static variables is changed as shown in the figure below.

The left half shows an example where 4000 is specified for [PIC Offset] and [PID Offset] in the Download Files dialog box while the right half shows an example where 0 is specified.

In the left half, 4000 is added to the original address.

Figure 2.95

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