After completing this lab, you will be able to:
Double click on the Zynq block to open the Customization window.
A block diagram of the Zynq should now be open, showing various configurable blocks of the Processing System.
Click OK. The configuration form will close and the block diagram will be updated.
Include xilffs in BSP
Build the FSBL project by Right-clicking on zynq_fsbl_system form the Explorer view and select Build Project or clicking on the hammer button.
A zynq_fsbl project will be created which will be used in creating the BOOT.bin file. The BOOT.bin file will be stored on the SD card which will be used to boot the board.
Adding FSBL partition
Click the Create Image button.
The BOOT.bin and the output.bif files will be created in the {labs}\lab5\image directory. We will use the BOOT.bin for the SD card boot up.
Creating BOOT.bin image file
In the Offset field enter 0 as the offset and click the Program button.
Program Flash Memory form
The lab1 and lab2 executable files are required in the .bin format before copying to the SD card. The area in memory allocated for each application need to be modified so that they do not overlap each other, or with the main application. The prepared bin files (lab1elf.bin and lab2elf.bin) provided in the directory: {sources}\lab8\SD_image can be used for copying to the SD card. Follow steps in Appendix A-1 and Appendix A-2 if you want to generate by yourself.
In System Explorer, copy the system_wrapper.bit of the lab1 project into the SD_image directory and rename it lab1.bit, and do similar for lab2
{labs}/lab1/lab1.runs/impl_1/system_wrapper.bit -> SD_image/lab1.bit
{labs}/lab2/lab2.runs/impl_1/system_wrapper.bit -> SD_image/lab2.bit
The bootgen command of Vitis Shell will be used to convert the bit files into the required binary format. The bootgen requires a .bif file which has been provided in the sources/lab8 directory. The .bif file specifies the target .bit files.
cd {labs}/lab8/SD_image
bootgen -image {sources}/lab8/lab1_bit_files.bif -w -process\_bitstream bin
bootgen -image {sources}/lab8/lab2_bit_files.bif -w -process\_bitstream bin
The size of the file needs to match the size specified in the lab8_sd.c file. The size can be determined by checking the file's properties. If the sizes do not match, then make the necessary change to the source code and save it (The values are defined as LAB1_BITFILE_LEN and LAB2_BITFILE_LEN).
Checking the size of the generate bin file
Note that the lab1.bin and lab2.bin files should be the same size.
Click the Create Image button.
The BOOT.bin file will be created in the {labs}lab8\SD_image directory.
In Windows explorer, copy the lab1elf.bin and lab2elf.bin files either from the {sources}\lab8\SD_image directory or from the individual directories (if you did the optional parts in the previous step) and place them in the {labs}\lab8\SD_image directory.
{Vitis_Workspace}\lab1\Debug\lab1elf.bin -> SD_image
{Vitis_Workspace}\lab2\Debug\lab2elf.bin -> SD_image
The prepared bin files provided in the directory: {sources}\lab5\QSPI_image can be used for creating the MCS. Appendix B-1 and Appendix B-2 lists the steps of how to create such BIN files.
Click on the Add button of the boot image partitions field and add the lab8_qspi.elf file , from {Vitis_Workspace}\lab8_qspi\Debug and click OK
A solution mcs file is provided in the {sources}\lab8\QSPI_image directory, use it if you have skipped the previous step of generate QSPI image.
Follow the menu and test the functionality of each lab.
Press 1 to load and execute lab2 or press 2 to load and execute lab2. Return to the menu by returning the board OFF and ON.
This lab led you through creating the boot images which can boot standalone applications from either the SD card or the QSPI flash memory. You then created the design capable of booting multiple applications and configurations which you developed in the previous labs.
In the lscript editor view, change the Base Address of the ps7_ddr_0_AXI_BASEADDR from 0x00100000 to 0x00200000 , and the Size from 0x1FF00000 to 0x1FE00000.
Changing the Base address and the size
Build the system project.
arm-none-eabi-objcopy -O binary lab1.elf lab1elf.bin
ls –l
in the shell window and note the size of the file. In this case, it is 32776 , which is equivalent to 0x8008 bytes. arm-none-eabi-objdump -S lab1.elf | grep "<main>"
It should be in the 0x0020074C.
Make a note of these two numbers (length and entry point) as they will be used in the lab8_sd application.
In the lscript editor view, change the Base Address of the ps7_ddr_0_AXI_BASEADDR from 0x00100000 to 0x00600000 , and the Size from 0x1FF00000 to 0x1FA00000.
Changing the Base address and the size
Build the system project.
arm-none-eabi-objcopy -O binary lab2.elf lab2elf.bin
ls –l
in the shell window and note the size of the file. In this case, it is 32776 , which is equivalent to 0x8008 bytes. arm-none-eabi-objdump -S lab2.elf | grep "<main>"
It should be in the 0x00600584.
Make a note of these two numbers (length and entry point) as they will be used in the lab8_sd application.
This step bring in MULTIBOOT register related code in Lab1. It then convert the lab1 executable file to the required (.bin) format.
Setting user-defined symbol
This step bring in MULTIBOOT register related code in Lab2. It then convert the lab1 executable file to the required (.bin) format.