Open main menu

DAVE Developer's Wiki β

Changes

Creating and building example Vivado project (BELK/BXELK)

1,763 bytes removed, 14:17, 5 November 2015
Command line based procedure
==Command line based procedure==
The following rocedure is detailed for Bora board. For BoraX please replace:
*bora_FSBL with borax_FSBL
*bora_wrapper_hw_platform_0 with borax_wrapper_hw_platform_0
*bora.sdk with borax.sdk
*bora_wrapper.bit with borax_wrapper.bit.
 
*start the Zynq development server and login into the system
*assuming that a local repository has not been created, clone the remote BORA git repository:
*once the Xilinx SDK is ready, perform the following operations from the GUI:
**Click on ''File -> New -> Application Project''
**this step is board dependent***for Bora: select the Project Name: <code>bora_FSBL</code>***for BoraX: select the Project Name: <code>borax_FSBL</code>
**Click ''Next''
**Select ''Template: Zynq FSBL''
**Click on ''Finish''
**this step is board dependent***for Bora: apply the patch, right-clicking on bora_FSBL in Project Explorer and then clicking on Team -> Apply Patch..***for BoraX: apply the patch, right-clicking on borax_FSBL in Project Explorer and then clicking on Team -> Apply Patch..*this step is board dependent**for Bora: from ''Browse...'' open the file <code><bora_repo>/patch/belk-sd-boot.patch</code>**for BoraX: from ''Browse...'' open the file <code><bora_repo>/patch/belkx-sd-boot.patch</code>
**Click ''Next''
**this step is board dependent***for Bora: Select ''Apply the patch to the selected file, folder or project'': and select <code>main.c</code> from ''bora_FSBL -> src''***for BoraX: Select ''Apply the patch to the selected file, folder or project'': and select <code>main.c</code> from ''borax_FSBL -> src''
**Click ''Next''
**Check that the patch is correctly applied to the source code and click on ''Finish''
**With the same procedure apply patches to fix DDR3 CKE deassertion time (see also: http://www.xilinx.com/support/answers/65145.html):
***this step is board dependent****for Bora: apply <code><bora_repo>/patch/AR65145_ps7_init_c.patch</code> on <code>ps7_init.c</code> under ''bora_wrapper_hw_platform_0''****for BoraX: apply <code><bora_repo>/patch/AR65145_ps7_init_c.patch</code> on <code>ps7_init.c</code> under ''borax_wrapper_hw_platform_0''***this step is board dependent****for Bora: apply <code><bora_repo>/patch/AR65145_ps7_init_tcl.patch</code> on <code>ps7_init.tcl</code> under ''bora_wrapper_hw_platform_0''****for BoraX: apply <code><bora_repo>/patch/AR65145_ps7_init_tcl.patch</code> on <code>ps7_init.tcl</code> under ''borax_wrapper_hw_platform_0''
*the FSBL (ELF file) is built automatically
*create the binary from the FSBL ELF chosing one of the following options:
**this step is board dependent***for Bora: manually launch the command: <code>arm-xilinx-eabi-objcopy -v -O binary $PROJ_DIR/bora.sdk/SDK/SDK_Export/bora_FSBL/Debug/bora_FSBL.elf $PROJ_DIR/bora.sdk/SDK/SDK_Export/bora_FSBL/Debug/bora_FSBL.bin</code>***for BoraX: manually launch the command: <code>arm-xilinx-eabi-objcopy -v -O binary $PROJ_DIR/borax.sdk/SDK/SDK_Export/borax_FSBL/Debug/borax_FSBL.elf $PROJ_DIR/borax.sdk/SDK/SDK_Export/borax_FSBL/Debug/borax_FSBL.bin</code>**this step is board dependent***for Bora: configure the automatic binary generation on project build. In ''Project Explorer'', right-click on <code>bora_FSBL</code> project and select ''C/C++ Build Settings'' and add the command <code>arm-xilinx-eabi-objcopy -v -O binary ${ProjName}.elf ${ProjName}.bin</code> on ''Post-build steps''***for BoraX: configure the automatic binary generation on project build. In ''Project Explorer'', right-click on <code>borax_FSBL</code> project and select ''C/C++ Build Settings'' and add the command <code>arm-xilinx-eabi-objcopy -v -O binary ${ProjName}.elf ${ProjName}.bin</code> on ''Post-build steps''*create the <code>BOOT.bin</code> image (single file including FSBL, FPGA and U-boot for uSD boot):**this step is board dependent***for Bora: select the <code>bora_FSBL</code> project in ''Project Explorer''***for BoraX: select the <code>borax_FSBL</code> project in ''Project Explorer''
**click on ''Xilinx Tools -> Create Zynq Boot Image''
*if the project is correctly configured, the tool builds automatically all the component listed in the form, so just add U-Boot to the list.
*otherwise, select ''Create new BIF file'' and set the output path and in ''Boot image partitions'' add the following files:
** for Bora***bora_FSBL.elf, which can be found in the project <code>Debug</code> directory. N.B. check that the <u>''Partition Type'' for FSBL is ''bootloader''</u>
***<code>bora_wrapper.bit</code>, which is the bitstream generated by the Vivado project (<u>''Partition Type'' must be ''Datafile''</u>)
** for BoraX
***borax_FSBL.elf, which can be found in the project <code>Debug</code> directory. N.B. check that the <u>''Partition Type'' for FSBL is ''bootloader''</u>
***<code>borax_wrapper.bit</code>, which is the bitstream generated by the Vivado project (<u>''Partition Type'' must be ''Datafile''</u>)
**<code>u-boot.elf</code>, which is the compiled U-Boot with <code>.elf</code> extension (<u>''Partition Type'' must be ''Datafile''</u>)
*in ''Output path'', select the path for the <code>BOOT.bin</code> file
4,650
edits