Specifications
Embedded System Tools Guide (EDK 6.2i) www.xilinx.com 291
UG111 (v1.4) January 30, 2004 1-800-255-7778
Example
R
Example MLD file for an OS
An example MLD file for the standalone OS is given below:
OPTION psf_version = 2.1.0 ;
OPTION is a keyword identified by the libgen tool. The option name following the
OPTION keyword is a directive to the libgen tool to do a specific action. Here psf_version
of the MLD file is defined to be 2.1. This is the only option that can occur before a BEGIN
OS construct now.
BEGIN OS standalone
The BEGIN OS construct defines the start of an OS named “standalone”.
OPTION DESC = “Generate standalone BSP”;
OPTION COPYFILES = all;
DESC option gives a description of the MLD. COPYFILES option indicates the files to be
copied for the OS.
PARAM NAME = stdin, DESC = "stdin peripheral ", TYPE =
peripheral_instance, REQUIRES_INTERFACE = stdin, DEFAULT = none;
PARAM NAME = stdout, DESC = "stdout peripheral ", TYPE =
peripheral_instance, REQUIRES_INTERFACE = stdout, DEFAULT = none ;
PARAM NAME = need_xilmalloc, DESC = "Need xil_malloc?", TYPE = bool,
DEFAULT = false ;
PARAM defines an OS parameter that can be configured. Each PARAM has the following
properties associated with it whose meaning is self-explanatory - NAME, DESC, TYPE,
DEFAULT, RANGE, DRC. The property VALUES defines the list of possible values
associated with an ENUM type.
END OS
END is used with the construct name that was used in the BEGIN statement. Here END is
used with OS to indicate the end of OS construct.
Example Tcl File of an OS
The following is the standalone_v2_1_0.tcl file corresponding the standalone_v2_1_0.mld
file described in the previous section. .The generate routine generates constants in a header
file and a c file for xilmfs library based on the library definition segment in the MSS file.
proc generate {os_handle} {
global env
set need_config_file "false"
#Copy over the right set of files as src based on processor type
set prochandle [xget_processor]
set proctype [xget_value $prochandle "OPTION" "IPNAME"]
set mbsrcdir "./src/microblaze"
set ppcsrcdir "./src/ppc405"
switch $proctype {
"microblaze" {
foreach entry [glob -nocomplain [file join $mbsrcdir *]] {
file copy -force $entry "./src/"
}
set need_config_file "true”










