element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Forum ZMOD Demo and DPTI Application - under Linux
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 0 replies
  • Subscribers 535 subscribers
  • Views 854 views
  • Users 0 members are here
  • usb104_a7
  • zmoddac
  • digilent
  • dpti
Related

ZMOD Demo and DPTI Application - under Linux

14rhb
14rhb over 4 years ago

Hardware: Digilent USB104-A7 + ZMODDAC(AWG)

PC: Ubuntu 20.04LTS

Vivado: 2019.1

 

For the last few months, when time allows, I have been trying to get my Digilent USB104-A7 and the ADC/DAC ZMOD boards (kindly sent to me via Digilent) working. I think my reason for struggling is that I am using a Linux based PC but maybe if I explain some of the issues some kind and clever E14 member may be able to point me onto a new solution image.

 

Initially I had huge issues just trying to import the IP that was referenced against the ZMODDAC board (FYI this is now called the ZMOD AWG as an arbitrary waveform generator): Vivado Versions and Digilent IP - what did finally start to work was to take the constraints XDC file and another repo from the ZMODDAC example; whilst it allowed me to now add both the ZMODDAC controller and the ZMOD AXI IP block my design didn't quite work. However whilst running Vivado 2019.1 I instead imported the who example from Digilent and built the bitstream.

image

image

It was the AXI_ZMOD IP shown above that I could not managed to import the repo for. In the same Digilent download was the SDK programs which I also downloaded to the USB104-A7. At this point I believe the USB104-A7 is loaded up and ready to go, just needing a few commands across the DPTI interface from my PC, and that is where I'm getting really stuck due to Linux OS. Building the DPTI program using Visual Studio code didn't work for me and I have struggled before with the complexity of VSCode - just far too much of the environment can be adjusted for my brain to cope with ! Instead I tried to compile the source using GCC but ran into errors around the dpti and dmgr headers: these seem to be pre-compiled to a .lib file but I cannot make use of them.

I tried:

gcc USB104A7_ZmodDACDemoApp.c -L./ -ldpti -ldmgr

But get errors including:

/usr/bin/ld: cannot find -ldpti

/usr/bin/ld: cannot find -ldmgr

collect2: error: ld returned 1 exit status

The folder looks quite basic with:

image

The snippet of hope I am looking at now is from the Digilent documentation. Note my GCC compiler line is similar to that below. The last point below (that I highlighted) implies the Adept 2 contains these two libraries - I have Adept2 installed so maybe I just need to point the compiler to another folder?

 

Building the Console Application using VS Code
  1. Open Visual Studio Code.
  2. Open the folder containing the Console Application in visual studio code, found at <archive extracted location>/DPTI_App/DPTITransferWaveform.
  3. To build, click Terminal -> Run Build Task. This will run the build task found in tasks.json. This will run "gcc USB104A7_ZmodDACDemoApp.c -g3 -O0 -o <dir>\USB104A7_ZmodDACDemoApp.exe -L./ -ldpti -ldmgr" NOTE: The linux dpti and dmgr shared objects can be downloaded from the Adept 2 wiki page under Runtime - Latest Downloads.

 

I also could not get the Digilent Waveform software to run apart from in a demo mode, however I'd easily write my own code for generating the CSV files, but the DPTI app above would be handy to have working.

 

My full error screen if I run the command line above is:

gcc USB104A7_ZmodDACDemoApp.c -g3 -O0 -o USB104A7_ZmodDACDemoApp.exe -L./ -ldpti -ldmgr
USB104A7_ZmodDACDemoApp.c: In function ‘parseArgs’:
USB104A7_ZmodDACDemoApp.c:225:13: warning: implicit declaration of function ‘strlwr’; did you mean ‘strlen’? [-Wimplicit-function-declaration]
  225 |   if(strcmp(strlwr(arg), "write")==0){
      |             ^~~~~~
      |             strlen
USB104A7_ZmodDACDemoApp.c:225:13: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  225 |   if(strcmp(strlwr(arg), "write")==0){
      |             ^~~~~~~~~~~
      |             |
      |             int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:236:18: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  236 |   else if(strcmp(strlwr(arg), "start")==0){
      |                  ^~~~~~~~~~~
      |                  |
      |                  int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:239:18: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  239 |   else if(strcmp(strlwr(arg), "stop") == 0){
      |                  ^~~~~~~~~~~
      |                  |
      |                  int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:242:18: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  242 |   else if(strcmp(strlwr(arg), "div") == 0){
      |                  ^~~~~~~~~~~
      |                  |
      |                  int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:260:18: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  260 |   else if(strcmp(strlwr(arg), "gain") == 0){
      |                  ^~~~~~~~~~~
      |                  |
      |                  int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:266:14: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  266 |    if(strcmp(strlwr(arg), "low")==0 || arg[0]=='0'){
      |              ^~~~~~~~~~~
      |              |
      |              int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:270:19: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  270 |    else if(strcmp(strlwr(arg), "high")==0 || arg[0]=='1'){
      |                   ^~~~~~~~~~~
      |                   |
      |                   int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:280:18: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  280 |   else if(strcmp(strlwr(arg), "ch1") == 0){
      |                  ^~~~~~~~~~~
      |                  |
      |                  int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:283:18: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  283 |   else if(strcmp(strlwr(arg), "ch2") == 0){
      |                  ^~~~~~~~~~~
      |                  |
      |                  int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
USB104A7_ZmodDACDemoApp.c:286:18: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
  286 |   else if(strcmp(strlwr(arg), "help") == 0 || arg[0]=='?'){
      |                  ^~~~~~~~~~~
      |                  |
      |                  int
In file included from USB104A7_ZmodDACDemoApp.c:2:
/usr/include/string.h:137:32: note: expected ‘const char *’ but argument is of type ‘int’
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
/usr/bin/ld: cannot find -ldpti
/usr/bin/ld: cannot find -ldmgr
collect2: error: ld returned 1 exit status

 

 

Any pointers or suggestions on getting this working on Linux would be really appreciated image

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube