• 0
bhall

SREC SPI Bootloader is Very Slow

Question

Hello,

I am using Vivado 2018.3 and a XC7A100T Artix-7. My project includes a Microblaze and an AXI QSPI controller. I am attempting to boot an SREC from Spansion Flash (S25FL256L) using the SREC SPI Bootloader. My SREC file size is around 830 KB. It takes over 2 minutes for the bootloader to finish loading the SREC. I commented out the VERBOSE definition, so nothing is being printed. Stack and heap sizes for the Bootloader are 2KB.

Does anyone have an idea as to how can I reduce this time?

I have tried increasing the clock frequency that is connected to my AXI QSPI controller (ext_spi_clk), but this did not help. I have also tried changing the bitstream configuration settings, but apparently that is for the initial FPGA configuration. I even tried an ELF bootloader found on Github, but it gave an error saying that my ELF header is invalid. 

Has anyone found a solution to this problem? I have seen several posts on these forums regarding this, but have found no clear solutions... 

Thanks in advance,

Brad

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
Posted (edited)

I have previously used this tutorial and did not experience 2 minute boot times.

Perhaps you could run through the tutorial and see how it behaves on your board.

There was also an old Xilinx answer record about eliminating large gaps in the s-record file. The steps outlined in there might help.

Edited by kwilber

Share this post


Link to post
Share on other sites
  • 0

Thanks @kwilber for this information. I was familiar with the tutorial you shared, but I hadn't tried changing compiler optimization flags, as they suggested. That decreased my file sizes, making it finish more quickly. It was still too slow for me, probably because my .srec is still pretty large. I didn't try the steps in the second link you shared, but I appreciate your assistance. 

(For others with a similar problem):

Instead of using the SREC SPI bootloader, I used this ELF Bootloader. It worked a lot better for me, but I did have to change a couple of the definitions in eb-config.h. I changed SPI_READ_OPERATION to 0x3 and SPI_FLASH_NDUMMY_BYTES to 0 as specified by my flash memory's datasheet. I also changed ELF_IMAGE_BASEADDR to fit my storage needs. It boots my .elf in about 3 seconds, compared to the SREC bootloader which took ~2.5 minutes. Maybe I had something configured incorrectly for that one...

Share this post


Link to post
Share on other sites
  • 0

Just curious, does the elf file you are trying to load use interrupts? The second link explains how the large gap between the interrupt vector table and the start of the program results in huge file sizes.

Share this post


Link to post
Share on other sites
  • 0

I am doing elf bootloader instead of SREC. Anybody please provide flashing steps after the application is ready.

Should I uncheck corvert to SREC during flashing elf??

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now