Creating a Library Project

You can create a managed make library project by using the New Library Project wizard.

To create a library project:

  1. Click File > New > Other. The New Project dialog box appears.


  2. Expand Xilinx and select Library Project.
  3. Click Next. The New Library Project wizard appears.
  4. Type a project name into the Project Name field.
  5. Select the location for the project. You can use the default location as displayed in the Location field by leaving the Use default location check box selected. Otherwise, click the check box and type or browse to the directory location.
  6. The Library Type drop-down allows you to select the supported library types. You can choose to create a Shared Library or a Static Library project. The table below lists the flags set by the tool during the library project creation.
      Standalone Linux
    Static Library Static Library Shared Library
    Processor Toolchain Extra Compiler Flags Archiver Flags Extra Linker Flags Extra Compiler Flags Archiver Flags Extra Compiler Flags Extra Linker Flags
    A9 Linaro "-mcpu=cortex-A9 -mfpu=vfpv3 -mfloat-abi=hard" None None "--static" None "-fPIC" "-shared"
    A9 Code Sourcery None None None "--static" None "-fPIC" "-shared"
    A53 Linaro None None None "--static" None "-fPIC" "-shared"
    A53-32 Bit Linaro "-march=armv7-a" None None "--static" None "-fPIC" "-shared"
    R5 Linaro "-mcpu=cortex-r5" None None NA NA NA NA
    MicroBlaze™ Xilinx® "-mcpu=v9.5 -mlittle-endian -mno-xl-soft-mul -mxl-barrel-shift -mxl-pattern-compare" "-mlittle-endian" None "--static" None "-fPIC" "-shared"
  7. The OS Platform allows you to select which operating system you will be writing code for. The supported OS platforms are listed in the table below:
    Option Description
    Linux Shared libraries can be created only on the Linux OS platform.
    Standalone Select this option if you plan to create a library for FreeRtos.
  8. From the Processor drop-down list, select the processor for which you want to build the application. This is an important step when there are multiple processors in your design such as any Zynq® PS.
  9. Compiler type is 32-bit for all the processors except the psu_cortexa53 processor. You can also specify extra compiler settings under Advanced > Extra Compiler Flags on the wizard page.
  10. Select your preferred language: Cor C++.
  11. Click Finish to create your library project .
    Note: For MicroBlaze™ processor based projects, Xilinx SDK does not support any option to specify a hardware. You should specify the compiler options in the Extra Compiler Flags based on you hardware.
  12. You can now add your source files, write exposed APIs in the header files, update compiler settings and build the project to generate a library. Depending on the library type selected in during the creation of the library project, a shared library (<library_name>.so) or a static library (<library_name>.a) is generated.