Generally, an archiver (ar) utility is used to create static library files (*.a).
If you are using Zynq, you can use the utility arm-xilinx-eabi-ar.
If you are using MicroBlaze, you can use the utility mb-ar.
arm-xilinx-eabi-ar -rcs libcustom.a source1.o source2.o
If you have an SDK project from which you wish to create a *.a file, follow the procedure below:
1. In SDK, Right Click on your Project > Properties
2. In the project properties window, click C/C++ Build > Settings and open the Build Artifact Tab as shown:
3. Select Static Library as Artifact name: and a as Artifact extension. If you wish, you can keep lib as the Output prefix
4. Add the -rcs Archiver flags as shown.
The r flag means to insert with replacement, c means to create a new archive, and s means to write an index.
5. The SDK console should look similar to the following:
6. You should now have an archives section in your project folder: