- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm starting with lwip, but have some problems with functions calling. I`m trying to create a simple UDP connection, the code is as follows:#include <stdio.h># include "lwip/api.h"
int main()
{
struct netconn *conn;
conn = netconn_new(NETCONN_UDP);
}
But seems like I'm doing something wrong, because it's giving me this error: " undefined reference to `netconn_new' " I've tryied with all the connection types with the same result, and seems like they are all defined in "lwip/api.h". Don't know what I'm doing wrong, can someone help me??? Thanks!!!!!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have same problem even if I add directory to "include paths" in NIOS II IDE !
It is NOT a lwip problem, It is a nios ii ide problem Nios II IDE lets me go to api.h of the lwip when i double-click on the file in "outline" window. EDIT : :rolleyes: I had to :- open properties window,
- go to "C/C++ Build" tab,
- "configuration settings",
- "tool settings" tab,
- select "general" under "Nios II compiler",
- "include path", add the path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not a NIOS IDE problem - all tools need# include paths to find user-supplied H files. I've had to add search paths for 3 different tools I've used lwIP with. Perhaps lwIP could be more friendly and use a "master include", but it doesn't. This doesn't make it an IDE issue.
I agree it's "many manipulations" - that's how Eclipse works. Several companies (including Xilinx) have adopted it for their IDE. So maybe open source isn't better! :) Frankly I like every commercial IDE I've used to date better than Eclipse. Bill A.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree that compilation tools needs# include paths but the spécific "include paths" tab in project properties in NIOS II IDE doesn't work well :
the .h are recognized by editor but not by compiler. I think it would be obvious. many other bugs that harm the use of NIOS II IDE. with Lwip (version 1.3.1), I have "syntax error" hard to solve. Wich LwiP works well with NIOS II IDE ? Wich do you use ? Best regards.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- I agree that compilation tools needs# include paths but the spécific "include paths" tab in project properties in NIOS II IDE doesn't work well : the .h are recognized by editor but not by compiler. I think it would be obvious. --- Quote End --- I don't follow this - tell me what you mean by not recognized by the compiler. --- Quote Start --- many other bugs that harm the use of NIOS II IDE. with Lwip (version 1.3.1), I have "syntax error" hard to solve. Wich LwiP works well with NIOS II IDE ? Wich do you use ? --- Quote End --- Tell me the error and I'll see if I can help you. I'm using 1.3.1 also. Bill A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
First of all, I have to make decision between InterNiche Stack and LwIP stack. I am using opencores ethernet mac which is tested with InterNiche stack, but i don't know how to make that. LwIP stack is formerly used in my company but for an old project that used different MAC, NIOS, IDE.... After I add the path to the include path in build project properties (even if i already add it in include path & symbols), I have errors : --- Quote Start --- Severity and Description Path Resource Location Creation Time Id D:/essai_ethernet/IP/lwip/src/include/lwip/api.h error: syntax error before '}' token essai_ethernet line 159 1253277801181 32122 --- Quote End --- When I double-click on this error, it doesn't lead me to the error location, I have to manually edit file and go to the error line. "go to error location" works well with opencores ethernet files (component in fpga and then in system library). I suspect bad syntax handler with some C keywords like struct, typedef, enum.... I say that because I had experienced troubles with typedef keyword. If it is too hard to implemant LwIP, I will have a look at InterNiche. Maybe those include problems is related to your first post : undefined reference to netconn_new() OR NETCONN_UDP is badly defined (exists in api.h ;-))- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi, First of all, I have to make decision between InterNiche Stack and LwIP stack. I am using opencores ethernet mac which is tested with InterNiche stack, but i don't know how to make that. LwIP stack is formerly used in my company but for an old project that used different MAC, NIOS, IDE.... --- Quote End --- We chose lwIP because it's smaller, faster, and more reliable (and the support behind it is good). It's also free but this was a bonus - that didn't matter. The Altera TSE driver is slow and inefficient - and buggy. If you need IPv6 then lwIP is not an option for you. --- Quote Start --- After I add the path to the include path in build project properties (even if i already add it in include path & symbols), I have errors : When I double-click on this error, it doesn't lead me to the error location, I have to manually edit file and go to the error line. "go to error location" works well with opencores ethernet files (component in fpga and then in system library). --- Quote End --- OK, well, I see this with all errors in Eclipse - so this is an IDE problem. I've just gotten used to it I suppose. :mad: --- Quote Start --- I suspect bad syntax handler with some C keywords like struct, typedef, enum.... I say that because I had experienced troubles with typedef keyword. If it is too hard to implemant LwIP, I will have a look at InterNiche. --- Quote End --- It may be hard to implement, but it will be worth it. --- Quote Start --- Maybe those include problems is related to your first post : undefined reference to netconn_new() OR NETCONN_UDP is badly defined (exists in api.h ;-)) --- Quote End --- This wasn't my post, but I do see the error tracking bug you're talking about. Bill A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
--- Quote Start --- If you need IPv6 then lwIP is not an option for you. --- Quote End --- LwIP 1.3.1 include ipV6. So it is an option. Sorry if I didn't understood :-) Do you use Nios II IDE eclipse to compile your project ? You seem to successfully implement lwip. Do you work with standalone lwIP ? Could you tell us how to implement lwip in NIOS II ? how easy/hard is it ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi, LwIP 1.3.1 include ipV6. So it is an option. Sorry if I didn't understood :-) --- Quote End --- Sorry but IPv6 is not fully developed in lwIP - it was started but not completed. They are looking for someone to continue with it and develop it if you're interested in contributing to lwIP. :) --- Quote Start --- Do you use Nios II IDE eclipse to compile your project ? You seem to successfully implement lwip. Do you work with standalone lwIP ? --- Quote End --- Yes, I use the NIOS II to build an lwIP library and my Cyclone III/NIOS II application using lwIP. lwIP source code builds fine in NIOS II Eclipse without changes to the base code. --- Quote Start --- Could you tell us how to implement lwip in NIOS II ? how easy/hard is it? --- Quote End --- It wasn't as easy as it could be because the TSE driver directly interfaces into some Interniche code and structures. ins_tse_mac.c is the main file that you change for lwIP. Where it gets packets and stores into an Interniche-based queue, you would add packets to an lwIP pbuf pool to be picked up by code calling low_level_input (see ethernetif.c). lwIP low_level_output sends a packet - you can use tse_raw_send in ins_tse_mac.c to do that - with some changes. As we don't use an OS (Interniche recommends uc/OS-II although there is a "super-loop" mode that you may find more information about) our driver is custom compared to a more general driver so it should be easier for you than it was for me. We also had to have very high bandwidth requirements for our application. We have the ability to generate Internet checksums in hardware as we receive data from hardware connected to the Cyclone III to send (by UDP) so we also had to customize lwIP in several places to accommodate this. Bill A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks for answer.
In LwIP 1.3.1, it seems to lack some file like :- lwipopts.h to Define# define NO_SYS 1, etc
- arch/cc.h to Define generic types used in lwIP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi, thanks for answer. In LwIP 1.3.1, it seems to lack some file like :
- lwipopts.h to Define# define NO_SYS 1, etc
- arch/cc.h to Define generic types used in lwIP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great thanks !
--- Quote Start --- cc.h is your platform dependent include file - start with another from the contrib folder as a starting point for yours. --- Quote End --- I found http://cvs.savannah.gnu.org/viewvc/contrib/ports/?root=lwip is there a nios ii port ? All I have found is that Altera don't use LwIP anymore. For cc.h, we have just to typedefu8_t;
s8_t;
u16_t;
s16_t;
u32_t;
s32_t;
# define BYTE_ORDER LITTLE_ENDIAN
You mentioned Altera TSE driver, but it is "designed" for InterNiche stack and ucOS II. Not simple.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- You mentioned Altera TSE driver, but it is "designed" for InterNiche stack and ucOS II. Not simple. --- Quote End --- Are looking for a driver for lwip for an Altera 10/100MbS MAC or one for the Altera TSE (100/1000MbS) MAC? I see another post of yours that mentions 10/100. Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I xas looking a LWIP driver for Opencores Ethernet MAC. Not TSE MAC, neither LAN91c911.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, well I did the port for the TSE since I didn't see the OpenCores Ethernet MAC mentioned in an early post. The TSE does work in 10/100 mode (I'm not positive about the 10MbS support).
Bill
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page