Web 51 Firmware
Detailed description of individual files and directories of the Web51 development system.
Since version 1.12, no proprietary development software is needed. All tasks are accomplished by free, open-source tools. In addition, native P-Code support is built into the mcs51-as assembler.
The distribution contains a library of CGI scripts for use in HTML pages. Directory description explains what are the individual files intended for.
The libk library contains kernel modules. Source of these is available under our proprietary license only. The free version contains two pre-compiled binary-only versions of these libraries. See Contents of libraries.
The libw library includes all commonly used functions. Described sources are in the Web51 free development system package, available for DOWNLOAD.
Before linking, all files need to be converted to .asm before they can be compiled and linked. For .HTML, .JPEG, or .GIF files, this is ensured by this Perl script. Resulting source code contains headers necessary for the Web51 filesystem.
Scripts mac2hex.pl and ip2hex.pl convert MAC and IP addresses into a form suitable for the Web 51 development system. Scripts were inspired by similar GPL'ed scripts by Bruce Lightner.
Web51 uses a P-Code interpreter for some portions. This reduces code and enables program execution from other than program memory, e.g. from an external serial EEPROM.
Since the RAM in the system is extremely limited, data from the serial line are handled in a special fashion.
Main Web51 loop consists of several more or less mandatory parts that are in the web51.asm module, and user portions that are contained in the www8051.asm module. Description of individual main loop parts and their usage.
Basic characteristics of a simple WWW server, one of the examples.
Detailed description of embedding CGI scripts into html code.
Filesystem can span over 3 "medias": external I2C EEPROM, FlashROM of the CPU, EEPROM of the CPU (filesystem is searched in this order; therefore, files in external EEPROM 'overwrite' files in the CPU).
Basic properties of Web 51 can be explained on the "serial" example. This example project demonstrates Web51 functioning as a simple converter that extends the serial line over a TCP/IP network.Firmware of the "serial" project contains:
After a passive connection is established, WWW server waits for the minimum necessary portion of a http request (it can even be sent by telnet, that is, char by char). Then, name of the requested page is processed, http headers are added to the page, the page is split into several packets if necessary, and transmitted to the client. The last transmitted packet carries a "terminate connection" flag, and the server immediately releases occupied resources. This means that the server does not support persistent (KeepAlive) connections. Since there is no memory to store dynamically generated pages, server does not support retransmission of unacknowledged pages. In case of an error, the entire request needs to be repeated.
Telnet server supports passive connections, and can also actively establish connection with another server, if this option is enabled. Unlike the WWW server, it supports retransmission of unacknowledged packets. However, if the memory that holds unacknowledged data runs out, communication slows down. Connection terminates about 50 seconds after the last acknowledge is received.
To compile examples without "telnet", it is recommended to use the appropriate version of libk.a, that is, libk80.a that supports only one TCP stack, can't actively establish connection and does not support serial port. Therefore, it leaves much more RAM unused. More details are in Link order, contents of libraries..
|Web51 description||News||FAQ||ORDER FORM||DOWNLOAD||Links|
|(c)Copyright 2000 - 2002, HW server & Radek Benedikt