u-boot standalone apps/programs

I am trying to build and run a u-boot standalone app for my beagle
board C3.
The code is as simple as,

int main()
{
  return 0;
}
I am using arm-none-linux-gnueabi-gcc tool chain ,after the a.out is
built ,I copy it on my mmc fat partition , At beagle prompt the
following commands are issued

fatload mmc 0 80200000 a.out
the a.out is read successfully
then
go 80200000
then it says
Startng application at 80200000 ..... and its stuck there nothing
happens.....

are my steps right ?

I ve also tried with elf , mkimage etc etc but same error

What do you expect to happen?

might wanna add a uart_printf (-:

— On Fri, 1/13/12, Vladimir Pantelic vladoman@gmail.com wrote:


> From: Vladimir Pantelic vladoman@gmail.com
> Subject: Re: [beagleboard] u-boot standalone apps/programs
> To: beagleboard@googlegroups.com
> Date: Friday, January 13, 2012, 4:15 PM
>
> On 01/13/2012 01:44 PM, Kartik Gurlhosur wrote:
> > I am trying to build and run a u-boot standalone app for my beagle
> > board C3.
> > The code is as simple as,
> >
> > int main()
> > {
> > return 0;
> > }
> > I am using arm-none-linux-gnueabi-gcc tool chain ,after the a.out is
> > built ,I copy it on my mmc fat partition , At beagle prompt the
> > following commands are issued
> >
> > fatload mmc 0 80200000 a.out
> > the a.out is read successfully
> > then
> > go 80200000
> > then it says
> > Startng application at 80200000 … and its stuck there nothing
> > happens…
>
> What do you expect to happen?
>
> –
> You received this message because you are subscribed to the Google Groups “Beagle Board” group.
> To post to this group, send email to beagleboard@googlegroups.com.
> To unsubscribe from this group, send email to beagleboard+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.

|

You should not let your main function return because there is no OS.
You can do this:

int main()
{
int cnt = 0;
while (1) {
uart_printf(“count = %d\n”, cnt++);
// sleep 1 second here
}
}

Tried the above code same problem ,also tried the hello_world.bin
present in examples/standalone still the same problem . after
Starting application at address 0x80200000 ... its stuck , tried with
different memory locations too ...

tried the above code same problem ,also tried the hello_world.bin from
examples/standalone dir ,still same problem :frowning:

Since you do not have an OS kernel, you need to use ld to relocate your binary object to the memory address you want. You also need to create your linker command file.

This may help you.

http://code.google.com/p/puppybits/