Digi NET 50 Microprocessor User guide

Category
Software
Type
User guide
NET+OS with Green Hills
Programmer’s Guide
Operating system/version: 6.0
Part number/version: 90000334_B
Release date: March 2006
www.digi.com
NET+Works with Green
Hills Programmer’s Guide
©2006 Digi International Inc.
Printed in the United States of America. All rights reserved.
Digi, Digi International, the Digi logo, the Making Device Networking Easy logo, NetSilicon,
a Digi International Company, NET+, NET+OS and NET+Works are trademarks or
registered trademarks of Digi International, Inc. in the United States and other countries
worldwide. All other trademarks are the property of their respective owners.
Information is this document is subject to change without notice and does not represent a
committment on the part of Digi International.
Digi provides this document “as is,” without warranty of any kind, either expressed or
implied, including, but not limited to, the implied warranties of, fitness or merchantability
for a particular purpose. Digi may make improvements and/or changes in this manual or in
the product(s) and/or the program(s) described in this manual at any time.
This product could include technical inaccuracies or typographical errors. Changes are
made periodically to the information herein; these changes may be incorporated in new
editions of the publication.
Contents
      v
Chapter 1: NET+Works Introduction ..................................................... 1
Overview ........................................................................................................................2
Board support package.................................................................................................2
HTML-to-C compiler .................................................................................................... 2
Security............................................................................................................................3
Chapter 2:
Requesting and Installing
a MULTI 2000 License ............................................................ 5
MULTI 2000 license options......................................................................................... 6
Node-locked license ............................................................................................ 6
Floating license .................................................................................................... 6
Dongle-locked license......................................................................................... 6
Using the JEENI with MULTI 2000................................................................... 6
Request permanent licenses immediately .......................................................7
Requesting a license ...................................................................................................... 7
Before you request a permanent license .......................................................... 7
Requesting an evaluation license......................................................................7
Requesting a permanent license........................................................................ 8
Requesting a license for the Event Analyzer...................................................9
Installing MULTI 2000 licenses ................................................................................... 9
Before you install — dongle-locked licenses only.......................................... 9
Installing a license ............................................................................................... 9
Setting up clients for floating licenses............................................................10
vi      
Chapter 3: Building and Debugging
a Sample Application .............................................................11
Overview ...................................................................................................................... 12
Building a sample application................................................................................... 12
Connecting to the target............................................................................................. 13
Downloading and debugging ................................................................................... 14
Configuring the development board........................................................................ 15
Setting the breakpoint ................................................................................................ 15
Chapter 4:
Using the HTML-to-C Compiler ....................................17
What is the HTML-to-C compiler............................................................................. 18
Web content ....................................................................................................... 18
Static and dynamic content and forms processing ...................................... 19
Preparing to use the HTML-to-C compiler ................................................... 21
How the HTML-to-C compiler works ........................................................... 22
Using the HTML-to-C compiler................................................................................ 24
Creating a new project...................................................................................... 25
Removing obsolete data................................................................................... 26
Adding or removing source files.................................................................... 27
Specifying the location of files ........................................................................ 27
Generating C source files ................................................................................. 27
Setting or changing a project’s home page.................................................... 28
Editing URL files............................................................................................... 28
Opening the url.c file........................................................................................ 29
Adding and deleting URLs.............................................................................. 29
Editing a URL .................................................................................................... 30
Setting the user and password of a URL ....................................................... 30
      vii
