Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:programmable-logic:tutorials:htsspisf:start [2020/06/09 09:05] – [SDK Steps to create a bootloader and program the board] Monica Ignatlearn:programmable-logic:tutorials:htsspisf:start [2022/08/01 22:47] (current) – Made note that this guide is only compatible with 2019.1 and older. Will need a newer guide James Colvin
Line 9: Line 9:
  
 This guide requires the existence of a Vivado project containing a Microblaze system built complete with **Quad SPI**, **External Memory**, and **Uart** cores, and that you have the appropriate QSPI mode jumper setting on the board. This guide requires the existence of a Vivado project containing a Microblaze system built complete with **Quad SPI**, **External Memory**, and **Uart** cores, and that you have the appropriate QSPI mode jumper setting on the board.
-You can follow the steps presented in the  [[https://reference.digilentinc.com/learn/programmable-logic/tutorials/nexys-4-ddr-getting-started-with-microblaze/start#prerequisites|Microblaze tutorial]], and see below the missing steps for adding QSPI Flash and perform all the connections.+You can follow the steps presented in the  [[/learn/programmable-logic/tutorials/nexys-4-ddr-getting-started-with-microblaze/start#prerequisites|Microblaze tutorial]], and see below the missing steps for adding QSPI Flash and perform all the connections.
 Since there are slight differences in the Vivado 2019.1 and the version in which the Microblaze tutorial was created, the user needs to check all the connections in the block design to make sure that are correctly made or present. Since there are slight differences in the Vivado 2019.1 and the version in which the Microblaze tutorial was created, the user needs to check all the connections in the block design to make sure that are correctly made or present.
 === Hardware === === Hardware ===
Line 16: Line 16:
 === Software === === Software ===
   * **Xilinx Vivado 2019.1 with the SDK package.**    * **Xilinx Vivado 2019.1 with the SDK package.** 
 +
  
 === Board Support Files === === Board Support Files ===
Line 21: Line 22:
     * //These files will describe GPIO interfaces on your board and make it easier to select your FPGA board and add GPIO IP blocks//     * //These files will describe GPIO interfaces on your board and make it easier to select your FPGA board and add GPIO IP blocks//
     * //Follow this Wiki guide ([[vivado:boardfiles|Vivado Board Files for Digilent 7-Series FPGA Boards]]  ) on how to install Board Support Files for Vivado//     * //Follow this Wiki guide ([[vivado:boardfiles|Vivado Board Files for Digilent 7-Series FPGA Boards]]  ) on how to install Board Support Files for Vivado//
 +
 +<WRAP center round important 80%>
 +The xilisf library was officially depreciated by Xilinx starting in 2019.2 with the release of Vitis. This guide is only directly compatible with 2019.1 and older versions of the Xilinx software.
 +</WRAP>
  
  
Line 116: Line 121:
  
 === 6. Add AXI Quad SPI IP === === 6. Add AXI Quad SPI IP ===
-From the Add IP option, select AXI Quad SPI IP with the following customization: Mode - Quad, slave device - Spansion:+From the Add IP option, select AXI Quad SPI IP with the following customization: Mode - Quad, slave device - Spansion (or Macronix for boards with Macronix flash) 
  
 {{:learn:programmable-logic:tutorials:htsspisf:axiquadipsettings.png?nolink&400|}} {{:learn:programmable-logic:tutorials:htsspisf:axiquadipsettings.png?nolink&400|}}
Line 304: Line 309:
 === 2. Configure Bootloader BSP === === 2. Configure Bootloader BSP ===
  * Open the BSP project and open system.mss. Click "Modify this BSP's Settings". The memory device info needs to be passed to the xilifs library (//Overview > standalone > xilifs//).  * Open the BSP project and open system.mss. Click "Modify this BSP's Settings". The memory device info needs to be passed to the xilifs library (//Overview > standalone > xilifs//).
-  * //serial_flash_family = 5(Spansion/Micron)//+  * //serial_flash_family = 5(Spansion/Micron/Macronix)//
   * serial_flash_interface = 1(AXI SPI)   * serial_flash_interface = 1(AXI SPI)
 Click "Regenerate BSP sources". Click "Regenerate BSP sources".
Line 316: Line 321:
   * In your newly created bootloader application, open **blconfig.h** located in bootloader/src/blconfig.h and change **FLASH_IMAGE_BASEADDR** to suit your needs. Save the file in order to rebuild the bootloader project to contain the latest updates.   * In your newly created bootloader application, open **blconfig.h** located in bootloader/src/blconfig.h and change **FLASH_IMAGE_BASEADDR** to suit your needs. Save the file in order to rebuild the bootloader project to contain the latest updates.
 It is important to note that this value is the offset that the image will have in Flash. \\ It is important to note that this value is the offset that the image will have in Flash. \\
 +
 NOTE: If you are using the Cmod-A7 try the offset: 0x00300000. NOTE: If you are using the Cmod-A7 try the offset: 0x00300000.
  
Line 328: Line 334:
 {{:learn:programmable-logic:tutorials:htsspisf:verbose.png?nolink&800|}} {{:learn:programmable-logic:tutorials:htsspisf:verbose.png?nolink&800|}}
  
-Make sure to re-build the application after making these changes.+NOTE: If you are using a board with Macronix flash follow the additional steps: 
 + 
 +  * Open **bootloader.c** from the sources and scroll down until you find the call to **XIsf_Initialize**. Double click the function name to highlight it, right click and select "Open Declaration". This will open **xilisf.c**. 
 +  * Add the following line somewhere near the top of **xilisf.c** 
 +<code>#define XISF_MACRONIX_DEV_MX25L3233F 0x2016  /**< Device ID for MX25L3233F */ </code> 
 +  * In **xilisf.c** find the definition for IntelStmDevices[] and add the following: 
 +<code>{XISF_MANUFACTURER_ID_MACRONIX, XISF_MACRONIX_DEV_MX25L3233F, 
 +XISF_BYTES256_PER_PAGE, XISF_PAGES256_PER_SECTOR, 
 +XISF_NUM_OF_SECTORS64}</code> 
 +  * Save **xilisf.c** 
 +<WRAP round important 1000px> 
 +===Important if you are using a board with Macronix flash.=== 
 +The source files that need editing are part of a library (https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841939/xilisf) compiled into a bsp/domain. By navigating to the source files in SDK/Vitis, the local copy of the library's source files are opened. Any modification is done on this local copy and build into the static library (and application) upon build. However, when the source files of the bsp/domain are re-generated (context menu, Regenerate BSP sources), the changes made as explained above are overwritten from the originals in the Xilinx install directory. Take care this does not happen. 
 + 
 +A more permanent solution is forking the library repository (https://github.com/Xilinx/embeddedsw) editing the sources there and including a path to the modified repository in SDK/Vitis Xilinx->Repositories->Global.  
 +</WRAP> 
 + 
 +  * Make sure to re-build the application after making these changes.
  
 === 3. Program FPGA with bootloader === === 3. Program FPGA with bootloader ===
Line 394: Line 417:
  
 {{tag>learn programmable-logic tutorial nexys-4-ddr nexys-video arty cmod-s6 cmod-a7 microblaze}} {{tag>learn programmable-logic tutorial nexys-4-ddr nexys-video arty cmod-s6 cmod-a7 microblaze}}
-{{tag>learn programmable-logic tutorial genesys-2 microblaze}}+