Forum Discussion
Altera_Forum
Honored Contributor
21 years agoLinux executable
Hi people
How can I with the IDE make an executable??? I have my linux kernel up and running and now I want to startup an app. Have tried using nios2-elf-objcopy but can't really get a exe out of that one. Hope you can help me out here. Regards GreateWhite.DK3 Replies
- Altera_Forum
Honored Contributor
Hi GreateWhite.DK,
If you can find the source of the userland applications provided by the Microtronix installation, you will see a lot of examples there (under the directory user). Baiscally you need to link all your .o files into a .bin file: nios2-elf-gcc -msys-crt0=$(uClibc-CRT0) -r -d -o app.bin m1.o m2.o m3.o $(LDLIBS) Then use the linking script provided by microtronix: nios2-elf-ld -T elf2flt.ld -Ur -o app.elf app.bin At last convert app.elf to FLT format: elf2flt -s 16000 -o app.flt app.elf These steps are quite confusing, but if you can find and use the rules.mak Microtronix provided in the user applications, all you need to do is some lines in the app Makefile: include Rules.mak all: app.flt app.bin: m1.o m2.o m3.o Good luck, - Altera_Forum
Honored Contributor
Hi wentao
Thx alot for your answer. I have gotten it up and running now http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif now I have an other problem but that is a hole other subject. Regards GreateWhite.DK - Altera_Forum
Honored Contributor
Hi
Thanx wentao for that answer, I had the same problem of compiling objects into the main executable with a makefile and couldn't seem to find a solution.