General fx60 notes, Question regarding forcing EDK to locate program code at an address

T Ziomek ctz001 at
Fri Jan 19 09:25:21 EST 2007

On Thu, 18 Jan 2007, Wade Maxfield wrote:
  . . .
> The memtest.elf file is stuck in the ppc405_0 directory because that is
> where it started, and the gui won't let us change it without rebuilding the
> project.
> We are loading two .elf files so that we have the program counter set to
> the internal (Block Ram) memory test/boot loader after the .elf files are
> finished loading.  This lets us look at our ddr ram memory and prove the
> linux load made it there.  The first .elf file loads, then the second one,
> then the pc is set to the start address of the second .elf file.  Since the
> second .elf file loads into block ram, it is doing nothing, as that is
> determined by the bitstream in the fpga fabric.  There may be easier ways to
> do this.

I'm not sure how the above relates to your question...

> What I would like to do is create a .elf file with the Xilinx EDK and
> force it to be located at a particular address (0x400000 for example).
> I've looked and looked, but obviously I've not looked at the right
> places.
> Does anyone know how to do this with the Xilinx EDK?

You should be able to just use a custom linker script (a.k.a. linker com-
mand file) rather than the default.  You can base this custom file on the
default version and just specify the address you want.

The linker script syntax is not all that obvious, but the GNU 'ld' docu-
mentation it pretty well.

N.B.  My personal preference is to not use the EDK; I find it just makes
       it difficult to understand what is actually happening.  But then I
       like the command line...

   /"\  ASCII Ribbon Campaign   |
   \ /                          |   Email to user 'CTZ001'
    X        Against HTML       |             at ''
   / \     in e-mail & news     |

More information about the Linuxppc-embedded mailing list