Jump to content
  • 0

How do I program the SPI FLASH with the Cmod A7 Out of Box Demo bootable image?


torleifj

Question

Hi.

I have installed Vivado 2018.3 and can install the Microblaze hardware in the CMOD A7 and run software on it. What is the procedure for flashing it so that it boots on power on? 

I can't figure out what the process for flashing a bootable Microblaze image is. Do I have to run updatemem or can it be done from the IDE? Should it be done from Viavado itself or from the IDE?

Thanks,

TJ.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

Hi @torleifj,

We have a guide on putting a SdK/Microblaze project into flash memory here: https://reference.digilentinc.com/learn/programmable-logic/tutorials/htsspisf/start. It was designed for the Nexys A7 (Nexys 4 DDR) so some of clocks mentioned during the creation of the block design will not match what you need for the Cmod A7 as the Cmod A7 does not have embedded DDR.

I've also occasionally seen some reports that the guide flow does not work (at least on the final steps of actually programming the flash memory, not the creation of the flash program) as expected for some boards so you may want to look into this forum threads as well (link).

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

Thanks JColvin.

I share the frustration from the other thread, but it seems that there is no solution. 

As far as I can tell from the OOB example, it requires no bootloader, so I program the vivado_proj\Cmod-A7-35T-OOB.sdk\user_35t_wrapper_hw_platform_0\download.bit into the FLASH with offset 0x0 using "Program Flash Memory" in the SDK.

Is that correct? It doesn't work.

How do I debug this? 

It runs fine with "Program FPGA" in debug mode.

Is there anything else, I should do?

Thanks, TJ.

Link to comment
Share on other sites

Hi @torleifj,

I wanted to let you know that @artvvb and I looked into this and tried some other techniques for loading an SDK/Microblaze project into flash, but have not figured out a solution as of yet and haven't had more time to dedicate to this problem today. These were the guides we took a look at and tried some different approaches with here and here. Note that those two pieces of material have different errors associated with them (and that I wasn't able to get them to work), so take it with a grain of salt.

I'm not sure what you mean by prom programmer, nor have I heard about nibbles being swapped when loading from flash.

Thanks,
JColvin

Link to comment
Share on other sites

Hi JColvin.

Thanks for working on this. 

By prom programmer, I mean  "Program Flash Memory" in the SDK.

It's only in the CPU memory, so it's probably an issue with the application that merges the elf with the hardware application.

Thanks

Torleifj.

Link to comment
Share on other sites

Ok, I had help from someone who had been there before. Don't do as they say, it doesn't work.

What actually works is using Vivardo and associate an elf file with the Microblaze instead of the bootloop elf file that comes as default.

I think there is a bug in the SDK as it shifts the blockmem contents by 4 bits.

Thanks 

Torleifj.

Link to comment
Share on other sites

Here are the steps:

Use the guide to open the Microblaze design.

Update the parts that are outdated.

Generate bitstream.

Change prom options to correct type, SPI x4 and width=4. Speed can be 33MHz.

Synthesize again.

Export hardware including bitstream (Bitstream probably not nescessary.

Open SDK and follow the guide again.

clean

change build configuration to release

clean

Now you have the elf tile, you need in release.

Go back to Vivardo

Open Block design.

Right click on Microblaze and choose associate elf file.

Add the elf file in release. You can't delete bootloop, but you can keep the design elf file selected and click ok.

Now generate bitstream again.

Open target.

Add the flash on the board.

Program it with  the hardware bitstream.

Then it should work.

Best regards,

Torleifj.

 

Link to comment
Share on other sites

Thank you for the steps; I think I see the difference what I was doing. I hope to successfully test this tomorrow.

If all goes well, I'll be sure to link your specific post in the guide as a reference for other future users.

Thanks,
JColvin

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...