Jump to content
  • 0

Pmod SD with Vivado 2019


specpro30

Question

Hi there,

I've been trying to get the Pmod SD to work in Vivado 2019 with both the Arty A7100 and Nexus Video.  Getting the following error message for both hardware platforms when the "Run As" command is executed in the SDK:

35883942_Screenshot2020-09-28at6_58_14PM.thumb.png.d94951640fc8bc75c23beb586f815cdf.png

Also, while the bitstream is being generated there are a few warnings that say that the package was not generated with the same hardware and that the project settings should be updated to match.  Any pointers would be greatly appreciated.

Cheers!

Edited by specpro30
Link to comment
Share on other sites

Recommended Posts

  • 0

Hi @specpro30,

The warnings about different hardware you can ignore.

I'll need to re-run this particular project to confirm, but I believe you will need to regenerate the BSP sources (right click on system.mss in the _bsp folder) and then rebuild the project (Project tab at the top of the window->Build All) in SDK to have that error be corrected.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi JColvin,

Thanks for getting back on this.  I regenerated the BSP sources and "Rebuild All" from the Project menu but still getting that error.  The BSP seems to indicate error right after the New Application in C is created:

1296127882_Screenshot2020-09-29at12_42_00PM.thumb.png.1496d70332810eec45aa3b9b637ab1ca.png

I've also tried adding the Pmod ENC as well and getting the same error message.  Thanks again for your help.

Cheers!

Edited by specpro30
Link to comment
Share on other sites

  • 0

Hi @specpro30,

Oh I see. You'll actually need to create an empty C++ application rather than a C application as per the Pmod SD IP: https://github.com/Digilent/vivado-library/tree/master/ip/Pmods/PmodSD_v1_0 since that is what the material is based on. I was successfully able to get the Pmod SD demo running on an Arty A7 100T on Vivado 2019.1 at least.

Let me know how this goes.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi there,

I tried to create both a C and a C++ empty project and they both had errors right after project creation:

3027751_Screenshot2020-09-30at11_36_03AM.thumb.png.c0fce68ea12e8845a27729a545623771.png

The c_proj_bsp is the empty C project and the cc_proj_bsp is the C++ project.  When my design does not include any IP then I don't get these errors and the C projects are created with out any errors.

Thanks for the advice!

Link to comment
Share on other sites

  • 0

OK I got a little further ahead with this but still getting an error when I "Build All" the following error occurs:

../../pmod-sd_bsp/microblaze_0/include/DFATFS.h:79:10: fatal error: utility/fs_ff.h: No such file or directory

The BSP Sources were regenerated before the Build All command but same error occurs.

