Network Component
Version 6.6
MDK-Professional Middleware for IP Networking
|
The FCARM file converter reformats all web files into a single C-file which is then included and compiled into the project. All files are stored in the Virtual ROM File System.
If configured appropriately, FCARM will be invoked automatically during a project build. For setup, go to Project -> Options for Target and select the Utilities tab. At the bottom, you can configure how FCARM compiles the image files. Here's an example:
FCARM can also be invoked from the command line. You will find the executable in your MDK installation's sub-directory \ARM\BIN
. FCARM has the following syntax:
Where
commandfile
is the name of a command file that can contain an inputlist, outputfile, and directives. (See below.)If you do not wish to use the command file, you can invoke FCARM like this:
Where
inputlist
is a comma-separated list of files. The files get converted into one output file. File names must be specified with the file extension, but without the path information.outputfile
is the name of the output C-file containing the converted web files.directives
are commands and parameters that control the operation of the file converter. Available directives are: Directive | Description |
---|---|
Specifies the name of the listing file. Default is the base name of the output C-file with the extension *.LST. | |
NOPRINT | Disables the generation of the listing (LST) file. |
PAGEWIDTH | Specifies the number of characters on a line in the listing file. |
PAGELENGTH | Specifies the number of lines on a page in the listing file. |
ROOT | Specifies the root path where web files are located relative to the project directory path. |
FCARM integrates a file optimization algorithm to compress files and creates more compact and smaller executable images. FCARM decides on the file extension which kind of compression is used. Each file group has a different compression and optimization flavour.
When the filename has the tilde prefix (for example, ~doStuff.js) then compression or certain compression optimizations are disabled. This is useful when debugging a file. It is hard to trace code compacted to a single line with no spaces, no comments, and no line feeds.
Compression and optimization is performed in two iterations. In a 2nd pass, further optimization is performed resulting in better code density.
Group | Extension | Optimization | ~Optimization (disabled) |
---|---|---|---|
HTML | html | HTML compression
| no compression |
CGI | cgi | CGI compression
| white space removal but without grouping of small t-commands |
CSS | css | CSS compression
| no optimization |
JS | js | JS compression
| no optimization |
others | .* | not affected | not affected |
The following command line converts and optimizes index.htm, creates the output C-file index.c, and creates the listing file index.lst.
The following command line converts and optimizes a list of files, creates the output C-file web.c, and creates the listing file web.lst.
The following command line converts and optimizes a list of files, creates the output C-file Web.c, and suppresses the creation of the listing file (nopr - directive). The files are located in the project's sub-folder Web. This command reflects the settings from the configuration dialog as shown here.
The following command line converts and optimizes a list of files, creates the output C-file web.c, and creates the listing file web.lst. The file doStuff.js is excluded from optimization.
The following command line uses a command file.