xlnxembeddedsw/mcap/linux/README
<<
>>
Prefs
   1Steps to compile
   2################
   31. Download the latest PCI Utilites source from
   4   https://www.kernel.org/pub/software/utils/pciutils/
   5
   6   (Or) Source can be clone from the GIT repository,
   7        http://git.kernel.org/cgit/utils/pciutils/pciutils.git/
   8
   92. Compile the PCI Utilities by the following command,
  10   $pci-utils> make
  11
  123. Compile the MCAP Library by the following make command,
  13   $mcap-lib> make PCIUTILS_PATH=<PATH to PCI Utilities Source>
  14
  154. Compiling the MCAP library generates 'libmcap.a' and
  16   example elf 'mcap' built on top of generated library.
  17
  18Steps to Run
  19############
  20-> Running the 'mcap.elf' with '-h' lists all the options
  21   that are available to communicate with the underlying
  22   MCAP device,
  23   $Linux> ./mcap -h
  24   Usage: mcap [options]
  25
  26   Options:
  27        -x              Specify MCAP Device Id in hex (MANDATORY)
  28        -p    <file>    Program Bitstream (.bin/.bit/.rbt)
  29        -C    <file>    Partial Reconfiguration Clear File(.bin/.bit/.rbt)
  30        -r              Performs Simple Reset
  31        -m              Performs Module Reset
  32        -f              Performs Full Reset
  33        -D              Read Data Registers
  34        -d              Dump all the MCAP Registers
  35        -v              Verbose information of MCAP Device
  36        -h/H            Help
  37        -a <address> [type [data]]  Access Device Configuration Space
  38                      here type[data] - b for byte data [8 bits]
  39                      here type[data] - h for half word data [16 bits]
  40                      here type[data] - w for word data [32 bits]
  41
  42   NOTE: Specifying MCAP Device Id option is mandatory for the application
  43   to run. For example,
  44   $Linux> ./mcap -x 0x8011
  45   Xilinx MCAP Device Found
  46
  47NOTES
  48#####
  49. PCI Extended Capability Registers in Linux will only be
  50  accessible with privileged user access.  So, the example elf should
  51  be run with ROOT permissions.
  52
  53. To access device configuration space, 'type' in the above syntax should
  54  be either b/h/w (byte/half-word/word). For example,
  55
  56  -> Reading a byte
  57     ./mcap -x 0x8011 -a 0x354 b
  58
  59  -> Writing a word
  60     ./mcap -x 0x8011 -a 0x354 w 0x3
  61