I can then execute the "Run As - Launch on Hardware" with no errors this time but nothing happens in the Uart terminal window (i.e. not seeing "It Works!).

Appreciate your continued support.

Cheers!

 

Edited by specpro30
Link to comment
Share on other sites

  • 0

Hi @specpro30,

Could you attach a picture of your block design? I have attached my working SDK archive for the Arty A7 100T with the Pmod SD which another co-worker confirmed built on their machine (they launched SDK to the unzipped version of the folder, then imported the projects, and were able to successfully able to have the project build).

Thank you,
JColvin

PmodSD-191-A7100-SDK.zip

Link to comment
Share on other sites

  • 0

Hi JColvin,

Thanks for sending the the archive.  I can confirm that it works on my Arty A7 100 Dev board as well.  Please find attached the block diagram from my Pmod file in Vivado.  I noticed that you have some Mig-7 libraries in your SDK archive.  I haven't implemented any Mig 7 block in my design.  Could that be the reason?

Thanks for your help!

 

Screenshot 2020-10-02 at 9.49.20 AM.png

Link to comment
Share on other sites

  • 0

Hi @specpro30,

Potentially; I added in the DDR memory on my block design because I recall needing the external memory in order to handle the Pmod SD libraries. It may be possible to instead increase the local memory of Microblaze during it's Block Automation and successfully use the Pmod SD, but I have not attempted this.

A guide on how you can do this in Vivado is available on our Wiki here: https://reference.digilentinc.com/reference/programmable-logic/guides/getting-started-with-pmod-ips; it's for Vivado 2020.1 (and correspondingly Vitis rather than SDK) but the Vivado implementation will be the same for running a Microblaze project without DDR.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi JColvin,

Thanks for sending the tutorial for the Vivado 2020.1 pmod-ips.  The two download links in the tutorial for the "v2020.1-1.zip" and "pmod_update.zip" unfortunately don't work both with 404 file not found errors.  Is there another link I can download the files at? 

UPDATE:

After setting up all the IPs according to the instructions I’m still getting the following error when app is run:

——————————————

19:56:14 **** Incremental Build of configuration Debug for project sd_pmod_app ****
make all
Building file: ../src/main.cc
Invoking: MicroBlaze g++ compiler
mb-g++ -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/main.o" -I../../sd_pmod_app_bsp/microblaze_0/include -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.cc"
In file included from ../../sd_pmod_app_bsp/microblaze_0/include/DXSPISDVOL.h:50,
                 from ../../sd_pmod_app_bsp/microblaze_0/include/PmodSD.h:1,
                 from ../src/main.cc:53:
../../sd_pmod_app_bsp/microblaze_0/include/DFATFS.h:79:10: fatal error: utility/fs_ff.h: No such file or directory
 #include "utility/fs_ff.h"
          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [src/subdir.mk:23: src/main.o] Error 1

19:56:15 Build Finished (took 431ms)

————————————-

Also getting the "Executables selected for download on to the following processors don't exist...:1.microblaze_0"

What's the best way to fix this?  Thanks for your help

Cheers!

PS.  Here's the wrapper information.  Compared to the archive file you sent the only difference are the "rst_mig_7series_0_83M" (on the archive it is "rst_mig_7series_0_100M"); and the Target FPGA on here is "7a100t" and on the archive is "7a200t".  Also when comparing the Peripheral Drivers in the BSP, my design has the "Microblaze_0_axi_intc" whereas the archive version doesn't.

 

Screenshot 2020-10-07 at 12.37.41 PM.png

Edited by specpro30
Link to comment
Share on other sites

  • 0

After trying to resolve a few compilation errors involving missing libraries and such I reached this error:

undefined reference to `vtable for DXSPISDVOL'

The error is located in the DXSPISDVOL.h file

In fact the whole "class DXSPISDVOL : public DFSVOL" block of code is showing a syntax error. (In fact the same bit of code in the BSP of the archive file is also showing the same syntax error, yet it still runs).

Please advise on how best to resolve this.

Many thanks!

 

Edited by specpro30
Link to comment
Share on other sites

  • 0

Hi @specpro30,

I think the Pmod SD has not been updated to work with the Vivado and Vitis 2020.1, or at least I have not been able to get the project to successfully build on Vitis even with the updated library available on our GitHub here: https://github.com/Digilent/vivado-library/tree/v2020.1. Our content creator is looking into what needs to be changed in the Makefile.

The archived project was probably made for a different board and had the interrupt controller on Microblaze enabled; I personally never use the archived projects for any of our Pmods.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi @specpro30,

I attached a pdf of block design (the exported design itself is too large to attach in the Forum) that I used to create the SDK project I linked earlier. I followed the 2020.1 guide to create this block design in 2019.1, though you can also follow the 2018.2 guide; either way, ignore the bit at the beginning of every guide that says to download a particular version of Digilent's vivado-library; as long as the library version you have matches or is newer than the Vivado version you have (and the IP on the newer vivado-library successfully builds on that newer version), that'll be all you need.

Let me know if you have any questions.

Thanks,
JColvin

A7100-PmodSD-BD.pdf

Edited by JColvin
clarified statement on using newer Vivado libraries
Link to comment
Share on other sites

  • 0

Hey there,

I followed the same board design in your PDF file but still got the following error when trying to RUN the main.c file in the SDK:

-------------------------------

04:41:26 **** Incremental Build of configuration Debug for project sd_omg ****
make all
Building file: ../src/main.cc
Invoking: MicroBlaze g++ compiler
mb-g++ -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/main.o" -I../../sd_omg_bsp/microblaze_0/include -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.cc"
In file included from ../../sd_omg_bsp/microblaze_0/include/DXSPISDVOL.h:50,
                 from ../../sd_omg_bsp/microblaze_0/include/PmodSD.h:1,
                 from ../src/main.cc:53:
../../sd_omg_bsp/microblaze_0/include/DFATFS.h:79:10: fatal error: utility/fs_ff.h: No such file or directory
 #include "utility/fs_ff.h"
          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [src/subdir.mk:23: src/main.o] Error 1

04:41:27 Build Finished (took 379ms)

------------------------------

I am using the vivado-library-2020 with Vivado 2019.1 and SDK 2019.1 (with the Arty A7 T00).  Please advise what I should do to get this to work.  Thanks

Cheers!

1415199742_Screenshot2020-10-15at6_53_12PM.thumb.png.24620f9109071ea8914cb1c5a5ff5b93.png

Screenshot 2020-10-15 at 7.47.59 PM.png

Edited by specpro30
Link to comment
Share on other sites

  • 0

Hi @specpro30,

Turns out I was wrong on my comment about being able to use newer versions of the Vivado library and still have them work on older versions Vivado/SDK; that particular statement is only true for modules/IPs that are compiling correctly, or at least when I ran the SD project in 2019.1 with the v2020.1 library, I encountered similar errors in SDK 2019.1 that I was not able to readily resolve. I apologize for the confusion; I'll edit my old post to avoid confusing future readers.

After changing the IP repository back to the local master (and regenerating the bitstream just in case) I was then able to build the SDK project without any issues.

Please let me know if you have any questions about this.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi JColvin,

I also used the 2019 pmod library but I get exactly the same errors from the SDK.  Seems like I’ve tried pretty much everything but I still can’t get the PmodSD to compile and run on the hardware.  Would greatly appreciate your advice on how to go forward.

Cheers!

Link to comment
Share on other sites

  • 0

I used 2019.1 for both Vivado and SDK (not Vitis). The vivado-library I used as my IP repository I downloaded from this page, https://github.com/Digilent/vivado-library.

I believe you could also use the 2019.1 release version that is available on the right-hand side of the page, though I haven't specifically tested it since I have a local copy of the repository that I keep up to date with the master instead.

Let me know if you have any questions or run into issues.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

I'm a little confused about the software you used.  In your second to last post you mentioned that you used Vitis to create the Vivado project archive.  But in your last post you used the SDK and not Vitis to create the Vivado project archive.  Would appreciate if you could clarify the appropriate tool chain.  Thanks!

Link to comment
Share on other sites

  • 0

Hi JColvin,

I used Vivado 2019.1 and Xilinx SDK 2019.1 and followed the 2020.1 guide and got the exact same errors in the SDK as mentioned above.  Here is my block design from Vivado 2019.1.  Could you please have a look to see if it is correct because the SDK is saying that the "MicroBlaze processor doesn't exist or is incorrectly specified".  But I can't see anywhere that I've gone wrong with it.  

I noticed on your working archive file that you don't use the Active Low reset and have not used another 32 MHz clocking source for the PmodSD (as suggested by the 2020.1 guide).  Perhaps I've done something wrong with the block design?  Also, in the SDK, when you create a new application project, I assume you just deleted the blank main.c file and copy and paste the main.c from the Pmod example folder into the src directory?  Is there anything I should be aware of during this step that may cause the errors?

Once again, I'd appreciate if you could take a close look at the block design attached to see if there's any misconfigured parts.

Thanks for your help!

 

Screenshot 2020-10-28 at 12.55.08 PM.png

Link to comment
Share on other sites

  • 0

Hi @specpro30,

The lack of an active low reset on my design compared to your design is okay because there is a not gate included in my design, so your design is good to go in that regard. I had forgotten that implementation for the SD IP library uses SPI mode so the SPI clock needs to be a lot slower than what I provided in my design, so I'll need to rerun that on mine.

I'm not sure why you have two Processor System Resets in your block design; I'm not what benefit this offers or how it got into your design. You also look like you included an AXI interrupt controller which is not needed.

If you used my design directly, I think you'll probably need to refresh the BSP sources and build the project (ctrl+b) in SDK so Vivado/SDK isn't trying to use any filepaths that only exist on my computer.

I'm seeing if I can get a simple video screen capture of my block design creation that doesn't require me having any video editing skills, software, or need me to point my phone camera at the screen for a terrible video.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi JColvin,

Yes a video of the block design creation would be great!  Looking forward to watching it and learning more about how to design correctly.  

The second Processor System Reset got put in there when I added the 31 MHz clock for the PmodSD.  Should I delete one of them and route the connections from the deleted one to the remaining one?

Regarding the AXI Interrupt controller, can I just delete it or do I need to delete and connect the wires connecting to it to somewhere else?

I'm able to run and compile your Vivado design and compile it in the SDK.  But I'd like to understand the whole process myself so I can incorporate the PmodSD IP into other designs successfully.

Many thanks for your support!

Cheers!

Link to comment
Share on other sites

  • 0

Hi @specpro30,

It look me longer than I originally planned, but I made a couple of silent, screen capture only videos of creating a Microblaze block design and SDK project with the Pmod SD.

Block Design Creation: https://www.youtube.com/watch?v=KQguA52kOO8

SDK Project Creation: https://www.youtube.com/watch?v=OYqnCVD4Zgs

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
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
×
×
  • Create New...