[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Hello World



Hi,

I am trying to compile a simple hello world application for an
Insight/Memec Virtex2 board.  I have read the out of tree compile and am
even using the MAKEFILE from this page; however, when I run the compiled
program I receive a garbled mess in the telnet screen.  Here is my
testing procedure:

1) Get to a working shell prompt (telnet into the board)
2) Mount a NFS file system (Mandrake 10)
3) cd /mnt
4)./hello

Here is the program:

#include <stdio.h>

int main() {
  printf("Hello World!\n");
  return 0;
}

Here is the MAKEFILE: (from
http://www.itee.uq.edu.au/~jwilliams/wiki/index.php/OutOfTreeCompile?red
irectfrom=OutTreeCompile)

ifndef ROOTDIR
ROOTDIR=../uClinux-dist
endif

UCLINUX_BUILD_USER = 1
include $(ROOTDIR)/.config
LIBCDIR = $(CONFIG_LIBCDIR)
include $(ROOTDIR)/config.arch

HELLO = hello
HELLO_OBJS = hello.o

all: $(HELLO)

$(HELLO): $(HELLO_OBJS)
      $(CC) $(LDFLAGS) -o $@ $(HELLO_OBJS) $(LDLIBS)

clean:
      -rm -f $(HELLO) *.elf *.gdb *.o

%.o: %.c
      $(CC) -c $(CFLAGS) -o $@ $<


The binary is generated from the following command:
make hello (the c file is name hello.c)

The result is a garbled mess in the telnet screen.  Any ideas??

Thank you,

Shamus

___________________________
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/