UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 24323

8.2i EDK - When will XMD support overlays (virtual memory addresses and load memory addresses)?

Description

When will XMD support overlays (virtual memory addresses and load memory addresses)?

Solution

Every loadable or allocatable section in the ELF file has two addresses associated with it. The first is the virtual memory address (VMA), which is the address that the section will have when the executable is running. The second is the load memory address (LMA), which is the address in memory where the section will be loaded. In most cases, the two addresses are the same.

An example of when they might be different is when a data section is loaded into ROM, then copied into RAM when the program starts. This technique is often used to initialize global variables in a ROM-based system. In this case, the ROM address would be the LMA, and the RAM address would be the VMA. In this example, the program should handle copying the data section contents from the LMA address to the VMA address before they are used in the program. Refer to (Xilinx XAPP642): "Relocating Code and Data for Embedded Systems" for an example. Alternatively, a bootloader can also copy the contents of the data section from the LMA to the VMA address.

In EDK 8.2i and previous versions, when this type of program (i.e., includes sections with different LMA and VMA addresses) is loaded from XMD or "run" from SDK, the debugger loads the section to the VMA address. If the program copies the contents from the LMA address to the VMA address during initialization, the program execution fails because the contents at the LMA address are invalid.

The XMD tactical patch works only with EDK 8.2i Service Pack 2.

The patch linked below resolves this problem by loading the sections into LMA.

Extract the file into the $XILINX_EDK directory:

http://www.xilinx.com/txpatches/pub/swhelp/ise8_updates/xmd_overlays.zip

NOTE: This patch has been superseded by (Xilinx Answer 24808).

AR# 24323
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article