Web Filesystem Generator
安装ti的例程包以后,在c:\stellarisware\tools\bin路径下有makefsfile.exe,dos环境下使用
stellarisware\docs\SW-DK-LM3S9B96-UG-xxxx.pdf 里的第4章中Web Filesystem Generator,介绍了makefsfile的用法,使用方法:WIN键+R,键入cmd,进入dos命令行,使用cd..到达makefsfile.exe所在目录,makefsfile -i html -o fsdata.h,这样即可将网页变成代码;修改网页可以使用Dreamweaver等软件或直接编辑html文件。
将需要转换的网页文件的文件夹和makefsfile.exe放在一个文件夹,makefsfile -i html -o fsdata.h,html表示文件夹的名称,比如TI的网页文件夹为fs,输入的文件为fsdata.h,需要的命令就是:makefsfile -i fs -o fsdata.h
Web Filesystem Generator的用法
makefsfile [OPTION]...
Description:
Generates a file system image for the lwIP web server. This is loosely based upon the makefsdata Perl script that is provided with lwIP, but does not require Perl and has several
enhancements. The file system image is produced as a C source file that contains an image of all the files contained within a subtree of the development system’s directory structure. This source file is then built into the application and served via HTTP by the lwIP web server.
By default, the file system image embeds the HTTP headers associated with each file in the file system image data itself. This is the default assumption of the lwIP web server implementation and is sensible if using an internal file system image containing a small number of files. If also serving files from a file system which does not embed the headers (for example the FAT file system on a microSD card) dynamic header generation must be used and internal file system images should be built using the -h option. In these cases, ensure that DYNAMIC_HTTP_HEADERS is also defined in the lwipopts.h file to correctly configure the web server.
The -x option allows an “exclude file” to be specified. This exclude file contains the names of files and directories within the input directory tree that are to be skipped in the conversion process. If this option is not present, a default set of file excludes is used. This list contains typical source code control metadata directory names (“.svn” and “CVS”) and system files such as “thumbs.db”. To see the default exclude list, run the tool with the -v option and look in the output.
Each file or directory name in the exclude file must be on a separate line within the file. The exclude list must contain individual file or directory names and may not include partial paths. For example images_old or .svn would be acceptable but images_old/.svn would not. In addition to generating multi-file images, the tool can also be used to dump a single file in the form of a C-style array of unsigned characters. This mode of operation is chosen using the -f command line option. The source code for this utility is contained in tools/makefsfile, with a pre-built binary contained in tools/bin.
Arguments:
-b generates a position-independent binary image.
-f dumps a single file as a C-style hex character array.
-h excludes HTTP headers from files. By default, HTTP headers are added to each file in the output.
-i NAME specifies the name of the directory containing the files to be included in the image or the name of the single file to be dumped if -f is used.
-o FILE specifies the name of the output file. If not specified, the default of fsdata.c will be used.
-q enables quiet mode.
-r overwrites the the output file without prompting.
-v enables verbose output.
-x FILE specifies a file containing a list of filenames and directory names to be excluded from the generated image.
-? displays usage information.
Example:
The following will generate a file system image using all the files in the html directory and place the results into fsdata.h:
makefsfile -i html -o fsdata.h
引用: 原帖由 hansonhe 于 2012-3-20 12:21 发表 Web Filesystem Generator 安装ti的例程包以后,在c:\stellarisware\tools\bin路径下有makefsfile.exe,dos环境下使用stellarisware\docs\SW-DK-LM3S9B96-UG-xxxx.pdf 里的第4章中Web Filesystem Generator,介绍了 ...