UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
336 Views
Registered: ‎06-10-2019

Why does Program Flash require an FSBL?

I have created an MyBOOT.mcs with out PL binary using the MyBOOT.bif as shown below

//arch = zynq; split = false; format = BIN
the_ROM_image:
{
[bootloader]C:\\zc702_restore_flash\zynq_fsbl.elf
C:\DemoFreeRTOS\Debug\DemoFreeRTOS.elf
}

program_flash -f C:\DemoFreeRTOS\Debug\MyBOOT.mcs -flash_type qspi-x4-single

running the above commnd gives following ERROR: Please specify a valid FSBL file for flash type: qspi-x4-single

Why is this even needed as my FSBL is already part of MyBOOT.mcs please help me understand. 

 

Thanks & Regards,

Vamshi G.

0 Kudos
9 Replies
Moderator
Moderator
331 Views
Registered: ‎09-12-2007

Re: Why does Program Flash require an FSBL?

Porgram Flash uses u-boot under the hood. Previously, this u-boot was stored in OCM. However, as more support was added to the program flash in way of devices, the uboot app grew. This is now stored in the DDR. Since this is stored in the DDR, then the DDRC controller needs to be initilised. This is done via the ps7/u_init.c in the fsbl.

 

0 Kudos
Contributor
Contributor
328 Views
Registered: ‎06-10-2019

Re: Why does Program Flash require an FSBL?

@stephenm 

Thanks for your comment. Please help me understand further down

1) FSBL is part of the file MyBOOT.mcs created using bootgen, is this correct ?

2) If above statement is true then QSPI is programmed with the fsbl part of MyBOOT.mcs or the fsbl file I give as argument to program_flash

3) From the documents of Xilinx *.bin file formate is used for boot from SD & its mandatory to have *.mcs file for flashing to QSPI, correct me if I am wrong.

 

Thanks,

Vamshi G.

0 Kudos
Moderator
Moderator
319 Views
Registered: ‎09-12-2007

Re: Why does Program Flash require an FSBL?

The MCS is the image you want to program onto your flash via the Program Flash utility. The program flash utility will use the the uboot to do this. since uboot will be in the ddr, it needs to init the PS.

So, you need to support the FSBL to the program flash. You can use the same fsbl.elf you used to create your mcs in bootgen.

0 Kudos
Contributor
Contributor
304 Views
Registered: ‎06-10-2019

Re: Why does Program Flash require an FSBL?

@stephenm ,

 

I understand program_flash uses u-boot under hood. I also understood as the OCM is 192K available and all the logic of U-boot will not fit into that memory, hence devices boots with FSBL, initializes the DDR, and then copies your code to DDR and executes from there and does flashing of QSPI.

Assume I have a custom FSBL, and I want the custom FSBL to be programmed into QSPI, in this case do I have to give my custom FSBL as argument to program_flash ?

 

Thanks

0 Kudos
Moderator
Moderator
283 Views
Registered: ‎09-12-2007

Re: Why does Program Flash require an FSBL?

Once the FSBL will config the DDR, then you can re-use this.

However, you will need to pass this FSBL in the Program Flash Utility. It wont read the fsbl in your mcs.

 

 

0 Kudos
Contributor
Contributor
254 Views
Registered: ‎06-10-2019

Re: Why does Program Flash require an FSBL?

@stephenm Please try to elaborate, when you say this FSBL I am not sure if your referringto my custom FSBL or the FSBL proivded by Xilinx as a pre-built binary.

 

 

0 Kudos
Moderator
Moderator
247 Views
Registered: ‎09-12-2007

Re: Why does Program Flash require an FSBL?

The FSBL needed by the platform flash just needs the DDR to be init. So, this doesnt matter where this FSBL comes from.

0 Kudos
Contributor
Contributor
244 Views
Registered: ‎06-10-2019

Re: Why does Program Flash require an FSBL?

Having said that, assume I have two fsbls

zynq_fsbl.elf from Xilinx & my_fsbl.elf (with DDR init) then 

MyBOOT.bif

the_ROM_image:
{
[bootloader]C:\\zc702_restore_flash\my_fsbl.elf
C:\DemoFreeRTOS\Debug\DemoFreeRTOS.elf
}

1) program_flash -f C:\DemoFreeRTOS\Debug\MyBOOT.mcs -flash_type qspi-x4-single -fsbl zynq_flash.elf

2) program_flash -f C:\DemoFreeRTOS\Debug\MyBOOT.mcs -flash_type qspi-x4-single -fsbl my_fsbl.elf

which one is valid from the abvoe two.

 

Thanks.

0 Kudos
Moderator
Moderator
241 Views
Registered: ‎09-12-2007

Re: Why does Program Flash require an FSBL?

you should just use the same FSBL; used in your MCS, and passed to the program_flash.

 

Can you try this and let me know if it works?

0 Kudos