Search code examples
fpgaxilinxzynqxsdk

How To Convert .bit file to .bin


I am following a tutorial on how to program the PL at run time for my ZedBoard. Tutorial Here.

But I am stuck on the step where it says to Convert.bit into.bin. From my understanding the difference between the two file types is that a bitstream contains a header.

Is there a command I can use to convert this, is there something in the XSDK that I can do to generate it from start up, or is there a way to manually strip the header file and rename it as a .bin?


Solution

  • Following are some of the options:

    • Once you have generated the bitsteam (.bit file) from Vivado/Vitis, run the following command to get a boot image (.bin file): bootgen -image boot.bif -o i boot.bin

    • Further, you can also run the following command to split the image to get the bitstream binary bootgen -image boot.bif -split bin -w on -p xc7kxxxx -o i boot.bin

    • Else you can set that option in bitstream settings while using Vivado GUI.

    • Or you can also try this script.

    • You can also check the official Xilinx video for How to Convert Bitstream to Raw Binary Using BootGen