linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* General fx60 notes, Question regarding forcing EDK to locate program code at an address
@ 2007-01-18 22:16 Wade Maxfield
  2007-01-18 22:25 ` T Ziomek
  0 siblings, 1 reply; 2+ messages in thread
From: Wade Maxfield @ 2007-01-18 22:16 UTC (permalink / raw)
  To: ppc

[-- Attachment #1: Type: text/plain, Size: 2359 bytes --]

  We are working on debugging an FX60 load.  We appear to have something
going into our DDR ram from the compact flash.

   We have learned some things about the fx60 I'd like to share without
giving away secrets.

  It turns out that the FX60 JTAG controller should be hooked up to PPC_1 as
the primary power pc in the chip.

   We found the 8.1 command line impact almost never runs right, so we use
7.1 impact to generate our system ace file.

   Our .opt file looks like the following.  Note that you MUST identify each
device on the jtag chain (minus the system.ace) in order for the
system.aceto do its magic Load the Xilinx trick.  If you don't tell it
of all the
devices on the chain, it will error out, even if those devices are cpld's
and there is not any xilinx load for them in the system.ace file.

genace.opt:

-ace system.ace
-hw implementation/download.bit
-board user
-target ppc_hw
-configdevice devicenr 1 idcode 0x21eb4093 irlength 14 partname xc4vfx60
-configdevice devicenr 2 idcode 0x16d8a093 irlength 8 partname xc2c128
-debugdevice devicenr 1 cpunr 2
-elf linux/zImage.elf
-elf ppc405_0/code/memtest.elf


our command line is as follows
xmd -tcl genace.tcl  -opt genace.opt


The debug device appears to affect which cpu gets the PC reset location
after the .elf file is located.

 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.

MY 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?

We'll be using this to prove that we can or cannot execute out of DDR ram.

[-- Attachment #2: Type: text/html, Size: 2685 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: General fx60 notes, Question regarding forcing EDK to locate program code at an address
  2007-01-18 22:16 General fx60 notes, Question regarding forcing EDK to locate program code at an address Wade Maxfield
@ 2007-01-18 22:25 ` T Ziomek
  0 siblings, 0 replies; 2+ messages in thread
From: T Ziomek @ 2007-01-18 22:25 UTC (permalink / raw)
  To: Wade Maxfield; +Cc: ppc

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...

> MY 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...

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-18 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18 22:16 General fx60 notes, Question regarding forcing EDK to locate program code at an address Wade Maxfield
2007-01-18 22:25 ` T Ziomek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).