Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: RandomInsano on April 27, 2010, 10:43:10 PM

Title: Where my a.out be at?
Post by: RandomInsano on April 27, 2010, 10:43:10 PM
So I'm starting my port efforts a little simply. I've been leafing through some decompiled firmware for my Telechips based Insignia NS-DV2C. The plan is to pulse a few of the GPIO ports to see if I can enable the back light and get my own code running. It's the embedded software developer version of hello world.

I'm trying to build my simple app but get the following output:

[edwin@Vault ~/Documents/Programming/Rockbox/build-blah]$ arm-elf-gcc -o Boot.bin -Wall *.c
/usr/local/arm-elf/lib/gcc/arm-elf/4.0.3/../../../../arm-elf/bin/ld: crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status

I'm not a GCC guru. How to I find the right crt0.o or how does rockbox deal with this problem?
Title: Re: Where my a.out be at?
Post by: saratoga on April 27, 2010, 10:58:28 PM
Thats not going to work.  You need to actually use the rockbox makefiles.  You won't be able to compile a binary independently of them.  Even if you could your player won't be able to run an ELF binary, at least not without you porting linux to it first.
Title: Re: Where my a.out be at?
Post by: RandomInsano on April 27, 2010, 11:02:14 PM
Curses! Foiled again! Are there any skeleton builds I can work up from? Seems the Cowon D2 has heavily different IO mapping and it's not a good base for a TCC8200 port. Well, not without severe gutting.
Title: Re: Where my a.out be at?
Post by: saratoga on April 27, 2010, 11:09:02 PM
The D2 bootloader is your best bet.  And don't bother gutting anything, just don't compile anything beyond the main function. 

Edit:  Or do compile it and just accept that after whatever infinite loop you're adding there will be code that doesn't run.