Chapter 5: Using the MIBMAN Utility ................................................ 31
Overview ...................................................................................................................... 32
SNMP .................................................................................................................. 32
Scalar MIB objects.............................................................................................. 33
MIB tables ........................................................................................................... 33
Traps....................................................................................................................34
Action routines .................................................................................................. 35
Implementing a MIB: an example................................................................... 35
Converting an SNMP MIB into C code .................................................................... 35
Step 1: Using SMICng .......................................................................................35
Step 2: Using MIBMAN.................................................................................... 36
Step 3: Final integration.................................................................................... 49
Writing action routines..................................................................................... 49
Action routines for scalar objects ....................................................................49
Action routines for tables ................................................................................. 55
How the table’s indexing scheme works ....................................................... 55
How rows are inserted and deleted................................................................ 55
SNMP OID and string index values ............................................................... 64
Chapter 6:
Using the Advanced Web
Server PBuilder Utility .......................................................... 65
Overview ...................................................................................................................... 66
The PBuilder utility........................................................................................... 66
About the Advanced Web Server Toolkit documentation.......................... 67
Running the PBuilder utility......................................................................................67
Linking the application with the PBuilder output files .........................................69
security.c file ...................................................................................................... 69
cgi.c and file.c files............................................................................................. 69
Comment tags .............................................................................................................. 70
Creating Web pages .................................................................................................... 70
AWS custom variables...................................................................................... 71
Data types........................................................................................................... 72
Displaying variables .........................................................................................72
viii      
Changing variables ........................................................................................... 73
Security ............................................................................................................... 76
Exceptional cases............................................................................................... 76
Controlling the MAW module .................................................................................. 77
Setting the semaphore timeout ....................................................................... 77
Array subscripts ................................................................................................ 78
Error handling ................................................................................................... 79
Building the application................................................................................... 79
Phrase dictionaries and compression............................................................. 79
Maintaining and modifying Web content ............................................................... 80
Sample applications.................................................................................................... 81
Chapter 7:
Troubleshooting ..........................................................................83
Diagnosing errors........................................................................................................ 84
Diagnosing a fatal error.................................................................................... 84
Diagnosing an unexpected exception ............................................................ 84
Reserializing a development board.......................................................................... 85
Development boards and serial numbers ..................................................... 86
Observing the LEDs.......................................................................................... 86
Preparing to reserialize .................................................................................... 86
Assigning a MAC address to the NET+Works board ................................. 86
Restoring the contents of flash ROM........................................................................ 88
Step 1: Configure the development board and the ICE............................... 89
Step 2: Building the bootloader....................................................................... 89
Step 3: Building the application image and starting NAFTPAPP ............. 90
Step 4: Sending rom.bin to the development board..................................... 90
Step 5: Verifying the boot ROM image on the development board .......... 91
Profiling your code ..................................................................................................... 92
Using the statistical profiler............................................................................. 92
Profiler API ........................................................................................................ 93
Profiler states ..................................................................................................... 93
Using This Guide
      ix
Review this section for basic information about the guide you are using, as well
as general support and contact information.
About this guide
This guide describes NET+OS and how to use it as part of your development
cycle. Part of the NET+Works integrated product family, NET+OS is a network
software suite optimized for the NET+ARM.
Software release
This guides supports NET+OS 6.0. By default, this software is installed in the
C:\NETOS60_GH361\ directory.
Who should read this guide
This guide is for software engineers and others who use NETWorks for NET+OS.
To complete the tasks described in this guide, you must:
Be familiar with installing and configuring software.
Have sufficient user privileges to do these tasks.
Be familiar with network software and development board systems.
x      
NET+Works with Green Hills BSP Porting Guide
Conventions used in this guide
This table describes the typographic conventions used in this guide:
What’s in this guide
This table shows where you can find information in this guide:
Related documentation
NET+Works Quick Install Guide describes how to install the hardware.
NET+Works with Green Hills BSP Porting Guide describes how to port the board
support package (BSP) to a new hardware application with GNU tools.
This convention Is used for
italic type Emphasis, new terms, variables, and document titles
bold, sans serif type Menu commands, dialog box components, and oher items
that appear on-screen
Select Menu > Option Menu commands. The first word is the menu name; the
words that follow are menu selections.
monospaced type Filenames, pathnames, and code
To read about See
The components of NET+Works Chapter 1,”NET+Works Introduction”
How to request evaluation and
permanent license keys
Chapter 2, “Requesting and Installing a MULTI
permanent license keys. 2000 License”
How to build and debug your first
application
“Building and Debugging a Sample application
Application”
How to convert HTML and related
Web page files to C code
Chapter 4, “Using the HTML-to-C Compiler”
Using the MIBMAN utilit Chapter 5, “Using MIBMAN”
Using the PBuilder utility Chapter 6, “Using the Advanced Web Server
PBuilder Utility”
Diagnosing problems, reserializing a
board, and profiling your code
Chapter 7, “Troubleshooting”
www.digi.com
      xi
NET+Works online help describes the application programmer interfaces (APIs)
that are provided with NET+OS.
Review the documentation CD-ROM that came with your development kit for
information on third-party products and other components.
For information about the processor you are using, see the NET+Works hardware
documentation.
Customer support
To get help with a question or technical problem with this product, or to make
comments and recommendations about our products or documentation, use this
contact information:
United State telephone: 1 877 912-3444
International telephone: 1 952 912-3444
Web site: http://digi.com
       1
NET+Works Introduction
CHAPTER 1
This chapter provides an overview of NET+Works.
Overview
2       
NET+Works with Green Hills Programmer’s Guide
Overview
The NET+Works products offer an embedded solution for hardware and
networking software that is being implemented into product designs.
NET+Works is designed as an alternative to a PC for products that must be
connected to Ethernet for TCP access and for Internet/Intranet access.
The NET+Works package includes:
Either the NS7520 or the NET+50
A development board and board support package
The networking firmware
The object code with application programming interfaces (APIs)
Development tools
Documentation
For information about the NET+ARM devices, see the hardware documentation
for the processor you are using.
Board support package
The board support package (BSP) is intended to work with the NET+OS real-time
operating system. Some NET+Works drivers provide the necessary APIs.
HTML-to-C compiler
The toolkit provides a compiler that translates your HTML code into C code. You
can then compile the C code as part of the project, which allows you to create the
pages your menu system needs to perform the tasks necessary for your device.
Sample code also is provided.
www.digi.com
       3
