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++
12604 Discussions

A newbie needs help with ethernet in NiosII

Altera_Forum
Honored Contributor II
1,052 Views

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

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

No one??? 

 

I&#39;m desperate, please someone can help me??? I&#39;m lost in documentation!!!!! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif  

 

Seriously now, I just need to send and recieve 32/16 bits integers via ethernet in a simple way no protocols, threads or os needed, but I&#39;m a mess pgrogramming http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif . 

 

Thanks in advance!
0 Kudos
Altera_Forum
Honored Contributor II
326 Views

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";
0 Kudos
Altera_Forum
Honored Contributor II
326 Views

 

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

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!
0 Kudos
Reply