Skip to contentSkip to conversation

questions about stand alone application - flash a LED

U-Boot-Users J.P. Casainho 2 participants 2 messages Apr 14, 2008 – Apr 17, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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 :-)

Signature · 3 lines
Cumprimentos,

JPCasainho - http://www.Casainho.net
Quoted 87 lines · 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 ????????=======

Quoted 29 lines

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

Quoted 9 lines

-------------------------------------------------------------------------
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

#2 lore raw

Hi,

Quoted 9 lines
Quoted 9 lines

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

It just occured to me that you are overwriting the InstructionTLBMiss exception vector here. Are you sure you want to do this?

This is one of the reasons why in examples/Makefile always 0x40000 is chosen for the standalone apps:

ifeq ($(ARCH),ppc)
LOAD_ADDR = 0x40000
endif

Cheers
Detlev

Signature · 8 lines
A stated design goal of Motif was to give the X Window System the
window management capabilities of HP's circa-1988 window manager and
the visual elegance of Microsoft Windows. We kid you not.
                                          -- The UNIX Haters Handbook
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de