Thank you for this tutorial. I'm using the Cmod-A7 and it's a little different. I wrote a procedure based on this tutorial. I cited this video as one of my references. Please give this video a like. If you've seen my post on the Digilent forum, please let me know what you think? I hope you find it a useful companion to this video.
So we have used the SDK to program the QSPI Flash with the Microblaze application. I see that. But then what is the point of associating ELF inside the Vivado project? I had thought that the BIT file and ELF file will be combined into a single file and programmer and then the Microblaze will be able to simply boot from the external memory. However, that did not happen. I am actually very surprised to see how long the Microblaze took to boot for a program that should be a few kB at most. What is going on here?
Good demo sir. Have one request. Can you pls try pressing board reset button? In my case things work fine, but on reset, the application does not reinvoke, things go silent.
This method works well with Cmod A7-35t, but ONLY with Vivado release up to 2019. The xilifs library, regarding the latest Vivado releases, so the 2020.x and 2021.x is deprecated and into the Vivado2021.1 and 2021.2 you can not find it! Of course this is mainly related to the Vitis that is used as the older SDK into the older Vivado release. Then the SREC SPI bootloader into the latest Vivado do not use the xilifs library and then actually I'm try to explore some way to get all stuff working also into the latest Vivado release. To temporary overcome this trouble one solution is build the bootloader with an older Vivado release and merge the bitstream files that came from the compilation made with the latest Vivado release, but my purpose is work entirely inside the latest Vivado release, so if someone have some idea how to do kindly share it. Thanks!
Great Explanation. I have a query. Here, does the applicaiton code execute from the flash directly or does it get loaded to BRAM and execute from BRAM?
@@abhaydeshmukh2642 The boot loader runs from the BRAM, which is the default memory of Microblaze. It copies the application program from the flash to the DDR RAM, and then jumps the execution to the starting location of the application program. So the application program runs from the DDR RAM
For storing configuration information you can use either .bin or .mcs file . I used .bin, as bin file has lower size than .mcs format. Both will work from qspi flash also
@@letslearn39 thank you. The CMod-A7 has an external Cell RAM, but I can't figure out how to connect it. When I try to generate the linker file, the option doesn't show up for the first selectable memory location. The other 2 do, so I selected BRAM there. But I'm still failing to get my app to run. The FPGA fabric does load though.
@@dimaendurostil Finally... I am able to boot it in close to 2-3 seconds...Solution is to use a ELF bootloader instead of SREC boot loader. Found this one useful : github.com/henrikbrixandersen/elf-bootloader?_ga=2.31552702.1877051130.1608877703-1369130971.1600956706 But I had to make a few changes to get it running. 1. Change SPI_READ_OPERATION to 0x03 in eb-config,h 2. Change SPI_FLASH_NDUMMY_BYTES to 0 3. Change ELF_IMAGE_BASEADDR to the address where you are storing the ELF file in the Flash. (Very IMPORTANT to note that this file uses a 3 byte addressing, and hence I was able to use only first 16MB of the Flash. So you need to write the ELF file(NOT SREC) within the first 16MB.) 4. When the bootloader elf file was combined with bitstream and loaded, the first spi_flash_read() call was not giving the correct data. So I had to repeat that statement twice just to make a dummy read call before actual call. (Line number 142 in elf-bootloader.c should be repeated twice. ) (Point number 1 and 2 are specific to "Standard Mode " and are different for "Quad Mode". Refer Flash Datasheet to get the correct values for each configuration.)
HEY ..thank you for the video..was really good .. but am getting could not retrieve flash memory part when trying to program flash from sdk..using xilinx platform cable on a custom board..i have correctly set the fpga device (since the board has 2 fpga's on it!) I have uploaded the configuration file from vivado successfully.. but now am stuck for the application part
@@letslearn39 Hey thank u for replying.. so it works fine before 20:47 in the video .. but next as you open the sdk and go for program flash memory, I can see your flash type is already there.. but for me on the top it throws an error saying it cannot find the flash device(xilinx docs say check hardware connectivity, which is working just fine, I used it for flash from vivado ). So next I go to debug mode and I see my microblaze in on reset.. I want to share my screenshots if you can provide me a mail !
Also one more doubt when I was creating my flash configuration file.. it failed as it showed that the spix4 has discrepancy as it's already set to spix1 in my bitfile..i dnt understand when did i give that information..my qspi settings match yours..were could it be going wrong..any idea?
Thank you for this tutorial. I'm using the Cmod-A7 and it's a little different. I wrote a procedure based on this tutorial. I cited this video as one of my references. Please give this video a like. If you've seen my post on the Digilent forum, please let me know what you think? I hope you find it a useful companion to this video.
So we have used the SDK to program the QSPI Flash with the Microblaze application. I see that. But then what is the point of associating ELF inside the Vivado project?
I had thought that the BIT file and ELF file will be combined into a single file and programmer and then the Microblaze will be able to simply boot from the external memory. However, that did not happen.
I am actually very surprised to see how long the Microblaze took to boot for a program that should be a few kB at most. What is going on here?
At 3:24, there are 3 "spi flash" options, why is that?
Good demo sir. Have one request. Can you pls try pressing board reset button? In my case things work fine, but on reset, the application does not reinvoke, things go silent.
Thank you. I believe this will work on the Cmod A7 too.
This method works well with Cmod A7-35t, but ONLY with Vivado release up to 2019. The xilifs library, regarding the latest Vivado releases, so the 2020.x and 2021.x is deprecated and into the Vivado2021.1 and 2021.2 you can not find it! Of course this is mainly related to the Vitis that is used as the older SDK into the older Vivado release. Then the SREC SPI bootloader into the latest Vivado do not use the xilifs library and then actually I'm try to explore some way to get all stuff working also into the latest Vivado release. To temporary overcome this trouble one solution is build the bootloader with an older Vivado release and merge the bitstream files that came from the compilation made with the latest Vivado release, but my purpose is work entirely inside the latest Vivado release, so if someone have some idea how to do kindly share it. Thanks!
Could you tell me what is maximum and minimum of Axi quad SPI clk, plz?
Great Explanation. I have a query. Here, does the applicaiton code execute from the flash directly or does it get loaded to BRAM and execute from BRAM?
@@abhaydeshmukh2642 The boot loader runs from the BRAM, which is the default memory of Microblaze. It copies the application program from the flash to the DDR RAM, and then jumps the execution to the starting location of the application program. So the application program runs from the DDR RAM
@@letslearn39 Thanks. Keep the good work going
How can i create a custom bootloader on fpga board…please give me some ideas
I saw you've used ELF bootloader instead of using this method. Does it require to add UART module to block design?
xilisf library is deprecated since 2019. What do I do now?
You have mead a great tutorial.
Now, how to do all these steps in command line using bash script or a python script?
Why you use .bin file instead of .MCS file for QSPI booting, as much as I know this .bin is used when booting through SD card boot mode ?
For storing configuration information you can use either .bin or .mcs file . I used .bin, as bin file has lower size than .mcs format. Both will work from qspi flash also
I can't get my App to run, but I do get the .bit file to run. I'm using a CMod-A7 though. It doesn't have DDR memory.
If you don't have external RAM then you don't need bootloader. But your application can not be bigger than the internal RAM (BRAM).
@@letslearn39 thank you. The CMod-A7 has an external Cell RAM, but I can't figure out how to connect it. When I try to generate the linker file, the option doesn't show up for the first selectable memory location. The other 2 do, so I selected BRAM there. But I'm still failing to get my app to run. The FPGA fabric does load though.
Hi my friend. i have arty-z7 and i want to connect micrblaze to some custom ip core. How to add DDR to the PL ?
(i dont want to use zynq)
To use DDR you have to add MIG to your design.then you can access it through the axi interface
How long bootloader load data in ddr and start, 1 min or 20 sec?
It is taking close to a minute
@@letslearn39
why so long and how can you make it take a couple of seconds?
@@dimaendurostil I will try out few options and come back. "Couple of seconds" could be a bit ambitious though :-)
@@letslearn39
30 seconds would be a great success for me. The fastest thing I got was 45-55 seconds. It is sad(((
@@dimaendurostil Finally... I am able to boot it in close to 2-3 seconds...Solution is to use a ELF bootloader instead of SREC boot loader.
Found this one useful :
github.com/henrikbrixandersen/elf-bootloader?_ga=2.31552702.1877051130.1608877703-1369130971.1600956706
But I had to make a few changes to get it running.
1. Change SPI_READ_OPERATION to 0x03 in eb-config,h
2. Change SPI_FLASH_NDUMMY_BYTES to 0
3. Change ELF_IMAGE_BASEADDR to the address where you are storing the ELF file in the Flash. (Very IMPORTANT to note that this file uses a 3 byte addressing, and hence I was able to use only first 16MB of the Flash. So you need to write the ELF file(NOT SREC) within the first 16MB.)
4. When the bootloader elf file was combined with bitstream and loaded, the first spi_flash_read() call was not giving the correct data. So I had to repeat that statement twice just to make a dummy read call before actual call. (Line number 142 in elf-bootloader.c should be repeated twice. )
(Point number 1 and 2 are specific to "Standard Mode " and are different for "Quad Mode". Refer Flash Datasheet to get the correct values for each configuration.)
HEY ..thank you for the video..was really good .. but am getting could not retrieve flash memory part when trying to program flash from sdk..using xilinx platform cable on a custom board..i have correctly set the fpga device (since the board has 2 fpga's on it!) I have uploaded the configuration file from vivado successfully.. but now am stuck for the application part
Are you able to run the processor application by downloading it through JTAG? Are you using MicroBlaze ?
@@letslearn39 Hey thank u for replying.. so it works fine before 20:47 in the video .. but next as you open the sdk and go for program flash memory, I can see your flash type is already there.. but for me on the top it throws an error saying it cannot find the flash device(xilinx docs say check hardware connectivity, which is working just fine, I used it for flash from vivado ). So next I go to debug mode and I see my microblaze in on reset.. I want to share my screenshots if you can provide me a mail !
@@SnehaChandees Send the screenshots to letslearnembedded@gmail.com.
@@letslearn39 done!
Also one more doubt when I was creating my flash configuration file.. it failed as it showed that the spix4 has discrepancy as it's already set to spix1 in my bitfile..i dnt understand when did i give that information..my qspi settings match yours..were could it be going wrong..any idea?
Please recheck you have selected spix4 at two places in the bitstream settings shown in the video at around 8:20 and 8:35.
@@letslearn39 Ya I missed at one place ! thanks