Booting from SD card or SPI flash
The FSBL boot code is completely under user control and is referred to as user boot code. This provides us with the flexibility to implement whatever boot code is required for our system.
First stage bootloader
The First Stage Bootloader (FSBL) starts after the boot. The BootROM loads FSBL into the OCM. The FSBL is responsible for:
Create the first stage bootloader
The first step is to create the FSBL application. This is a C program that embeds all the Zynq internal register settings that were established during the Vivado Block Design. We start Xlinx SDK and make sure we have exported the lab2 design from Vivado and that we setup the Board Support Package (BSP).
The SDK program will open with the setup we used in our lab2 experiment. Before creating the FSBL file we have to add a library file used by the FSBL c-program. Select from the top menu:
Xilinx Tools-> Board Support Package Settings
Click OK and wait for the settings window to open.
We will add the xilffs library. We are now ready to generate the FSBL program.
1. Select New->Application Project
2. Enter a name (fsbl_0) and select existing BSP (standalone_bsp_0).
3. Click Next.
4. Select Zynq FSBL and click Finish. When the generation has finished there is a new entry in the Project Explorer namned fsbl_0.
5. Right-click the fsbl_0 entry and select: Build Configurations->Set Active->Release. The release configuration will have less overhead.
6. Build the release configuration by right-clicking and select Build Project.
7. Here is the result:
Generate the boot image
The next step is to create a non-volatile boot image for ZedBoard. The ZedBoard has two non-volatile bootable sources, QSPI flash and SD Card.
1. In the Project Explorer select LED_Dimmer
2. From the top menu select: Xilinx Tools->Create Zynq Boot Image
3. The tool will automatically pick up the files needed to build the boot image.
5. To generate a boot image for the SPI flash we will change the Output path file name to LED_Dimmer.mcs and rerun the Create Boot Image generation. It is the file type (bin or mcs) that defines what type of boot image that will be generated.
6. Here is the result.
Boot from the SD card
Copy the boot.bin file to the SD card and insert the card in to the ZedBoard. Set the jumpers to boot from SD card and power up the board. Connect a terminal and control the LEDs by entering different values.
Boot from SPI flash
First we will program the SPI flash using the LED_Dimmer.mcs file we just have generated. To program the SPI flash.
1. Connect the JTAG cable (see part 13).
2. Set the jumpers to JTAG mode.
3. In SDK select Xilinx Tools->Program Flash.
4. Specify the image file LED_Dimmer.mcs and click Program.
5. The programming will take a few minutes.
6. Power off the board and set the jumpers to SPI flash boot.
7. Power on the board. Connect a terminal and we are up and running in milliseconds.
Top Previous Next
September 9, 2014 03:07 PM PDT
I am getting an error during partial bit reading from SD card. It giving an error "f_open error 6", any idea? Done pin is glowing, full bit is working from BOOT.bin but partial bits are not being configured
|Henry Choi |
August 22, 2014 04:06 AM PDT
Hi Sven, thanks for trail blazing. I just got the xapp1079 working with Vivado 2014.2 webpack, and I did NOT need to create BOOT.mcs; BOOT.bin worked just fine for programming the QSPI.
May 14, 2014 07:35 PM PDT
You should complete lab2 meaning you should go through all the lab2 links.
May 14, 2014 01:03 PM PDT
@Sven We are thankful to you for spending your precious time writing your blog.
I am trying to follow your part 40 :
to make fsbl (, which I will ultimately use with what is explained in part 41).
In part 40 you say:
We start Xlinx SDK and make sure we have exported the lab2 design from Vivado and that we setup the Board Support Package (BSP).
Can you elaborate which lab 2 you are talking about here as I can see many lab 2 links?
|Leave a Comment:|