[U-Boot-Users] Return values from u-boot to standalone application.

Leonid Leonid at a-k-a.net
Mon Oct 29 14:34:07 CET 2007


Sorry, I forgot to mention that I'm using at91rm9200 CPU (ARM9 from
Atmel) and u-boot version is 1.2.0 official release. May be there are
some known issues with standalone application for ARM? Stack getting
corrupted?

My code is but small variation of standard hello_world (attached) and
here is output:

U-Boot$ tftp 21000000 $image_path/hello_world.bin; go 21000000;
TFTP from server 192.168.0.108; our IP address is 192.168.0.205
Filename 'leonid/ref/images/hello_world.bin'.
Load address: 0x21000000
Loading: #
done
Bytes transferred = 620 (26c hex)
## Starting application at 0x21000000 ...
Example expects ABI version 3
Actual U-Boot ABI version 3
Hello World
argc = 1
argv[0] = "21000000"
argv[1] = "<NULL>"
main:48 line=help len=553648684
Hit any key to exit ...

## Application terminated, rc = 0x0
U-Boot$

Application is compiled to run from the address 0x21000000 which is the
middle of RAM.

Thanks,

Leonid.

-----Original Message-----
From: u-boot-users-bounces at lists.sourceforge.net
[mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf Of Leonid
Sent: Sunday, October 28, 2007 11:01 PM
To: u-boot-users at lists.sourceforge.net
Subject: [U-Boot-Users] Return values from u-boot to standalone
application.

Hi:

I have created u-boot standalone application and exported some string
functions (like strlen()). The application is working (doesn't fail) but
values which exported functions are returning don't look right. For
example, this printf() in standalone application

    printf ("cmdparse:%u line=%s len=%d\n", __LINE__, line,
strlen(line));

prints the following line:

cmdparse:407 line=help len=553684153

meaning strlen() return code is wrong. Same thing happens with strchr()
and other functions I have exported. 

Am I doing something wrong? How can I get correct return values from
u-boot to standalone application?

Thanks,

Leonid.

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello_world.c
Type: application/octet-stream
Size: 1540 bytes
Desc: hello_world.c
Url : http://lists.denx.de/pipermail/u-boot/attachments/20071029/822d5a17/attachment.obj 


More information about the U-Boot mailing list