Creating a Webserver on the Nios development kit Stratix Edition board Enoch Hwang



Similar documents
PowerShield SNMP Adaptor

December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit

2. Scope of the DE0 Board and Supporting Material

Debugging Network Communications. 1 Check the Network Cabling

Plena Voice Alarm System Firmware update

PRN_LOAD :22

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

FLASH PROCEDURE for GSM BENTEL and DSC cards

Basic Router and Switch Instructions (Cisco Devices)

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

Connecting the DG-102S VoIP Gateway to your network

Projetex 9 Workstation Setup Quick Start Guide 2012 Advanced International Translations

TE100-P21/TEW-P21G Windows 7 Installation Instruction

Guide to Installing BBL Crystal MIND on Windows 7

Product Type: ASC/3. Purpose: Introduction: Applications: Reference: AN2038 Date: 5/4/06

IP Phone Configuration and Troubleshooting Guide

DRO-210i LOAD BALANCING ROUTER. Review Package Contents

Application Note: Connecting to a 2500 Series Processor using PLC Workshop

WIZ-Embedded WebServer User s Manual (Ver. 1.0)

T3 Mux M13 Multiplexer

Getting Started with Embedded System Development using MicroBlaze processor & Spartan-3A FPGAs. MicroBlaze

Nios II IDE Help System

RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application

Set up a Nios II project that specifies a desired hardware system and software program

Using the NicheStack TCP/IP Stack - Nios II Edition Tutorial

1. Overview of Nios II Embedded Development

IP SERIAL DEVICE SERVER

Ultra Thin Client TC-401 TC-402. Users s Guide

Honeywell Internet Connection Module

ALOHA Load Balancer Quickstart guide

Remote Annex. Quick Start for Windows. Read before installing and using Remote Annex Software Release 4.2

Operating Instructions

HOWTO configure Xinu under Virtual Box

Maintaining the Content Server

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

Tutorial: Configuring GOOSE in MiCOM S1 Studio 1. Requirements

Setting up the Swann HD IP cameras

SSL (Secure Socket Layer)

H0/H2/H4 -ECOM100 DHCP & HTML Configuration. H0/H2/H4--ECOM100 DHCP Disabling DHCP and Assigning a Static IP Address Using HTML Configuration

DUKANE Intelligent Assembly Solutions

Changing Password for Ingate Firewalls/SIParators Rickard Nilsson

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

USER GUIDE. Ethernet Configuration Guide (Lantronix) P/N: Rev 6

WinCON8000-R2/R8. Hardware User s Manual

L Firmware And FPGA Configuration Upgrade

Application & Quick-Start Guide

Remote Configuration Over Ethernet with the Nios II Processor

History of Revisions. Ordering Information

Tera Term Telnet. Introduction

SecureLinx Spider Duo Quick Start Guide

PROFINET IRT: Getting Started with The Siemens CPU 315 PLC

Pentesting Android Mobile Application

BiPAC 7404V series. VoIP/(802.11g) ADSL2+ (VPN) Firewall Router. Quick Start Guide

Korosi Monitoring System (KMS) Software Manual

13. Publishing Component Information to Embedded Software

Select Correct USB Driver

Using the Altera Serial Flash Loader Megafunction with the Quartus II Software

SMS Alarm Messenger. Setup Software Guide. SMSPro_Setup. Revision [Version 2.2]

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Note: This case study utilizes Packet Tracer. Please see the Chapter 5 Packet Tracer file located in Supplemental Materials.

4 Networking Generators

Service & Support. How can you establish a connection between an S PLC and SIMATIC NET OPC? S PLC, SIMATIC NET OPC.

INTRODUCTION FEATURES OF THE ICM

Ethernet Module Manual

T-BOXN12R. First steps with T-BOXN12R. You can make it wireless. Date: Version 1.0

Getting Started Guide with WIZ550web

Quartus II Software Design Series : Foundation. Digitale Signalverarbeitung mit FPGA. Digitale Signalverarbeitung mit FPGA (DSF) Quartus II 1

