Forum Discussion
Altera_Forum
Honored Contributor
19 years agoLwip basic question
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!!!!!15 Replies
- Altera_Forum
Honored Contributor
--- 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
- Altera_Forum
Honored Contributor
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 typedef
You mentioned Altera TSE driver, but it is "designed" for InterNiche stack and ucOS II. Not simple.u8_t; s8_t; u16_t; s16_t; u32_t; s32_t; # define BYTE_ORDER LITTLE_ENDIAN - Altera_Forum
Honored Contributor
--- 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 - Altera_Forum
Honored Contributor
Hi, I xas looking a LWIP driver for Opencores Ethernet MAC. Not TSE MAC, neither LAN91c911.
- Altera_Forum
Honored Contributor
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