Forum Discussion

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

Building Linux application

Not sure if I should have put this under "Software discussion" or not, but here goes:

I'm trying to build a Linux application using Altera's NIOS-II IDE with Microtronix plugin. The program will be run under uCLinux, of course. =]

I have all the source and header files under the project already. Now it's time to build it.

Then I found out I had to create my own makefile. So I did, a simple one. It just goes through all the directories and compile the source code with the right# include directories (for header files, and things like POSIX thread).

However, it didnt work, and I found out from the Microtronix's example Makefile that it looks rather different from a regular makefile. (i.e. it includes things like Rules.mak)

So, I just wanted to at least get the program to compile. So I instead used Altera's project -> managed library project. Then I got it to compiled, because it automatically created the makefile, and all I had to do was supply the right# include directories under the Project options -> Preprocessor stuff.

Umm..as a newbie, I&#39;m not sure about how to go on. I need some sort of guide on how to create the makefile specifically for the Microtronix Linux app. Could anyone shed lights please? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif

4 Replies

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

    Hi ShaChris23,

    > Umm..as a newbie, I&#39;m not sure about how to go on. I need some sort of guide on

    > how to create the makefile specifically for the Microtronix Linux app.

    Well ... you&#39;re in luck! The "Nios II Linux Reference Guide" is probably just the

    guide you need :-) It is in your altera/kits/nios2/documentation/linux directory.

    After reading the section, "Creating a Makefile", you can read through the many

    Makefiles in the examples tree -- it&#39;s not very exciting, but you&#39;ll probably find most

    of your answers there.

    Regards,

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

    Hi,

    I&#39;m trying to do the same, and I read that referene guide, create my makefile, but when I compile I get an error for each source file like the following one:

    make: *** No rule to make target `display.c&#39;, needed by `display.o&#39;.

    And I do have a rules.mak file !

    Can anybody help me with that ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by shachris23@Dec 28 2005, 11:24 PM

    umm..as a newbie, i&#39;m not sure about how to go on. i need some sort of guide on how to create the makefile specifically for the microtronix linux app. could anyone shed lights please? http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/blink.gif

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11831)

    --- quote end ---

    --- Quote End ---

    Hi,

    take a look at that topic "How solve this problem?" from singerpop

    Warm Regards