User Tools

Site Tools


uIP Example


The above file contains uip code with the telnetd example modified to work on minsoc. It has been tested with a tap interface using the simulator as well as on a spartan 3e 1600 board.


These files should be extracted into the sw directory of the minsoc project.

On my system, the minsoc files installed under minsoc/trunk. This required editing the backend configure file by removing the reference to minsoc in the line:

in_minsoc=`pwd | grep backend/${BOARD}$`

Once this was done, the script could be run to create the backend.

The board.h file required the following modification:

change the stack size to 0x800

#define STACK_SIZE 0x00800

the orp.ld file required the following modifications:

change ram size and add ethernet sections:

  ram     	: 	ORIGIN = 0x00001200, LENGTH = 0x0000EE00  /*0x10000 total*/
  ethernet	:  	ORIGIN = 0x92000000, LENGTH = 0x01000000
  eth_base	:  	ORIGIN = 0xa8000000, LENGTH = 0x01000000
.ethernet :
      } > ram
.eth_base :
      } > ram

Once this is done, the makefile in /sw/uip/uip-1.0/apps/telnetd

should work to build the project. Note shell scripts mentioned below are in same directory.

Note that this assumes the files in support and drivers have been built.

To run in the simulator with a tap interface (tested in linux):

To create the tap interface, run

as root.

Once this is done, you should be able to see the tap interface using ifconfig.

Start the simulator using

as root

This assumes you have the simulator installed in:


Note that the simulator can take up lots of cpu time. I have used cpulimit in this script to keep my processor from overheating. If you don't have this package installed, you can comment out this line, but watch your processor temperature if you leave the simulator running for more than a few minutes. The script also uses –enable-profile. This will generate very large files if the simulator is left running for more than a few minutes.

As a normal user, run


You should see:


Connected to

Escape character is '^]'.

uIP command shell

Type '?' and return for help

uIP 1.0>

There are only really two commands set up. These are help and stats. Help lists options (although only these two and exit work.) stats will show how many packets have been sent or received. You should also be able to monitor traffic on the tap interface using wireshark.

I have fixed the IP address, but this could be changed by modifying the code to use dhcp. The other uip examples in the folder have not yet been modified to work with minsoc.

This has only been tested on one machine (simulator) and one FPGA board.

uip_example.txt · Last modified: 2011/09/21 11:00 by Constantinos Xanthopoulos