Forum Discussion

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

A newbie needs help with ethernet in NiosII

Hi all!!!!

I'm starting with NiosII processor and I need some help. I want to send/receive some data to/from a PC via ethernet. I was using NiosI with no problems, but I can not migrate my code to NiosII by any means (I've tried to do it using microC and a couple of threads instead of my initial single threaded code) so I'm planning to start again from zero.

The question is: Is there any simple way (I mean single threaded, and with no OS) to send/receive via ethernet??? Something like nr_plugs_send()???. I`ve tried the standalone lwip, but there are some things that I can&#39;t understand (sorry I&#39;m a hardware man http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/unsure.gif )

Thanks to all!!!!!!

5 Replies

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

    Hi again!!!!

    Has anybody succesfully used the Nios plugs library in NiosII??? I&#39;ve been searching for the forum and can&#39;t find an answer.

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

    I&#39;m not saying it will work, but have you tried changing

    generate_sdk = "0";

    to

    generate_sdk = "1";
    in your SOPC Builder project&#39;s PTF file?

    I think this should generate a "Nios Classic" style SDK, where you&#39;ll, at least, have a shot at getting things to work. A quick "grepping" for plugs in the various components directory indicates that the source code is still there...as of 6.1.

    Good luck!

    - slacker

    UPDATE:

    Two more flags need to be set, as well:

    legacy_sdk_support = "1";
    allow_legacy_sdk = "1";
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by slacker@Mar 8 2007, 06:50 PM

    i&#39;m not saying it will work, but have you tried changing

    generate_sdk = "0";

    to

    generate_sdk = "1";
    in your sopc builder project&#39;s ptf file?

    i think this should generate a "nios classic" style sdk, where you&#39;ll, at least, have a shot at getting things to work. a quick "grepping" for plugs in the various components directory indicates that the source code is still there...as of 6.1.

    good luck!

    - slacker

    update:

    two more flags need to be set, as well:

    legacy_sdk_support = "1";
    allow_legacy_sdk = "1";

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

    --- Quote End ---

    Thanks for your answer slacker!!!!! I`m trying it right now, hope it works.

    Just one more question..... Do you know if a NiosI can be loaded into a StratixII board??? I&#39;ve tryied it many times, but never succeded. Using Nios with a StritixII board will solve all my problems, since my project is working with no problems on a StratixI with NiosI.

    Thanks again!!!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I&#39;m a disaster! I can&#39;t make it work http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif .

    Anyway, this is the answer i got from altera when i asked them:

    "Unfortunately, there is no resource available about using the Plugs Ethernet Library on a NiosII system.

    Standalone lwip is a solution wich is no RTOS and single threaded. You can download it from www.niosforum.com"

    Seems like I will have to learn how to use the standalone lwip http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/unsure.gif . By the way, anyone knows a good source of documentantion and/or examples for standalone lwip??

    Thanks!