Forum Discussion
Altera_Forum
Honored Contributor
21 years agohow 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
Honored Contributor
Just a partial reply, but you'll want your Makefile to look something like (I'm assuming that you'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
Honored Contributor
it's great!! thank you!! clansdown http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif
- Altera_Forum
Honored 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.