HTTP Server Example Application

This application demonstrates the HTTP server API.  The HTML
files under directory "html" contain the source for a set of web
pages.  The HTML->C tool was used to convert these web pages
into C files.  These C files are built into the application to
create a web server.

This example should work on all development boards.

The project file for the HTML->C tool is webpages.web.

The web server has three pages.  The pages demonstrate the use
of graphic images and dynamic text.

The application does the following:

1.  The development board is initialized and the POST tests
    are executed.
2.  The ThreadX kernel is loaded.
3.  The device drivers are loaded.
4.  The TCP/IP stack is loaded.
5.  The function applicationStart() is called.
6.  Adds the HTTP server to the system, which provides the services
    to serve the PBuilder pages.

All application results are observed be means of a web browser (e.g.,
Netscape, Internet Explorer).


Three Multi build files are provided.  The build file project.bld
is used to control how application specific files are built.  All
updates to the build should be made to this file.  Project.bld is 
a subproject to the other build files image.bld and rom.bld.  
Image.bld is used to generate a debuggable version of the 
application, and also creates the file image.bin that can be written
into ROM if the bootloader is used.  Rom.bld is used to generate a 
ROM image of the application if the bootloader is not used.

One GNU make file is provided.  Build the target 'image' to
generate an image that can be debugged with gdb, and the file 
image.bin which can be written to flash if the bootloader is used.
Build the target 'rom.bin' to create the file rom.bin which 
can be written to ROM if the bootloader is not used.

The following files are provided in this example.

appconf.h         sets application configuration settings
.\32b\image.bld   used to build the big endian Green Hills version of the
                  application.  The build script creates a version that
                  can be debugged with Multi, and the file image.bin 
                  which can be written into a ROM that uses the bootloader.
makefile          Make file for the GNU toolset.
project.bld       contains application specific build settings
readme            this file
.\32b\rom.bld     used to build the big endian ROM image of application
root.c          contains applicationStart() function, that creates an
                application thread
_netarm2.c      HTML-To-C Converter generated file containing the
                fleshed out Post_formreply, na_get_check,
                na_get_info_block, na_get_choice_list and
                na_get_text_data_value stub routines
_formreply.c    HTML-To-C Converter generated file containing the
                fleshed out na_show_secret_data stub routine

The following files are inputs/outputs to/from the html-to-c
converter tool and are contained in the .\html2c directory:

webpages.web    HTML-To-C Converter Project File.  Contains settings
                that set netarm1.htm as the home page, and assigns
                security to netarm2.htm
url.c           HTML-To-C Converter generated file containing the URL
                data and table of all Web Pages within the project
_netarm1.c      HTML-To-C Converter generated file containing the
                source code content of netarm1.htm
_netarm2.c      HTML-To-C Converter generated file containing the
                source code content of netarm2.htm.  Also contains the
                original blank Post_formreply, na_get_check,
                na_get_info_block, na_get_choice_list and
                na_get_text_data_value stub routines.
_formreply.c    HTML-To-C Converter generated file containing the
                source code content of formreply.htm.  Also contains
                the original blank na_show_secret_data stub routine.
bindata.c       HTML-To-C Converter generated file containing the
                source code content of the netsilicon.gif image.

The following Web content files are contained in the .\html2c\html
directory:

netsilicon.gif  GIF file for NetSilicon logo
netarm1.htm     opening web page
netarm2.htm     dynamic web page with counter
formreply.htm   form web page



In addition, the following files in the BSP directory are built
as part of this application.

reset.s         contains the reset code
appconf_api.c   contains code used to read settings in appconf.h


The application build file links in the following libraries.

bsp.a           contains the BSP code
tcpip.a         contains the Net+Works TCP/IP stack
tx.a            contains the ThreadX kernel
na1.lib,na2.lib contains the NET+Works API libraries.
httpd.a         contains the NET+Works HTTP API library


The application uses the following files located in the
netos\src\linkerScripts directory.

bootldr.dat     bootloader configuration file used to generate the
                file image.bin.  It controls the information placed
                in the bootloader header of the image.

image.lx        Green Hills linker script used to build an image
                that can be debugged and used with the bootloader.

rom.lx          Green Hills linker script used to build an image
                that will run from ROM.  The bootloader is not used
                with this type of image.

The application uses the following files located in the
netos\src\examples\nahttp\32b directory.

image.ld        GNU linker script used to build an image that can
                be debugged and used with the bootloader.
                
rom.ld          GNU linker script used to build an image that will
                run from ROM.  The bootloader is not used with
                this type of image.