> > My question is now how to generate a proper emdebian package. I > > successfully compiled a simple hello world app and it worked on the > > target device.
> A package is generated by emsource, but things are little stalled at > the moment and Neil, doing most part of this work wants to do the code > audit and change the way crush builds, more towards to what grip does. > See > http://wiki.debian.org/EmdebianQuickStart > http://wiki.debian.org/EmdebianCodeAudit > >The header <stdio.h> is used there and the c file is > > simply compiled with arm-linux-gnu. I guess the default stdio.h header > > from the development system is used then instead of the emdebian > > specific one? > The header files are under /usr/$triplet/include, using apt-cross or > dpkg-cross you can get lots of headers. See > http://wiki.debian.org/EmdebianToolchain > > Is there a makefile template for building apps for emdebian crush? > I do not think we have one. I might be wrong. Hello Hector, A part of the application to port to emdebian is a little led deamon. I start with that one and it simply consists of one C file. The header #include <pthread.h> is included in the C-file. To compile it I use this makefile: CROSS_COMPILE = arm-linux-gnu- AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld CC = $(CROSS_COMPILE)gcc CFLAGS +=-O0 CFLAGS +=-I/usr/include APP = ledd OBJS += ledd.o BLD_DIR=$(PWD) all: $(APP) $(APP): $(OBJS) @echo ' ' @echo 'Building target: $@' $(CC) -o$(APP) $(CFLAGS) $(OBJS) $(LDLIBS) A make in the project folder: hoe...@wks02-lin:~/projects/hasler/emdebian_eval/datr_led_daemon$ make arm-linux-gnu-gcc -O0 -I/usr/include -c -o ledd.o ledd.c In file included from ledd.c:23: /usr/include/pthread.h:653: warning: ‘__regparm__’ attribute directive ignored /usr/include/pthread.h:665: warning: ‘__regparm__’ attribute directive ignored /usr/include/pthread.h:710: warning: ‘__regparm__’ attribute directive ignored Building target: ledd arm-linux-gnu-gcc -oledd -O0 -I/usr/include ledd.o ledd.o: In function `main': ledd.c:(.text+0x139c): undefined reference to `pthread_create' Note a "cd /usr/$triplet/include" ends up in /usr/include. So I suppose the CFLAGS+=-I/usr/include is not correct. Do you have any Ideas how to proceed? -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

