Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

a simple application error

dear all,

I do according to hippo,when i do a simple application program in the last,and insert to uclinux,when i run "make":

then the error found:

==========================

find . -depth -type d | xargs rmdir > /dev/null 2>&1 || exit 0

Making symlinks in include/

Making include/c++ symlink to compiler c++ includes

make[1]: Leaving directory `/home/fzh/uClinux-dist-test/include'

make[1]: Entering directory `/home/fzh/uClinux-dist-test/user'

for i in apphello busybox games inetd init sash telnetd /home/fzh/uClinux-dist-test/vendors/Altera/nios2nommu/. /home/fzh/uClinux-dist-test/prop; do

if [ -d $i ]; then

touch $i/.sgbuilt_user;

make -C $i || exit $? ;

fi;

done

touch: 正在创建目录 ‘apphello/.sgbuilt_user’: 权限不够

make[2]: Entering directory `/home/fzh/uClinux-dist-test/user/apphello'

nios2-linux-uclibc-gcc -Os -g -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -I/home/fzh/uClinux-dist-test -fno-builtin -I. -c -o apphello.o apphello.c

Assembler messages:

FATAL: can't create apphello.o: 权限不够

make[2]: *** [apphello.o] Error 1

make[2]: Leaving directory `/home/fzh/uClinux-dist-test/user/apphello'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/fzh/uClinux-dist-test/user'

make: *** [subdirs] Error 1

[fzh@localhost uClinux-dist-test]$

===========================================

this is the simple application program:# include <stdio.h>

int main()

{

int i;

while(1)

{

printf("Hello World application\n");

for(i=0;i<2000;i++);

}

}

makefile:

EXEC = apphello

OBJS = apphello.o

CFLAGS += -I.

all: $(EXEC)

$(EXEC): $(OBJS)

$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)

romfs:

$(ROMFSINST) /bin/$(EXEC)

clean:

-rm -f $(EXEC) *.elf *.gdb *.o

user/makefile:

dir_$(CONFIG_USER_APPHELLO) += apphello

in config/config.in:

bool &#39;apphello&#39; CONFIG_USER_APPHELLO

1 Reply