Creating Bootloader for MicroBlaze to boot from SPI flash on AC701 (Xilinx Artix 7 Evaluation Board)

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 38

  • @SciHeartJourney
    @SciHeartJourney 3 роки тому

    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.

  • @優さん-n7m
    @優さん-n7m 2 роки тому

    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?

  • @優さん-n7m
    @優さん-n7m 2 роки тому

    At 3:24, there are 3 "spi flash" options, why is that?

  • @virenramchandani6113
    @virenramchandani6113 2 роки тому

    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.

  • @SciHeartJourney
    @SciHeartJourney 3 роки тому

    Thank you. I believe this will work on the Cmod A7 too.

    • @firefox3799
      @firefox3799 3 роки тому +1

      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!

  • @phongvuong3038
    @phongvuong3038 4 місяці тому

    Could you tell me what is maximum and minimum of Axi quad SPI clk, plz?

  • @abhaydeshmukh2642
    @abhaydeshmukh2642 4 місяці тому

    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?

    • @letslearn39
      @letslearn39  4 місяці тому +1

      @@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

    • @abhaydeshmukh2642
      @abhaydeshmukh2642 4 місяці тому +1

      @@letslearn39 Thanks. Keep the good work going

  • @codewithmac4223
    @codewithmac4223 Рік тому

    How can i create a custom bootloader on fpga board…please give me some ideas

  • @okan3028
    @okan3028 3 роки тому

    I saw you've used ELF bootloader instead of using this method. Does it require to add UART module to block design?

  • @bryankerr6725
    @bryankerr6725 Рік тому

    xilisf library is deprecated since 2019. What do I do now?

  • @優さん-n7m
    @優さん-n7m 2 роки тому

    You have mead a great tutorial.
    Now, how to do all these steps in command line using bash script or a python script?

  • @rioluka6699
    @rioluka6699 2 роки тому

    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 ?

    • @letslearn39
      @letslearn39  2 роки тому

      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

  • @SciHeartJourney
    @SciHeartJourney 3 роки тому

    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.

    • @letslearn39
      @letslearn39  3 роки тому +1

      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).

    • @SciHeartJourney
      @SciHeartJourney 3 роки тому

      @@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.

  • @Jonathan-ru9zl
    @Jonathan-ru9zl 2 роки тому

    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)

    • @letslearn39
      @letslearn39  2 роки тому +1

      To use DDR you have to add MIG to your design.then you can access it through the axi interface

  • @dimaendurostil
    @dimaendurostil 4 роки тому +1

    How long bootloader load data in ddr and start, 1 min or 20 sec?

    • @letslearn39
      @letslearn39  4 роки тому

      It is taking close to a minute

    • @dimaendurostil
      @dimaendurostil 4 роки тому

      @@letslearn39
      why so long and how can you make it take a couple of seconds?

    • @letslearn39
      @letslearn39  4 роки тому

      @@dimaendurostil I will try out few options and come back. "Couple of seconds" could be a bit ambitious though :-)

    • @dimaendurostil
      @dimaendurostil 4 роки тому

      ​@@letslearn39
      30 seconds would be a great success for me. The fastest thing I got was 45-55 seconds. It is sad(((

    • @letslearn39
      @letslearn39  4 роки тому +1

      @@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.)

  • @SnehaChandees
    @SnehaChandees 3 роки тому

    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
      @letslearn39  3 роки тому

      Are you able to run the processor application by downloading it through JTAG? Are you using MicroBlaze ?

    • @SnehaChandees
      @SnehaChandees 3 роки тому

      @@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 !

    • @letslearn39
      @letslearn39  3 роки тому

      @@SnehaChandees Send the screenshots to letslearnembedded@gmail.com.

    • @SnehaChandees
      @SnehaChandees 3 роки тому

      @@letslearn39 done!

  • @SnehaChandees
    @SnehaChandees 3 роки тому

    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?

    • @letslearn39
      @letslearn39  3 роки тому

      Please recheck you have selected spix4 at two places in the bitstream settings shown in the video at around 8:20 and 8:35.

    • @SnehaChandees
      @SnehaChandees 3 роки тому +1

      @@letslearn39 Ya I missed at one place ! thanks