ML310 VxWorks QuickStart Tutorial. Note: Screen shots in this acrobat file appear best when Acrobat Magnification is set to 133.3%

User Manual Network Interface

DSA-1000 / PRT-1000 Device Server / Thermal Printer

This techno knowledge paper can help you if: You need to setup a WAN connection between a Patton Router and a NetGuardian.

Procedure: You can find the problem sheet on Drive D: of the lab PCs. Part 1: Router & Switch

IP BOOT MANAGER 9280 USERS MANUAL. IP Boot Manager 9280 User Manual


Nios II Development Kit Version 5.1 SP1 Release Notes

Using Microsoft Visual Studio API Reference

Operating Instruction MEW01652 Revision -

Programming the On-Chip Flash on a phycore-xc161 phycore-xc167

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Rogue RE-CONN Utility

DE4 NetFPGA Packet Generator Design User Guide

Avalanche Enabler 5.3 User Guide

Kaltura On-Prem Evaluation Package - Getting Started

Smartphone Pentest Framework v0.1. User Guide

InstantSearch+ for Magento Extension

Remote Access. Table Of Contents. Rev: 3.30, 8/03

Service & Support. How can you establish a connection between a S PLC and SIMATIC NET OPC? S PLC, SIMATIC NET OPC.

SMS (Server Management Software) Digital Video Recorder. User s Manual

Comparing performance of L7x vs L6x using Logix5000 Task Monitor tool

Mitsubishi Electric Q Series PLC Ladder Monitor. Operation Manual

MT-350 SMS. Operation Manual. PORTech Communications Inc.

Update Firmware from GUI

Configuring the Switch with the CLI Setup Program

Configuring Devices for Use with Cisco Configuration Professional (CCP) 2.5

Nios Development Board

3.1 Connecting to a Router and Basic Configuration

enetworks TM Using the Syslog Feature C.1 Configuring the Syslog Feature

Transcription:

Creating a Webserver on the Nios development kit Stratix Edition board Enoch Hwang A) Creating the Nios System (Nios v3.2 can only work with Quartus II v5.1 and below. Need to also remove Nios II completely.) 1) Use the standard_32 reference Nios template design in the directory: D:\My_Programs\Altera\Nios Board\standard_32 2) Use Quartus II and SOPC Builder. Must use the Nios module and not the Nios II module. Compile the Nios system and generate a.hexout output file. To generate a.hexout file from Quartus: select menu Assignment Device Device & Pin options button Programming Files tab Check the hex output file. 3) Download the Nios system to the FPGA using Quartus II with the ByteBlaster parallel cable. (This is volatile. Go to step (4) if you want non-volatile) 4) Start the Nios SDK Shell from Windows Start menu. The following commands are issued from this Shell. 5) To save the Nios system in flash so that when you power up the board, the FPGA will automatically be configured with this Nios system, you need to use hexout2flash to convert the.hexout file generated by Quartus to.flash. Issue the hexout2flash command from the SDK Shell monitor. [SOPC Builder]$ hexout2flash -b 0x600000 standard_32.hexout 6) Now download the FPGA configuration data to the user portion of the flash memory at 0x600000. Press the SW0 and CPU Reset on the Nios board first. (All the LEDs on the 7- segment should lit). Need to connect the serial cable from the PC s serial port to the Console port on the Nios board. [SOPC Builder]$ nios-run standard_32.hexout.flash or [SOPC Builder]$ perl -x c:/altera/kits/nios/bin/nios-run.pl standard_32.hexout.flash Notes: i) Start the GERMS monitor (Nios terminal mode) from the Nios SDK Shell by pressing SW0 and CPU Reset on the Nios board (All the LEDs on the 7-segment should lit) and then typing nr t in the SDK Shell. Need to connect the serial cable from the PC s serial port to the Console port on the Nios board.

