From: Andrew Wozniak <awozniak@mc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] printf with u-boot-1.1.2
Date: Tue, 11 Oct 2005 14:56:40 -0400 [thread overview]
Message-ID: <434C0AE8.2010202@mc.com> (raw)
In-Reply-To: <20051011163824.25257.qmail@web30714.mail.mud.yahoo.com>
Andrew Wozniak | Mercury Computer Systems
978.967.1895 | System SW, ICS Group
Shakthi Kannan wrote:
> Greetings!
>
> I am using u-boot-1.1.2 with CodeSourcery's 3.4.3
> cross-toolchain for ARM on the Versatile PB-ARM926EJ-S
> board.
>
> u-boot compiles fine. The hello_world.c in examples/
> compiles fine. From the given example, I have removed
> all statements except the printf statement. It
> compiles fine.
>
> I load it address 04000000 (SDRAM on board, top bank).
> I execute it using "go 04000000", it runs and exits
> with rc=0x0. But, I don't see the printf string being
> printed. Only one character gets printed. I am
> wondering if printf uses \r after every character gets
> printed, so it basically overwrites.
>
> I am able to display a character, using putc(). getc()
> also works fine. These work if I load it a SDRAM
> address, say, 0x05000000, and give the entry point as
> 05000000 itself (go 05000000). But, the documentation
> mentions offset 0x4 as entry point.
Why not try running with the offset - works for me.
> I'd appreciate any feedback on what I am doing wrong
> and how I can get the printf working.
Assuming you compiled with -g, take a look at hello_world.o for the
generated assembly code. See anything obvious?
$ ppc_405-objdump -S hello_world.o
hello_world.o: file format elf32-powerpc
Disassembly of section .text:
00000000 <hello_world-0x4>:
0: 00 00 7f e8 .long 0x7fe8
00000004 <hello_world>:
int hello_world(int argc, char *argv[])
{
4: 94 21 fe 48 stwu r1,-440(r1)
8: 7c 08 02 a6 mflr r0
c: be c1 01 90 stmw r22,400(r1)
10: 90 01 01 bc stw r0,444(r1)
14: 48 00 00 05 bl 18 <hello_world.c+0x14>
18: 7f c8 02 a6 mflr r30
1c: 80 1e ff e8 lwz r0,-24(r30)
20: 7f c0 f2 14 add r30,r0,r30
DECLARE_GLOBAL_DATA_PTR;
bd_t *bd = gd->bd;
24: 83 9d 00 00 lwz r28,0(r29)
<snip>
> Thanks,
>
> SK
>
> --
> Shakthi Kannan, MS
> Software Engineer, Specsoft (Hexaware Technologies)
> [E]: shakthimaan at yahoo.com [M]: (91) 98407-87007
> [W]: http://www.shakthimaan.com [L]: Chennai, India
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
next prev parent reply other threads:[~2005-10-11 18:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 16:38 [U-Boot-Users] printf with u-boot-1.1.2 Shakthi Kannan
2005-10-11 18:56 ` Andrew Wozniak [this message]
2005-10-13 7:51 ` Shakthi Kannan
2005-10-13 13:43 ` Andrew Wozniak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=434C0AE8.2010202@mc.com \
--to=awozniak@mc.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox