Specifications
Embedded System Tools Guide (EDK 6.2i) www.xilinx.com 123
UG111 (v1.4) January 30, 2004 1-800-255-7778
Libraries and Drivers Generation
R
directories. Refer to the “Drivers”, “OS”, and “Libraries” sections of this chapter for more 
information. 
code directory
The code directory is a repository for EDK executables. LibGen creates xmdstub.elf (for 
MicroBlaze on-board debug) in this directory. 
Note: LibGen removes all the above directories everytime the tool is run. Users must put in their 
sources/executables or any other files in a user created area.
Libraries and Drivers Generation
This section describes the basic philosophy of library and drivers generation.
The MHS and the MSS files define a system. For each processor in the system, LibGen finds 
the list of addressable peripherals. For each processor, a unique list of drivers and libraries 
are built. LibGen runs the following for each processor:
x Build the directory structure as defined in the “Output Files” section.
x Copies the necessary source files for the drivers/OS’s/libraries into the processor 
instance specific area: OUTPUT_DIR/processor_instance_name/libsrc.
x Calls the design rule check (defined as an option in the MDD/MLD file) procedure for 
each of the drivers, OS’s, and libraries visible to the processor.
x Calls the generate Tcl procedure (if defined in the Tcl file associated with an 
MDD/MLD) for each of the drivers/OS’s/libraries visible to the processor. This 
generates the necessary configuration files for each of the drivers/OS’s/libraries in 
the include directory of the processor.
x Calls the post_generate Tcl procedure (if defined in the Tcl file associated with an 
MDD/MLD) for each of the drivers/OS’s/libraries visible to the processor.
x Runs make (with targets “include” and “libs”) for the OS’s, drivers, and libraries 
specific to the processor.
x Calls the execs_generate Tcl procedure (if defined in the Tcl file associated with an 
MDD/MLD) for each of the drivers/OS’s/libraries visible to the processor.
MDD/MLD and Tcl
A Driver/Library has two data files associated with it:
x Data Definition File (MDD/MLD): This file defines the configurable parameters for 
the driver/OS/library.
x Data Generation File (Tcl): This file uses the parameters configured in the MSS file for 
a driver/OS/library to generate data. Data generated includes but is not limited to 
generation of header files, C files, running DRCs for the driver/OS/library and 
generating executables. The Tcl file includes procedures that are called by LibGen at 
various stages of its execution. Various procedures in a Tcl file includes DRC (name of 
DRC given in the MDD/MLD file), generate (LibGen-defined procedure) called after 
files are copied, post_generate (LibGen-defined procedure) called after generate has 
been called on all drivers, OS’s and libraries, execs_generate (LibGen-defined 
procedure) called after the BSPs, libraries and drivers have been generated.
Note: A driver/OS/library need not have the data generation (Tcl) file.










