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 .
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):
- 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.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:
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
- Open Visual Studio Code.
- Open the folder containing the Console Application in visual studio code, found at <archive extracted location>/DPTI_App/DPTITransferWaveform.
- 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