NET+Works Introduction
Security
NET+OS 6.0 provides security based on:
Netscape Communications Secure Sockets Layer (SSL) version 3
RFC2246 Transport Layer Security (TLS) version 1, to provide secure
communications over unsecured networks
Basic X.509 certificate generation and server authentication. These
services are supported:
HTTPS (HTTP over TLS v1), port 443, RFC 2818, SSLv3
Raw TCP/IP over SSL
Raw sockets over SSL (secure tunneling)
RSA key exchange/supported algorithm
Symmetric cipher algorithms
3DES-EBE-CDC
AES128-CBC
AES256-CBC
DES SSL is implemented through an API layer that enables existing sockets-
based applications to be modified to communicate transparently over links
that are secured by the SSL/TLS protocols.
An Advanced Encryption Standard RFC 3268-based cipher suite is available for
use with TSL. In addition, the API layer provides a mechanism by which users can
invoke an SSL/TSL-enabled HTTPS server.
      5
Requesting and Installing a
MULTI 2000 License
CHAPTER 2
Before you can use the MULTI 2000 software, you must obtain and install a
software license from Green Hills. This chapter discusses licensing options, provides
licensing tips and recommendations, and describes how to request and install a
license.
6      
NET+Works with Green Hills Programmer’s Guide
MULTI 2000 license options
This section describes the MULTI 2000 licensing options:
Node-locked license
Floating license
Dongle-locked license
Node-locked license
A node-locked license is valid on the computer for which the license is issued. You
cannot move a node-locked license to another computer. Thirty-day evaluation
and permanent node-locked licenses are available.
Floating license
Floating licenses are stored on one or more license servers, and users can check
them out from anywhere on the network. Floating licenses allow you to add new
systems to your network or to have users move from system to system without
reinstalling licenses on each machine.
Note, however, that MULTI 2000 software must be installed on each machine that
needs to run that software. Thirty-day evaluation and permanent floating licenses
are available.
Dongle-locked license
A dongle is a hardware key that attaches to the parallel port of any machine,
giving that machine a MULTI 2000 license. The dongle can hold licenses for
multiple Green Hills products and can be moved to any computer. Thirty-day
evaluation and permanent licenses are available.
Using the JEENI with MULTI 2000
If you use the JEENI in-circuit emulator (ICE) instead of the Raven, be sure to
indicate this in your license request.
www.digi.com
      7
Request permanent licenses immediately
Digi recommends that you request evaluation and permanent licenses at the same
time. Typically, Green Hills responds to node-locked evaluation license requests
(by email) within one business day. Floating evaluation licenses take slightly
longer, and dongle-locked licenses take several days longer still. Responses to
requests for permanent licenses typically take about 15 working days.
To avoid interruption to your development work, it is wise to begin the process of
acquiring permanent licenses immediately.
Requesting a license
This procedure describes how to first request an evaluation license—so you can
begin development work almost immediately—and then a permanent license,
which can take up to 15 working days to process.
If you plan to request floating licenses, generate the license request on the system
that will be the license server.
If you plan to request node-locked licenses, generate the license request on each
system that will have a node-locked license.
Before you request a permanent license
Have this information handy when you request a permanent license:
A purchase order number
The date of purchase order
Requesting an evaluation license
To request an evaluation license:
1 Select Start Programs MULTI 2000, ARM v3.6.1-NetSilicon's
NET+ARM-B
Licensing License Request Generator.
2 Complete the customer information, and then click Next.
3 Enter license information, and then choose Next.
8      
NET+Works with Green Hills Programmer’s Guide
4 Select the number and type of licenses you want, and then choose Next.
5 Specify Evaluation as the type of license, fill in other fields appropriately, and
then choose Next.
The license agreement screen appears.
6 Read the license agreement, and then choose Yes.
7 Choose Send to submit the request using your default email application.
8 When the untitled email message appears on your screen, send it to
Green Hills typically responds to the request by email within one business day.
When the response from Green Hills arrives, you need to install the license. See
the section “Installing MULTI 2000 licenses.”
Requesting a permanent license
To request a permanent license:
1 Click Back twice.
The
License Type screen appears.
2 Change the license type to Permanent, supply a purchase order number and
date, and then click
Next.
The
License Agreement screen appears.
3 Read the license agreement, and click Yes.
4 In the CD-ROM root directory, locate and print the license agreement for
your location:
If you are located in North America, use the North American Binary
Software License and Maintenance Agreement.
If you are located outside North America, use the International Binary
License and Maintenance Organization.
5 Provide this information:
Purchase order information
Date of purchase
Company name and address
Your location/site information
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112

Digi NET 50 Microprocessor User guide

Category
Software
Type
User guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI