Baremetal boot from QSPI

Hello, I have a snickerdoodle black and piSmasher I’m trying to utilize. I have a custom FPGA firmware load and a custom bare metal CPU app that I am able to program and run in JTAG mode using Xilinx JTAG programming cable, and that is working good, seeing pins change and VCOM UART printouts. I’d now like to program this custom load into the onboard QSPI flash so it boots up with this custom load.

I should note that I have done several bare metal CPU + FPGA loads targeting other Zynq-7000 boards, specifically to boot from QSPI flash, so I’m at least familiar with the “normal” way to set this up and generate a BOOT.bin.

I tried to use Vivado to program the QSPI flash as I normally do on other boards, but it errored out stating that the device was in SD Boot mode. I then learned that there’s a special button hold pattern on power-up to force it into QSPI mode. One guide said that you just hold down select, power the board up, then wait for the LEDs to turn on then off, and that will mean it’s in QSPI mode (the board I have behaves this way). Another guide said that you hold down the select button on powerup, you get a green blinking LED and then sort of a LED/button “menu” of sorts to configure the boot mode. My board did not behave this second way.

So I did this select button sequence and tried to use Vivado to program again, this time it was a success! It says it programmed and verified (I selected mt25ql128-qspi-x4-single in Vivado, which was the alias for N25Q128A11ESE40F). However, it still does not seem to be able to boot. Since programming, I have tried powering up with the select button held, but I don’t see any signs of life, nor the white heartbeat LED. All I get is the green power LED. I even tried using the Vivado hardware manager “Boot from Configuration Flash” option to try and boot that way. No luck.

So I’m reaching out for help. Any ideas what might be causing this? Some questions:

  1. Do I need to add any specific bitstream type of xdc constraints to my Vivado project?

  2. Is there any modifications needed to the FSBL app?

Not sure if this makes a difference, but this was purchased mid 2020. I don’t have an SD card plugged in at all (and won’t be able to).

Hello, when you made the snickerdoodle black project, did you use the proper snickerdoodle black board file or just the part number?

Also, to program into QSPI flash, you should boot using JTAG boot mode. Another thing to try if you haven’t

  1. Yes I did use the board vivado project files

  2. Interestingly, I was trying to get it to boot in JTAG mode as you recommended (holding down just the SW2 RE/SET button on power-up), suddenly my previously programmed QSPI flash booted up and ran. I think this was just a user error (could have sworn I read a document that said SW1 was the button to hold down instead of SW2).

hmm interesting. Let me know if you run into further issues