All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Linux on the Virtex II Pro?- ELDK?
@ 2003-07-11 16:42 Kerl, John
  0 siblings, 0 replies; 3+ messages in thread
From: Kerl, John @ 2003-07-11 16:42 UTC (permalink / raw)
  To: 'Charles Lockhart', linuxppc-embedded


Charles,

Yes, this also can be done.  In fact, I use ELDK's
ppc_[48]xx-gcc to build the kernel, Linux apps, and standalone
apps.  In particuar, I use ppc_[48]xx-gcc to build the firmware
that loads the OS.  And of course ppc_8xx-gcc/ppc_4xx-gcc
is used to build U-Boot.

Your biggest whangup will probably be the C library
-- strcpy() et al. are easy to code up, but most people
find that making a printf() takes a bit more work.
If you don't already have such library routines written,
you might take a peek a U-Boot.  And you want a simple
crt0.S which zero-fills the BSS (_edata to _end), sets
the stack pointer and jumps into main.

Also you are responsible for direct access to the
UART hardware etc. but the good news is that a simple
polled-mode driver for a standalone application is generally
an order of magnitude simpler than a "real" driver for an
OS in which you would need to think about interrupts,
context switching, etc.

[Virtex-II Pro note:  If you want to build a standalone
app using Xilinx libgen'ed libraries, (1) you might use
their powerpc-eabi-gcc instead.  Or, (2) you might use ELDK's
ppc_4xx-gcc but include XPS's lib binaries; I haven't tried
that.  (3) You can use libgen'ed source code, & compile
with ELDK.  (4) You can dispense with the libgen'ed
stuff and write your own drivers.  This latter might be
preferable for simple devices such as UART lite and the
INTC.]

Having said that ... due to size restrictions, I won't
attach a sample makefile to everyone on the list.
However, I'll forward it to you separately, and will
send a copy to anyone else who requests it.

The essence, though, is:

ppc_4xx-ld -s -Bstatic -Ttext 0x00500000 $(OBJS) -o myfile.elf -Lwherever

Then

ppc_4xx-objcopy -O binary myfile.elf myfile.mem

if you want a plain binary.


-----Original Message-----
From: Charles Lockhart [mailto:lockhart@jeans.ifa.hawaii.edu]
Sent: Thursday, July 10, 2003 6:02 PM
To: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Linux on the Virtex II Pro?- ELDK?



Is it possible to use the ELDK to compile a simple stand alone
executable that I could download and start using my jtag interface?  I
tried compiling a really trivial piece of code with the "-static"
option, and it created a file that looks large enough to have included
everything it needs but when I download and start it, I don't see any of
the break points I'm setting being triggered.

I'd just like to do this as kind of a litmus test to show that I can
build something at least that'll execute.

-Charles Lockhart


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Linux on the Virtex II Pro?- ELDK?
  2003-07-11  1:02 ` Linux on the Virtex II Pro?- ELDK? Charles Lockhart
@ 2003-07-11  7:00   ` Wolfgang Denk
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2003-07-11  7:00 UTC (permalink / raw)
  To: Charles Lockhart; +Cc: linuxppc-embedded


In message <3F0E0C91.1000209@irtf.ifa.hawaii.edu> you wrote:
>
> Is it possible to use the ELDK to compile a simple stand alone
> executable that I could download and start using my jtag interface?  I

Yes, of course tis is possible. We use the ELDK for example to  build
the  U-Boot  boot  loader on a plethora of systems - which is nothing
else but a (bigger) standalone executable.

You will have to be careful about assumptions about:
- C runtime envrionment (there is none, or you have to set it up yourself)
- library usage (standard C libs require full C runtime envrionment
  plus some other things like standard file descriptors, etc.)

Feel free to have a look at U-Boot...

> tried compiling a really trivial piece of code with the "-static"
> option, and it created a file that looks large enough to have included
> everything it needs but when I download and start it, I don't see any of
> the break points I'm setting being triggered.

How did you set up your C runtim environment, for example: allocate a
stack, initialize the "parent" stack frame, etc. ?


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Once at a social gathering, Gladstone said to Disraeli,  "I  predict,
Sir,  that  you  will die either by hanging or of some vile disease".
Disraeli replied, "That all depends, Sir, upon whether I embrace your
principles or your mistress."

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Linux on the Virtex II Pro?- ELDK?
  2003-07-10 20:48 Linux on the Virtex II Pro? Kerl, John
@ 2003-07-11  1:02 ` Charles Lockhart
  2003-07-11  7:00   ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Lockhart @ 2003-07-11  1:02 UTC (permalink / raw)
  To: linuxppc-embedded


Is it possible to use the ELDK to compile a simple stand alone
executable that I could download and start using my jtag interface?  I
tried compiling a really trivial piece of code with the "-static"
option, and it created a file that looks large enough to have included
everything it needs but when I download and start it, I don't see any of
the break points I'm setting being triggered.

I'd just like to do this as kind of a litmus test to show that I can
build something at least that'll execute.

-Charles Lockhart


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2003-07-11 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-11 16:42 Linux on the Virtex II Pro?- ELDK? Kerl, John
  -- strict thread matches above, loose matches on Subject: below --
2003-07-10 20:48 Linux on the Virtex II Pro? Kerl, John
2003-07-11  1:02 ` Linux on the Virtex II Pro?- ELDK? Charles Lockhart
2003-07-11  7:00   ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.