Forum Discussion

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

how to add application to uclinux?

i want to add hello_world to uclinux,

the code is:

# include <stdio.h>

main()

{char *str="Hello world !";

printf("%s\n",str);

exit(0);

i have 3 problems:

1.how to write makefile,can you give me the whole code??

2.when i creat maketarget,there has a blanket(build target), what content should i fill in?

3.after build the application,how to upload the application to the linux?

thanks!!!

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Just a partial reply, but you&#39;ll want your Makefile to look something like (I&#39;m assuming that you&#39;re using the eclipse IDE, and that you set up a project for this):

    --------

    include Settings.mak

    include Rules.mak

    OBJS = yourfile1.o yourfile2.o etc.o

    all: yourprogram.exe

    yourprogram.bin: $(OBJS)

    --------

    (not including the dashes, obviously)

    then build the project and copy the yourprogram.exe file into /bin in the filesystem project, then build it and upload it.

    Not a complete response, but I hope that this helps.

    Chris Lansdown

    Solar Technology Inc.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is there a quicker way uploading an application to the board? Putting the exe file into the fs project and uploading takes a while. Thanks in advance for ur help.