Web pages are written with standard HTML, and can contain JavaScript and other client side scripts. The default web pages at delivery are located in the ".../src/projects/webserver/WebPages/Default" folder of the Netcruzer Download. To upload web pages to the SBC board, they are first compiled into a single "MPFS Image" file, and this file is then uploaded to the SBC board. There are a couple of ways to do this.
To upload the web pages with a browser, they must fist be compiled to a single MPFS Image file. See Creating a MPFS Image section below for details on doing this. The MPFS Image file can be uploaded in one of the following ways:
If asked for the username and password, use the default which is admin and microchip.
The Modtronix Webpage Generator application is used to create the MPFS Image and upload it to the target board. It can either be run directly, or by one of the script files, as described in the Using Scripts section below. The Modtronix Webpage Generator application is located in the "Webpage Generator" folder of the Netcruzer Download. Double click the WebpageGenMPFS.jar file to start the application(requires JAVA). It can also be downloaded from our site, links are located here.
The main dialog consists of 4 sections. To compile and upload the default web pages, do the following:
Once all details are entered, ensure your target board is connected to the network, and click on the "Generate and Upload" button. This will generate the MPFS Image file as specified in "Output Files" section of the app (Default.bin for this example), and upload it to the specified target board.
A couple of Apache Ant and bat script files are provided in the ".../src/projects/webserver/WebPages" folder to help with creating and uploading web pages. The "Xxxx" part in the file names below represents the folder name containing the web pages, for example "Default" for the default web pages.
The scripts listed above use the "dowebXxx.xml" Apache Ant Script files located in the same folder. For example, for the Default web pages located in the ".../src/projects/webserver/WebPages/Default" folder, the "BuildDefault.bat" and "BuildAndUploadDefault.bat" files use the "dowebDefault.xml" Apache Ant Script file.
As described above, the directory containing the web pages must be compiled into a single MPFS Image file before it can be uploaded to a target board. The methods described above create the MPFS Image file, and upload them to the target in a single step. Some times it is desirable to only create the MPFS Image file, for example to send it to customers so they can update their web pages. This can be done via the following methods:
Follow instructions as given in Using the Modtronix Webpage Generator App section above. In the Upload Settings section of the application, uncheck the check box. The "Generate and Upload" button will now change to "Generate", and will only create a MPFS Image file when clicked.
The "BuildXxxx.bat" script files in the ".../src/projects/webserver/WebPages" folder will create MPFS Image files for different projects. For example, the "BuildDefault.bat" file will create the "Default.img" file for the ".../src/projects/webserver/WebPages/Default" web page folder. These scripts use the "dowebXxx.xml" Apache Ant Scripts located in the same folder.