Jump to content
  • 0

How to store SDK project in SPI flash on Basys 3?


FlyingBlindOnARocketCycle

Question

Hello

I am attempting to follow this but I am confused about section 2.3.  It says to place all the application code in DDR.  The Basys3 has no external memory but for the SPI flash. From a SPI flash description from an Arty reference, it says

Quote

It is possible to automatically generate this bootloader, roll it into a single file (called an .mcs file) that also contains the bitstream and your custom Microblaze application, and program this file into SPI Flash using Xilinx SDK and Vivado. Xilinx Answer Record 63605 explains how to do this.

but when I read the Xilinx answer record 63605, it says on step 5. Create helloworld application and link to DDR (in the linker script make sure that this application is executing from DDR)

Can someone explain to me how to do this all in the SPI flash?  Do I need to somehow set that up in my block design in? I do have the QSPI in my block design already but it is not available to me as an option in the linker script window.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

Hello @FlyingBlindOnARocketCycle,

There are 2 types of projects that can be stored to SPI flash: the projects that require much more memory for data and code, than the available BRAM on the board so for that you'll have to use DDR and the projects that are smaller and fits into BRAM.

The tutorial from above is for projects that are using DDR memory. In Flash memory will be stored the application, then the bootloader will copy the Microblaze application to the specified location in DDR for execution.In DDR is stored the code and the data for the application to be executed.

The Basys 3 doesn't have DDR, so you must be careful with the BRAM resources so that the application can fit into BRAM.

Here is a post in which I provided the steps for programming the QSPI FLASH for Basys 3: https://forum.digilentinc.com/topic/19224-basys3-artix-7-fpga-trainer-board/?do=findComment&comment=51864

Please find out first which Flash chip your board have: Macronix part MX25L3233FMI-08G or Spansion part S25FL032 (just read what it's printed on the chip).

 

 

 

Link to comment
Share on other sites

Hello again @Ana-Maria Balas

After watching this video which says the Pmod wifi can function an any Artix 7 board and having a Basys 3 (Artix 7) I then purchased the Pmod wifi and Pmod SD.  While attempting to learn my way though this it appears that the comparability statement in the video may be misleading.

Having trouble with the Pmod SD @JColvin said it would not fit on the Basys 3 and I would

Quote

need a SPI bootloader application for the SDK project as described in our tutorial here: https://reference.digilentinc.com/learn/programmable-logic/tutorials/htsspisf/start.

If I understand what you are saying, as the Basys 3 has no external RAM, the Pmod SD not compatible.  Is this correct?

Link to comment
Share on other sites

I don't think the problem is Pmod SD but more because of Pmod Wi-Fi. The instruction and data section for this project are too big to fit into BRAM. That is why in the video, he added MIG IP (Memory Interface Generator) to store the data and instruction in DDR.

However you could try to make the project without MIG IP, and add only the Pmod Wi-fi IP, Pmod SD and AXI GPIO, AXI UART LITE IP.

I have small hopes it will work, but this way you can find out if it fits into BRAM.

Link to comment
Share on other sites

Also you must select the maximum memory available from Vivado in Memory Editor Window.

Unfortunately you cannot use the flash memory as additional memory for the project. I read somewhere a while ago that you can make some adjustments and have a smaller .elf file so it can fit into BRAM. I will search to see if I find those topics again.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...