Microprocessor Application Definition (MAD)
Microprocessor Application Definition Overview
A MAD file contains directives for customizing software application. This section describes the Microprocessor Application Definition (MAD) format, Platform Specification Format 2.1.0. and the parameters that can be used to customize applications.
Requirements
Each application has an MAD file and a Tool Command Language (Tcl) file associated with it.
The MAD file is used by Hsi to recognize it as an application and to consider its configuration while generating the application sources. The MAD file for each application must be located in its data directory.
Microprocessor Application Definition Files
Application Definition involves defining a Microprocessor Application Definition file (MAD) and a Data Generation file (Tcl file).
Application Definition File
The MAD file (<application_name>.mad) contains the name, description and other configurable parameters. A detailed description of the various parameters and the MAD format is described in MAD Format Specification.
Data Generation File
The second file (<application_name>.tcl, .with the filename being the same as the MAD filename) uses the parameters in the MAD file for the application to generate data..
DRC (swapp_is_supported_hw, swapp_is_supported_sw)
swapp_generate (tool defined procedure) called after application source files are copied
MAD Format Specification
The MAD format specification involves the MAD file format specification and the Tcl file format specification.
MAD File Format Specification
The MAD file format specification describes the parameters using a sample MAD file and its corresponding Tcl file.
The following example shows a MAD file for a sample application called my_application.
option psf_version = 2.1;option is a keyword identified by the tool. The option name following the option keyword is a directive to the tool to do a specific action.
BEGIN APPLICATION my_application option NAME = myapplication
option DESCRIPTION = "My custom application"
END APPLICATIONTcl File Format Specification
- DRC Section: This section contains Tcl routines that validate your hardware and software instances and their configuration needed for the application.
- Generation Section: This section contains Tcl routines that generate the application header and C files based on the hardware and software configuration.
MAD Format Example
This section explains the MAD format through an example MAD file and its corresponding Tcl file.
Example: MAD File
option psf_version = 2.1;option is a keyword identified by the tool. The option name following the option keyword is a directive to the tool to do a specific action.
BEGIN APPLICATION my_application option NAME = myapplication
option DESCRIPTION = "My custom application"
END APPLICATION