[U-Boot-Users] questions about stand alone application - flash a LED

J.P. Casainho casainho at gmail.com
Mon Apr 14 22:18:18 CEST 2008


Hello Leon :-)

Thank you for your help!! :-)

I understand now that is not dificult to make a stand alone application, It's 
easy :-) - I am trying to learn the art of building, using GCC, make files, 
linking... :-)

Many thanks - have a nice days :-)

-- 
Cumprimentos,

JPCasainho - http://www.Casainho.net


On Monday 14 April 2008 10:26:54 Leon.Z wrote:
> HI:)
>
> You can use the go CMD to test your app.
> Here post my used step.
>
> Write a simple code.It's just include a function definition
> 	void _start()
>     {
>     }
> Then compile it.After do that use following step:
> ppc_82xx-ld -Bstatic -Ttext 0x00001000 board/bname/ttt.o -o ttt.elf
>
> -bash-2.05b$ ppc_82xx-objdump -d ttt.elf
>
> ttt.elf:     file format elf32-powerpc
>
> Disassembly of section .text:
>
> 00001000 <_start>:
>     1000:       94 21 ff e8     stwu    r1,-24(r1)
>     1004:       38 21 00 18     addi    r1,r1,24
>     1008:       4e 80 00 20     blr
> -bash-2.05b$
>
> you can see the function just call the stack operation.
> then you can put your test code to the _start function's body,
> and run the step above again.
>
> finally to get a pure bin file:
> ppc_82xx-objcopy --gap-fill=0xff -O binary ttt.elf ttt.bin
>
> and then test the code in the u-boot prompt:
> u-boot> tftp 0x1000 ttt.bin
> u-boot> go 0x1000
>
>
> ======= 2008-04-14 16:33:55 您在来信中写道:=======
>
> >Hello :-)
> >
> >I am looking for an example code for a Flash LED, for a stand alone
> >application. I did read the examples like "hello world" and the
> >/doc/standalone.
> >
> >I would like to know If I can build a stand alone application without
> >build the u-boot -- I would appreciate if someone point me to a
> >tutorial, I just find examples for load Linux...
> >
> >I am a newbie in 32 bits world. I am trying to port Rockbox*, the Free
> >Software firmware for audio DAPs like IPods, Sansas, etc., for a
> >Free/Open hardware, the Rockbox Player**.
> >
> >I need to use u-boot to launch that firmware, first I would like to
> >start doing a flash led application. I did build u-boot, using the
> >sources that came with the dev. board I am using, with success however
> >the firmware I want to build don't build with arm-linux-gcc, just with
> >arm-elf-gcc.
> >
> >I appreciate any suggestions, any guidance. Thank you.
> >
> >Jorge Pinto,
> >
> >http://www.casainho.net
> >
> >* http://www.rockbox.org/
> >** http://www.rockbox.org/twiki/bin/view/Main/RockboxPlayer
> >
> >-------------------------------------------------------------------------
> >This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >Don't miss this year's exciting event. There's still time to save $100.
> >Use priority code J8TL2D2.
> >http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/jav
> >aone _______________________________________________
> >U-Boot-Users mailing list
> >U-Boot-Users at lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
> = = = = = = = = = = = = = = = = = = = =
>
>
>         致
> 礼!
>
>
>         Leon.Z
>         leon.kernel at gmail.com
>           2008-04-14




More information about the U-Boot mailing list