2008-02-07 06:45:10 pthreads
Servaes Joordens (NETHERLANDS)
Message: 50816
I tried a small multithreading application, but I get the error message:
illegal instruction
I guess multitrheading is not enabled by default (release: R07R1).
How do I enable multithreading?
regards,
Servaes
QuoteReplyEditDelete
2008-02-07 11:26:38 Re: pthreads
Robin Getz (UNITED STATES)
Message: 50828 Servaes:
pthreads is enabled by default.
What is the application you are running?
-Robin
QuoteReplyEditDelete
2008-02-11 06:06:45 Re: pthreads
Servaes Joordens (NETHERLANDS)
Message: 50902 This is the c-file and makefile.
Makefile
thread_test.c
QuoteReplyEditDelete
2008-02-11 11:29:36 Re: pthreads
Mike Frysinger (UNITED STATES)
Message: 50906 if you dont link against the pthread library, you obviously wont have the symbols defined
you need to add -lpthread to the linking step
QuoteReplyEditDelete
2008-02-12 16:55:35 Re: pthreads
Servaes Joordens (NETHERLANDS)
Message: 50950
I did include it. It is in the makefile!
It works fine when I compile it for a PC target system.
QuoteReplyEditDelete
2008-02-12 17:07:20 Re: pthreads
Mike Frysinger (UNITED STATES)
Message: 50951 sorry, you are correct of course ... i looked but the excessive echo's confused me and i missed the -lpthread
your test code works fine for me doing:
bfin-uclinux-gcc thread_test.c -lpthread -elf2flt
you didnt say what toolchain you were using, so if you're using bfin-uclinux-gcc and not including -elf2flt, the resulting binary will obviously not work
QuoteReplyEditDelete
2008-02-12 17:09:04 Re: pthreads
Servaes Joordens (NETHERLANDS)
Message: 50952
This is the output when i run the application on the blackfin target. (included file)
thread_output.txt
QuoteReplyEditDelete
2008-02-12 17:15:46 Re: pthreads
Servaes Joordens (NETHERLANDS)
Message: 50953
This is the output from the makefile of the linker part:
---------------------------------------------------------
bfin-uclinux-gcc -Wl -elf2flt thread_test.o -o thread_test -lpthread
--------------------------------------------------------- BUILD SUCCESS thread_test
As you can see, the -elf2flt is also used.
QuoteReplyEditDelete
2008-02-12 17:52:59 Re: pthreads
Mike Frysinger (UNITED STATES)
Message: 50958 what kernel are you using ? if you're using a 2007R1.1 toolchain, you must be using 2007R1.1 or newer
the crash indicates you're using too new a toolchain on a too old a target because the fixed code does not appear to be loaded at the fixed code offset
QuoteReplyEditDelete
2008-02-20 13:48:50 Re: pthreads
Servaes Joordens (NETHERLANDS)
Message: 51383
I will try to download matching versions of distrution and toolchain.
Thanks for the help.