Nios Community Wiki > ExampleDesigns > SimpleSocketServerPlus

SimpleSocketServerPlus

Last Updated

June 14, 2009

Description

The Simple Socket Server Plus (SSS Plus) example is an enhanced version of the Simple Socket Server (SSS) example that Altera has shipped for the past few years. The primary enhancements to this example are as follows:

  • Enabled the InterNiche FTP server.
  • Enabled the InterNiche TFTP server.
  • Enabled the InterNiche FTP Client.
  • Enabled the InterNiche TFTP Client.
  • Enabled the InterNiche Telnet server.
  • Enabled the InterNiche console.
  • Enabled the InterNiche VFS file system.
  • Enabled the Altera ROZIPFS file system.

These are all basic capabilities that are available in the InterNiche TCP/IP stack as it ships with the Altera Nios II development environment.

Contents

This example has been ported to two different Altera development boards, the 3C120 board and the NEEK board.  The example is published in a few different forms which are useful for different needs of the user.

3C120 port

There is a development archive if you are interested in seeing the source code for the software application, building the source into a software application and running the application on the 3C120 hardware design that it is currently ported to.

There is also an executable binary archive available which you can extract and run immediately on a 3C120 development board.

And then there is a flash programming archive that provides scripts that create flash images of the hardware and software application and can program them into the CFI flash of the 3C120 board so they will execute upon power up of the development board.

There are also a couple of PDF documents that explain how to use the SSS Plus application once you have it up and running on a 3C120 board, as well as a technical discussion about how the application is put together and what user modifications are possible to adapt the application into another implementation.

NEEK port

There is a development archive if you are interested in seeing the source code for the software application, building the source into a software application and running the application on the NEEK hardware design that it is currently ported to.

There is also an executable binary archive available which you can extract and run immediately on a NEEK development board.

And then there is an SD card archive that provides the executable images that can be copied onto the NEEK SD card and run on the board like any other NEEK application.

There are also a couple of PDF documents that explain how to use the SSS Plus application once you have it up and running on a NEEK board, as well as a technical discussion about how the application is put together and what user modifications are possible to adapt the application into another implementation.

Instructions

Downloading the example

Download the archives you are interested in and place them in a directory on your system that does not include spaces in the path name. The entire path name of this directory must not contain spaces, so on Windows systems you should avoid putting these in the "My Documents" folder, or on your "Desktop" since these locations are subdirectories of the "Documents and Settings" path, and that would mean that these locations inherit the spaces in that part of the path name.

In order to extract the archives after downloading them, it is recommended that you run the "tar -xzf <filename>" command from a bash shell. For linux users you should have ready access to a bash shell. For windows users, you may need to install the Altera development tools to gain access to a bash shell. On Windows it is recommended that you install the Altera Quartus II FPGA development tools along with the IP base suite as well as the Nios II EDS development tools. Once these tool chains are properly installed on your workstation, you can launch a bash shell by running:

"Start -> Programs -> Altera -> Nios II EDS 9.0 -> Nios II 9.0 Command Shell"

Once you are in the bash shell, you can "cd" into the directory containing the archives that you've downloaded, and running the following commands to extract them:

tar -xzf <archive_filename>

Note that if you use some other archiving software to extract these archives, like WinZip, you may loose the execution privileges on some of the shell scripts within the archives that are used to perform various activities associated with building and using the example. If this happens, you can restore execute privileges from within a bash shell with the command "chmod +x <filename>". It is recommended that you avoid this situation by using "tar" to extract the archives from within a bash shell and avoid using any Windows oriented archive utilities with these archives.

Using the examples

After you have extracted the archive you should be able to locate a "readme.txt" within the archive directory that will give you some guidance on how to get started with that particular archive. The readme.txt for the binary executable and flash programming archives should be right at the top level of the archive, and the development archive will have the readme.txt in the "app" subdirectory of the software application project directory.

Requirements

3C120 port

This software application is currently ported to a hardware design example for the Altera 3C120 development board. This board is currently available in many different bundled packages today that go by these names:

  • Cyclone III FPGA Development Kit
  • DSP Development Kit, Cyclone III Edition
  • Embedded Systems Development Kit, Cyclone III Edition

Any one of the above development kits should contain the 3C120 base board that this example design is intended to run on.

Ethernet connection

Please note that if you are using a 3C120 board configuration that provides multiple Ethernet connectors, this example is created to use the Ethernet connector on the main base board, the board with the 3C120 device mounted on it. Do not connect the Ethernet cable to ports that extend off the HSMC connectors.

The current version of this example has been tested under the 9.0 SP1 release of the Altera development tools.

NEEK port

This software application is currently ported to a hardware design example for the NEEK development board.

The current version of this example has been tested under the 9.0 SP1 release of the Altera development tools.

See Also

The Superloop Simple Socket Server Plus example that implements this application in Superloop mode without an RTOS.

The 3C120 dev board hardware design example that this software application is ported to run on.

The NEEK dev board hardware design example that this software application is ported to run on.

Update History

20090614 - Updated the 3C120 port with some patches to the InterNiche VFS and TFTP code to protect the internal structures of these services with a binary semaphore.  Also chaged the default static IP address coded into simple_socket_server.h to the address 10.0.0.10 and subnet mask of 255.0.0.0.

20090612 - Posted SSS Plus port for NEEK dev board.

20090526 - Initial posting, SSS Plus for the 3c120 dev board.

Outdated Releases

3C120 release from 20090526

Tag page
Viewing 4 of 4 comments: view all
thank you very much for your helpness
Posted 10:14, 14 Nov 2009
Direct programming the binaries on the 3c120-target works fine. But I tried to compile the project in Quartus 9.1. When I follow the steps in the pdf, I get build errors in the BSP (seems that sgdma is missing). Is Quartus 9.1 not compatible with 9.0?
Posted 14:07, 11 Dec 2009
I got the same. I could compile the BSP, just find the missing .h file from the altera/91 directory and it is ok. In the app this seems more tricky since it cannot find external references in .o object files... Found any solution? Thanks
Posted 09:45, 13 Dec 2009
WOW...this is my new love...great music...listening to the album on youtube now :) global education forum AND global education forum AND global education support AND education support forum Teacher Community
Posted 11:47, 26 Feb 2010
Viewing 4 of 4 comments: view all
You must login to post a comment.
SourceForge.net