RE: [U-Boot-Users] Re: Re: really really tiny code

Hi Nishant,
Nishant Galange wrote:
The only help I need is with gcc, or ppc_82xx-gcc, to be precise. I have no idea how to give it a single .S or .asm file and tell it to
create a .bin.
Makefiles? I only know how to use readymade ones, not to how to create
one.
This example should help you.I used it when i did not have my debugger up and running,
I use a montavista ppc_82xx- toolchain .My uboot source is in /home/bharath, textbase is 0xfff00000 . I used my custom init file's and my c (quick_test) file to test my target board.
Change them to use for your configuration.
*-----------------------------*
export PATH=$PATH:/opt/montavista/devkit/ppc/82xx/bin
ppc_82xx-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BA SE=0xfff00000 -I/home/bharath/sources/u-boot/include -fno-builtin -ffreestanding -nostdinc -isyst em /opt/montavista/devkit/ppc/82xx/lib/gcc-lib/powerpc-hardhat-linux/3.3.1/incl ude -pipe -DCONFI G_PPC -D__powerpc__ -DCONFIG_8260 -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -mmultiple -c -o mpc 8270_init.o mpc8270_init.S
ppc_82xx-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff00000 -I/home/bhara th/sources/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/montavista/devkit/p pc/82xx/lib/gcc-lib/powerpc-hardhat-linux/3.3.1/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFI G_8260 -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -mmultiple -Wall -Wstrict-prototypes -c -o mpc8 270_init_h.o mpc8270_init_h.c
ppc_82xx-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff00000 -I/home/bhara th/sources/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/montavista/devkit/p pc/82xx/lib/gcc-lib/powerpc-hardhat-linux/3.3.1/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFI G_8260 -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -mmultiple -Wall -Wstrict-prototypes -c -o quic k_test.o quick_test.c
ppc_82xx-ld -Bstatic -e 0xfff00100 -n $UNDEF_SYM -o quick_test mpc8270_init.o mpc8270_init_h.o qu ick_test.o
ppc_82xx-objcopy -x -g -O binary quick_test quick_test.bin
*--------------------------*
Hope this helps,
Cheers,
.Bharath.
Ps: See how u-boot compiles your source.
"One World, One Web, One Program" - Microsoft Promotional Ad "Ein Volk, Ein Reich, Ein Fuhrer" - Adolf Hitler DISCLAIMER This message and any attachment(s) contained here are information that is confidential, proprietary to HCL Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer
participants (1)
-
Bharath G - CTD , Chennai