How to set up Wind Web Server on the Target?
1. Wind Web Server gives us the benefits
After loading the VxWorks of Wind Web Server into the embedded device, we can make any machine installed as a standard web browser as the control maintenance terminal of the embedded device.
The hard disk file system is not required for Wind Web Server, we can create a memory image file in an embedded device store static web page, and Wind Web Server also supports Server Side Includes.
2. Step
1. Create a must-have HTML file;
2. Set C: / TornadO2 / Host / X86-Win32 / BIN to restart your computer. Control Panel -> System -> Advanced -> Environment Variables, add "after the value of the value of the Path and system variables of the user variable"; C: / TornadO2 / Host / X86-Win32 / bin ";
3. Run the command pagePack -r -s www -d / -o httpmemfs to convert the HTML file as a C file;
Description:
-r Converts the subdirectory of the HTML file directory specified by the -S;
-s Specifies the HTML file directory that will be converted;
-d Specifies the root directory of the memory file system on the target;
-o Specifies the file name of the target file;
After the execution is successful, two files will be generated: a C file, an H file.
4. Configure Wind Web Server;
Modify httpconf.c, httpconf.h file under the directory C: / Tornado2 / Target / SRC / HTTP / Config.
a) Comment on the httpconf.h file / * # deflude_http_log * /
b) Add #include "httpmemfs.h". httpmemfs.h is the header file generated in step 3;
c) Modify the HTTPD function. HttpMemfsinit_ declares in httpmemfs.c in httpmemfs.c;
HTTP_STATUS HTTPD (VOID)
{
IF (httpinit ()! = http_ok)
Return http_error;
/ *
* Configure Directory Accesses to Pick Up "INDEX.HTM".
* /
HTTPALIASCONFADD ("* /", "* / index.htm");
/ *
* Configure the pagepacked Content Files (The HTML, Image, Java,
* etc.) INTO The Memory FileSystem.
* /
HttpMemfsinit_ ();
/ * Enable FileSystem RPM to Access Pages from Some FileSystem * /
Httpfsconffic (http_fs_conf_max);
HTTPRPMCONFADD (http_m_get, "/", httprpmfs);
HTTPFSCONFADD ("/", "/");
/ * end of user definable initialization area * /
Return (httpserverloop ());
}
5. Compilation Connection Generate httpconf.o, httpglob.o, httpmemfs.o target file; a) Copy httpmemfs.c and httpmemfs.h to c: / tornado2 / target / src / http / config directory;
b) Run Make CPU = Pentium Wind_Base = C: / Tornado2 Wind_Host_Type = X86-Win32 in C: / Tornado2 / Target / SRC / HTTP / Config Directory;
6. Compile VXWORKS kernel;
a) Add HTTP Server in the VxWorks kernel;
b) Modify compilation settings;
c) Compilation
7. Add new VxWorks to Target.