Page 2 of 6
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 1:16 pm
by prairie
juuso wrote:
Optional you can try this:
Code: Select all
arm-v7a8-linux-gnueabi-gcc -O2 -c helloworld.c -o helloworld.o
arm-v7a8-linux-gnueabi-gcc -shared -Wl -o hello helloworld.o
ok, some progress. Above generated error:
Code: Select all
relocation R_ARM_ABS_NC against a local symbol can not be used when making a shared object: recompile with -fPIC
So after recompile with fPIC, uploaded result to TV and it doesn't segfault now but gives "illegal instruction"
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 1:19 pm
by juusso
what code you try to compile? what is your sourcefile?
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 1:29 pm
by prairie
Code: Select all
#include <stdio.h>
main()
{
printf("Hello world!\n");
}
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 1:57 pm
by arris69
let the compiler do the job:
Code: Select all
<fullpath>/arm-v7a8-linux-gnueabi-gcc -o hello helloworld.c
if you like to make preprocess/compile/linking manually then you have to pass all required parameters to the compiler/assambler/linker...
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 2:02 pm
by prairie
arris69 wrote:let the compiler do the job:
Code: Select all
<fullpath>/arm-v7a8-linux-gnueabi-gcc -o hello helloworld.c
if you like to make preprocess/compile/linking manually then you have to pass all required parameters to the compiler/assambler/linker...
I tried that first.

Which is what led me to think it's a toolchain issue because that segfaults too.
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 2:04 pm
by juusso
Try this code:
Code: Select all
#include <stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
and arris`s cmdline
p.s. segfaults are not because of toolchain, but because of your code.
p.p.s this ok for me:
Code: Select all
root@[TV] /mtd_rwcommon> chmod 755 ./hello
root@[TV] /mtd_rwcommon> ./hello
Hello World!
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 2:11 pm
by prairie

Problem was not toolchain or code, was stupid filezilla ftp upload of executable. When I copy over via USB stick it's fine.
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 2:37 pm
by bugficks
heh, text vs. binary xfer mode?
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 2:41 pm
by prairie
bugficks wrote:heh, text vs. binary xfer mode?
no, I use it for binary transfer all the time between home and work machines, it's something unique about TV.
So far tested on my TV:
STFU - works.
SleepTimer - crashes exeDSP (must be changed function here)
Re: Toolchain guidance needed
Posted: Sat Sep 21, 2013 2:45 pm
by juusso
prairie wrote:SleepTimer - crashes exeDSP (must be changed function here)
possible. We checked only GAS* code, but GAP* needs to be checked/tested. Do you have IDA bin file of your fw?