Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting the ARM webserver programmer's guide.Ver 1.6.pdf
Скачиваний:
27
Добавлен:
23.08.2013
Размер:
1.19 Mб
Скачать

Porting Step-by-Step

3.3HTML Compiler

If you plan to use the VFS, the next step is to compile the HTML files into the data structures and strings that will be the actual VFS files. If you are working solely on a native file system, you should skip this step.

3.3.1Building the HTML Compiler

The first step is to get the HTML Compiler working on your development system. The compiler source is a single C source file, with a few standard includes, and a few includes from the ARM Webserver package. It can be built either by using the supplied makefile, or by building the htmlcomp.mcp file with ADS 1.0.1.

3.3.2Running the HTML Compiler

The exact use of the HTML Compiler is detailed in Chapter 4 Using the HTML Compiler. To build an initial prototype webserver with only a few pages, you can use the compiler’s default settings. To run the compiler:

1.Create an input file with the names of your HTML files. This is a simple text file with one file name per line. You can create it with any plain text editor, such as

vi, Notepad, or ADS 1.0.1. You must also include the names of any .gif, .jpeg,

.map, or Java bytecode files you want in your VFS. Any kind of file can be included here. If the HTML Compiler does not understand the type (as indicated by the file extension), it will simply encode a binary image of the file.

2.Run the HTML Compiler. Use the -i option to give it the name of your input file. If your input file name is htmllist.vfs, for example, the correct syntax would be:

armsd -armul -exec htmlcomp.axf -i htmllist.vfs

The HTML Compiler, in this case, will create a file named htmldata.c, which includes the VFS file data and structures for your input files. This file will be linked into your embedded image by the initialization routines described in Provide the system routines on page 3-7. If the file is too big (for example, it may slow the compiler or exceed the maximum file size for your editor), refer to Usage on page 4-3 for information on the -o option that can be used to provide multiple, smaller files.

3-6

Copyright © 1999-2001 ARM Limited. All rights reserved.

ARM DUI 0075D