[U-Boot] run_command() / do_run() fails in standalone application

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

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

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

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@denx.de Real computer scientists don't comment their code. The identifiers are so long they can't afford the disk space.

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
participants (3)
-
Remy Bohmer
-
rudresh
-
Wolfgang Denk