CANape Device Configuration: Memory Segment Listing
When selecting an XCP device in CANape device configuration, the tree element Memory Segment is shown. How can the entry of a segment be interpreted within the grid?
Basically, the grid shows all memory segments that can be read from the A2L file. It is possible to filter the elements by selecting Calibration data, Calibration data and code or All segments. For calibration purposes only those memory segments are relevant that are listed if Calibration data is selected. The memory segment definition is not regarded for flashing procedures.
Here is a wrap up concerning the usage of a memory segment in the A2L for defining the relationship between flash and ram parameters.
First of all: the description of the memory segment is available in the A2L specification. Here an excerpt of ASAP2 1.71 specification:
Now let us have a look at the usage of an example A2L file which is contained within the XCP example project of CANape 18.0.
Here an excerpt of the memory segments in CANape within the device (Devices|Device Configuration):
The corresponding MEMORY_SEGMENT within the A2L is:
DATA FLASH INTERN 0x1C0000 0x19D2 -1 -1 -1 -1 -1
/begin IF_DATA XCP
Here a short explanation of the memory segment grid columns:
- Name: Displays the name of the memory segment, here CALRAM.
- Start: Start address of the Segment, here 0x1C0000.
- End: End adress of the segment. Sum of start address and size, here 0x1C0000 + 0x19D2 = 0x1C19D1.
- Size: Size of segment, here 0x19D2.
- Type: Do the parameter addresses in the A2L refer to flash or RAM areas? The address definition of the parameters/calibration objects in the A2L should be within this address range. Explanation: If type RAM is defined, all parameters in A2L have to be defined for RAM addresses.
- RAM address: This column is filled if type Flash is defined. Column RAM address shows the corresponding start address in RAM defined for calibration purposes. Relevant for offset calculation Flash -> RAM. This address might differ from segment start address which results in an additional section ADDRESS_MAPPING in the A2L. If addresses do not differ the relation between flash and RAM is indicated via page switching.
- Flash address: This column is filled if type RAM is defined. Column Flash address shows the corresponding start address in Flash defined for i.e. flashing purposes. Relevant for offset calculation RAM -> Flash. This address might differ from segment start address which results in an additional MEMORY_SEGMENT of type FLASH with section ADDRESS_MAPPING in the A2L. If addresses do not differ, the relation between flash and RAM is indicated via page switching.
- Address extension: Shows if an address extension is defined in the memory segment.
- Content type: Definition which content is available in the segment, here DATA. The available keywords are defined in the A2L specification document. DATA is relevant for calibration purposes.
- The definitions for page switching are contained in sections /begin PAGE, in this case the IDs are 1 and 0. The first section /begin PAGE describes the source memory segment, therefore in this example page ID 1 is FLASH and page ID 0 is RAM.