beautypg.com

Data space management – Wavetronix Click 500 (programmable controller) (CLK-500) - Developer Guide User Manual

Page 108

background image

CHAPTER 10 • MEMORY MANAGEMENT 107

Figure 10.2 – .ORG File

Figure 10.3 – .MAP File

The preceding .org file shows how much of an allocated range is actually used. In addition,

there is an information window that displays the total code size after each compile.

Data Space Management

There is about 756 K of total memory for data storage. Only a small portion of this data

space is in root memory. To increase the amount of data space in root memory, set the

directive ROOT_SIZE_4K to be equal to 0x1 using the Defines tab under Project Options.

The data not in the root block must be declared using the “far” prefix.

In the .org and .map files, physical addresses can be determined from logical address in-

formation. To do so, take the two digit value to the left of the colon and add three zeros to

the right of it. Then take the resulting five-digit value and add it to the four-digit value on

the right of the colon. For example, 10:b1bc translates to physical hex address 0x01 b1bc.

While the program is being debugged you can do a memory dump to look at the contents of

the data space. You can enter an address for the memory dump window the following three