Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12748 Discussions

how to add application to uclinux?

Altera_Forum
Honored Contributor II
1,160 Views

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!!!
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
477 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
477 Views

it&#39;s great!! thank you!! clansdown http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif

0 Kudos
Altera_Forum
Honored Contributor II
477 Views

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.

0 Kudos
Reply