public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] run_command() / do_run() fails in standalone application
@ 2008-12-26  6:50 rudresh
  2008-12-26 10:40 ` Remy Bohmer
  0 siblings, 1 reply; 5+ messages in thread
From: rudresh @ 2008-12-26  6:50 UTC (permalink / raw)
  To: u-boot


Hi,

i'm using the standalone application to run the command's using do_run() /
run_command function available in /common/mani.c. i followed the steps
mentioned in README.standalone file. there is no compilation error or
warnings. when i tftp that application to 0x40000 to Power PC evaluation
board then i start executing go 40004 command its not doing any thing. i
suppose to the get help command info after executing this application. why
its not running that command? code is as follows

char *p = getenv ("help")
run_command (p, 0);
do_run(NULL,0,1,"help");

Thanks
Rudresh
-- 
View this message in context: http://www.nabble.com/run_command%28%29---do_run%28%29-fails-in-standalone-application-tp21172262p21172262.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

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

* [U-Boot] run_command() / do_run() fails in standalone application
  2008-12-26  6:50 [U-Boot] run_command() / do_run() fails in standalone application rudresh
@ 2008-12-26 10:40 ` Remy Bohmer
  2008-12-26 16:30   ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Remy Bohmer @ 2008-12-26 10:40 UTC (permalink / raw)
  To: u-boot

Hello,

> when i tftp that application to 0x40000 to Power PC evaluation
> board then

Is there really RAM located at this address on your board?
Address 0x40000 is usually only an example address...

> i start executing go 40004 command its not doing any thing.

You should use the the same address in the 'go' command as to which
you load the executable.

Have fun!

Remy

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

* [U-Boot] run_command() / do_run() fails in standalone application
  2008-12-26 10:40 ` Remy Bohmer
@ 2008-12-26 16:30   ` Wolfgang Denk
  2008-12-27  9:30     ` Remy Bohmer
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2008-12-26 16:30 UTC (permalink / raw)
  To: u-boot

Dear Remy,

In message <3efb10970812260240q4b3c7178nab2e9788a5b7cf8d@mail.gmail.com> you wrote:
> 
> > when i tftp that application to 0x40000 to Power PC evaluation
> > board then
> 
> Is there really RAM located at this address on your board?
> Address 0x40000 is usually only an example address...

It is very likely that there is RAM at this address. On PowerPC, RAM
usually is mapped starting at physical address 0.

> > i start executing go 40004 command its not doing any thing.
> 
> You should use the the same address in the 'go' command as to which
> you load the executable.

This advise is almost certainly wrong - the entry point is usually not
the same as the image's start address.

If in doubt, it helps reading the FAQ. See especially section
"14.2.16. My standalone program does not work" ...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Real computer scientists don't comment their  code.  The  identifiers
are so long they can't afford the disk space.

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

* [U-Boot] run_command() / do_run() fails in standalone application
  2008-12-26 16:30   ` Wolfgang Denk
@ 2008-12-27  9:30     ` Remy Bohmer
  2008-12-27 11:17       ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Remy Bohmer @ 2008-12-27  9:30 UTC (permalink / raw)
  To: u-boot

Hello Wolfgang,

> In message <3efb10970812260240q4b3c7178nab2e9788a5b7cf8d@mail.gmail.com> you wrote:
>> > when i tftp that application to 0x40000 to Power PC evaluation
>> > board then
>> Is there really RAM located at this address on your board?
>> Address 0x40000 is usually only an example address...
> It is very likely that there is RAM at this address. On PowerPC, RAM
> usually is mapped starting at physical address 0.

This is different per architecture, and not properly explained in the
readme and the faq.
Is the memory there really always free?

>> > i start executing go 40004 command its not doing any thing.
>> You should use the the same address in the 'go' command as to which
>> you load the executable.
> This advise is almost certainly wrong - the entry point is usually not
> the same as the image's start address.

Indeed, it worked in our case on ARM properly, because the examples
are compiled such that there are no symbols before the entry point...
If a routine is added in the same file above the entry point, the
entry point indeed moves.
But, why is this information on the FAQ still not in the README? This
is what most people tend to read first...

Kind Regards,

Remy


> If in doubt, it helps reading the FAQ. See especially section
> "14.2.16. My standalone program does not work" ...
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Real computer scientists don't comment their  code.  The  identifiers
> are so long they can't afford the disk space.
>

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

* [U-Boot] run_command() / do_run() fails in standalone application
  2008-12-27  9:30     ` Remy Bohmer
@ 2008-12-27 11:17       ` Wolfgang Denk
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2008-12-27 11:17 UTC (permalink / raw)
  To: u-boot

Dear Remy,

In message <3efb10970812270130n429d5853l930a69d784e7855d@mail.gmail.com> you wrote:
> 
> This is different per architecture, and not properly explained in the
> readme and the faq.

Please feel free to contribute and improve the documentation...

> Is the memory there really always free?

On PowerPC: yes.

> But, why is this information on the FAQ still not in the README? This
> is what most people tend to read first...

Well, IMO the user ("user" in the sense of one who  uses  an  already
running  U-Boot)  is  supposed  to  read  the manual first, while the
README (and even more the project pages in the  wiki)  are  important
for  a  developer  (one  who  configures, builds and runs U-Boot). As
such, command usage (as for the "go" command) is expected to be found
in the manual. Implementation and porting details can be found in the
doc/README.standalone file, which is IMO ok, too. I think it makes no
sense to litter the README with  all  information  about  everything.
YMMV, of course.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You don't need a weatherman to know which way the wind blows.
                                                          - Bob Dylan

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

end of thread, other threads:[~2008-12-27 11:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-26  6:50 [U-Boot] run_command() / do_run() fails in standalone application rudresh
2008-12-26 10:40 ` Remy Bohmer
2008-12-26 16:30   ` Wolfgang Denk
2008-12-27  9:30     ` Remy Bohmer
2008-12-27 11:17       ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox