Altera_Forum
Honored Contributor
20 years agolwIP and new Ethernet MAC Device
Hello,
I am using a development board from Altera with a stratixs_2s60 FPGA on it. A Nios II processor system and the MicroC/OS II are running on it. My boss has written a virtual Ethernet MAC, called rtmac_0, that can be manipulated through a register-interface like a normal Ethernet MAC and basically consists of a single FIFO. A packet can be send to it and has to be received directly afterwards. I wrote an Ethernet device driver for this virtual MAC (i.e. rtmac_0), based on the altera_avalon_lan91c111 and a simple application programm that sends a packet to the lwIP stack and receives it directly afterwards. To tell the lwIP stack to use the virtual MAC (i.e. rtmac_0) instead of the lan91c111 I changed the following line in lwipopts.h: before:# define LWIP_DEFAULT_DEV "/dev/"LWIP_DEFAULT_IF after:# define LWIP_DEFAULT_DEV "/dev/rtmac_0" I did this because the rtmac_0 was not selectable in the System Properties GUI in the Nios IDE and the Nios II Software Developer's Handbook mentioned in chapter 9 that the GUI changes the settings in the lwipopts.h File. Although the netconn_send(conn) Funktion of the lwIP stack executes without an error, the device driver for the rtmac_0 is not called, nor is the device driver for the lan91c111. Does anybody know how I can make the lwIP stack work together with the new Ethernet MAC interface (i.e. rtmac_0)? I would be very happy about any answer!