[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Makefile for Thread Program
Hi Badri,
badri v wrote:
>
> I am trying to run a threaded program ( a simple 1..a
> thread to calculate 1+1+1+1..)..
I haven't tested pthread support for microblaze yet - please let us know
if it works out for you.
> I dono how to write a Makefile for this..
>
>
> I have writen one from the avilable Makefile's..
>
> Is it write?
Try something like this (I copied it from user/hd/Makefile):
EXEC = sumThread
OBJS = sumThread.o
all: $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) -lpthread
romfs:
$(ROMFSINST) -e CONFIG_USER_SUMTHREAD_SUMTHREAD
/bin/$(EXEC)
$(ROMFSINST) -e CONFIG_USER_SUMTHREAD_SUMTHREAD \
-a "morse:unknown:/bin/sumThread" /etc/inittab
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
For this to work, you will need to modify uClinux-dist/config/config.in
to define CONFIG_USER_SUMTHREAD_SUMTHREAD, and add it to the config menu
etc. Just take an example from some existing user program entry.
Regards,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/