07-25-2019 03:19 AM
I have created an MyBOOT.mcs with out PL binary using the MyBOOT.bif as shown below
//arch = zynq; split = false; format = BIN
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,
07-25-2019 03:23 AM
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.
07-25-2019 03:31 AM
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.
07-25-2019 03:35 AM
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.
07-25-2019 03:40 AM
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 ?
07-25-2019 04:45 AM
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.
07-25-2019 06:54 AM
07-25-2019 07:19 AM
The FSBL needed by the platform flash just needs the DDR to be init. So, this doesnt matter where this FSBL comes from.
07-25-2019 07:25 AM
Having said that, assume I have two fsbls
zynq_fsbl.elf from Xilinx & my_fsbl.elf (with DDR init) then
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.
07-25-2019 07:27 AM - edited 07-25-2019 07:28 AM
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?