Re: First program on arm board
- From: Chads <asheeshc@xxxxxxxxx>
- Date: Wed, 13 Feb 2008 01:04:53 -0800 (PST)
On Jan 31, 6:23 pm, Juergen Beisert <jbeis...@xxxxxxxxxxxx> wrote:
Chads wrote:Hi,
On Jan 31, 3:17 pm, Juergen Beisert <jbeis...@xxxxxxxxxxxx> wrote:
You like the hard way? Why do you do it in assembler?
It's not working. Seems I missing lots of things here. First thing
which comes is how to write linker file for it. Can someone please
guide me or give me pointer so that I can study it. I have found few
sample linker files from Linux kernel code also and trying to figure
out how to write them.
What's your intention? A program that runs on bare metal or as part of
the Linux kernel or something that should run as a usermode program?
Programming in assembler *could* make sense if it should run on bare
metal. For the other cases you should do it in "C".
Thank you for your response.But you wrote:
Yes I want to run it on bare metal thats why witting it in assembly.
I am very new to embedded linux. I have a pxa255 based board and I am
planning to put linux on it.
But if you plan to bring Linux in your box, why do you start with bare
metal?
Writing linker script files is not such complicated. Refer ld's manpages.
All it does is to give your code some kind of "layout" when it gets
translated to binary: Where to place the text segment content in the file
and at runtime (same for data and bss segment).
But how do you want to run this program on your bare metal? This CPU
needs some kind of setup after reset. To bring up the SDRAM controller
for example.
Juergen
First I am planning to have my basics ready. The very basic program
which I can think of is writing this code to toggle LED.
All right, you want to go the hard way...
Can you please let me know in detail what all setups will be required
to run program on bare metal?
Sorry, I can't. Because I know nothing about your hardware (only your
processor). At least your SDRAM controller must be actice and your clock
setup must be correct. Otherwise nothing will happen. And you will need
I was able to write linker script but still my first program is not
working.
Please see if someone can help.
-Chads
some kind of JTAG tool to bring your small program into your target.
Even if you can share path of any tutorial which explain in detail
will be very helpful.
Try to study the U-Boot bootloader code. They do all the required setup
and - maybe - your hardware is also supported.
I am currently reading "http://www.redhat.com/
docs/manuals/enterprise/RHEL-4-Manual/gnu-linker/scripts.html"
To link your program its the right direction.
JB
.
- Follow-Ups:
- Re: First program on arm board
- From: Juergen Beisert
- Re: First program on arm board
- Prev by Date: Re: Embedded linux: With or without MMU
- Next by Date: Re: First program on arm board
- Previous by thread: Arduino/SimpleMessageSystem w/shell scripts
- Next by thread: Re: First program on arm board
- Index(es):
Relevant Pages
|
|