Open main menu

DAVE Developer's Wiki β

Changes

Creating and building example Vivado project (BELK/BXELK)

2,059 bytes added, 10:23, 4 November 2015
no edit summary
*once the Xilinx SDK is ready, perform the following operations from the GUI:
**Click on ''File -> New -> Application Project''
**Select 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 ''bora_FSBL'' borax_FSBL in Project Explorer and then by 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>**From for BoraX: from ''Browse...'' open the file <code><bora_repo>/patch/belkbelkx-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 ''bora_FSBL 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):
***Apply 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''***Apply *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 this the command manually : <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 ''bora_FSBLPost-build steps'' ***for BoraX: configure the automatic binary generation on projectbuild. 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 ''bora_FSBL projectProject 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>bora_FSBLDebug</code> directory. N.B. check that the <u>''Partition Type'' for FSBL is ''bootloader''</u>***<code>bora_wrapper.elfbit</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>bora_wrapperborax_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.
==GUI based procedure==
4,650
edits