ii) iii) Press the Reset Config (SW10) switch to configure the FPGA with the User configuration data stored in 0x600000. If no valid user configuration is found, then the FPGA will be configured with the Safe image. To erase sectors in the flash memory, issue the e command from the GERMS monitor: e00600000 e00610000 B) Writing the Web Server Program in C 1) Use the template program nedk_example_web_server.c in the directory: D:\My_Programs\Altera\Nios Board\standard_32\cpu_sdk\src\plugs\webpage 2) Edit the c program using a text editor. The memory map, Nios I/O device pin names (e.g. na_led_pio) are defined in the file <CPU_name>_sdk/inc/excalibur.h. For example, F:\Nios\standard_32\cpu_sdk\inc\excalibur.h. 3) Start the Nios SDK Shell from Windows Start menu. The following commands are issued from this Shell. 4) Compile the web server program from.c to.srec. [SOPC Builder]$ nios-build wosfs.c nedk_example_web_server.c 5) (optional) convert the web server program from.srec to.flash. The C program is stored in flash starting at location 0x40000. [SOPC Builder]$ srec2flash nedk_example_web_server.srec 6) Start the GERMS monitor (Nios terminal mode) on the Nios board by pressing SW0 and CPU Reset on the Nios board. All the LEDs on the 7-segment should lit. 7) Download the web server program to SRAM and run it (if you performed just step (4)) [SOPC Builder]$ nios-run nedk_example_web_server.srec or download to flash (if you performed step (5)) [SOPC Builder]$ nios-run nedk_example_web_server.flash 8) Press Reset Config (SW10) to run the program. The program that is stored in flash will first be copied to SRAM before it is run. C) Creating the Webpages 1) The sample directory is in: D:\My_Programs\Altera\Nios Board\standard_32\cpu_sdk\src\plugs\webpage

2) Edit wosfs_maker.pl first line should be #!/bin/perl 3) To change the location where the webpages are stored in flash: Edit wosfs_maker.pl. Change the two lines in the file to the address that you want my $kwosfs_flashbegin = 0x200000; my $kwosfs_flashend = 0x400000; 4) The definition in the web server program for where the webpages are stored is found in wosfs.h. Edit the two lines #define nk_wosfs_flash_begin (nasys_main_flash + 0x200000) #define nk_wosfs_flash_end (nasys_main_flash + 0x400000) 5) Create standard webpages. 6) Convert webpages to wosfs format Run wosfs_maker.pl from the Nios II SDK Shell. (First change directory to the directory containing the webpages.) [SOPC Builder]$./wosfs_maker.pl index.html static_page.html exc-nios.gif template_page.html.template control_page.html LSU.gif 404_page.html monkey.jpg > pages.flash 7) Connect a serial cable between COM1 on the computer and the Console port on the Nios board. 8) Start terminal mode on the Nios board by pressing sw0 and cpu reset on the Nios board. 9) Download the webpages to flash using the Nios SDK Shell prompt. Type nios-run from the Nios II SDK Shell [SOPC Builder]$ nios-run pages.flash or [SOPC Builder]$ perl -x c:/altera/kits/nios/bin/nios-run.pl pages.flash 10) Press cpu reset button (or Reset Config button) to run the server program. If you have connected a serial cable between the COM1 port on the PC and the Console port on the Nios board, and you have started the nios-run in terminal mode nios-run t You should see a message in the terminal window saying what the IP address is and the port number.

11) Test web server by browsing to http://192.168.1.31:81 12) Several ways to change the IP address: i. Start up the Safe configuration. Browse to it and click on the link that says IP Address. ii. Run the hello_plugs.srec program located in standard_32\cpu_sdk\src\plugs from the SDK Shell nb hello_plugs.c nr hello_plugs.srec 13) To change the port number: Edit the file nedk_example_web_server.c and change the line #define k_http_port 81 Follow the instructions in section B) to re-compile and download the program. 14) To find out the IP information, type xip from the GEMS SDK Shell + xip To disable DHCP + xdhcp:off To change the IP address + xip:10.1.31.23 To erase a flash sector: e60000 Flash Memory Map Address (hex) Flash Allocation 000000 040000 User Web server program 100000 200000 User Web pages (2 MB) 300000 400000

500000 600000 User FPGA Configuration Data (1 MB) 700000 Safe FPGA Configuration Data (1 MB) 7B0000 Safe Web server program 7F0000 Network settings