Forum Discussion
Altera_Forum
Honored Contributor
15 years ago/*
TODO
multiple device support
use bulk usb transfer, programming speed can be a lot faster
mac os support
INSTRUCTIONS
------------
save this file as libjtag_hw_your_name_here.c
(yes, you can use any name after libjtag_hw_)
you must then plug in your hardware to detect the USB ID and compile it into the .so file
then compile it with this command:
(this is a very long line, and it must all be typed on the same line)
gcc -fPIC -fvisibility=hidden -DDSO_METHOD_NAME=`wget -qO - http://ubuntuforums.org/archive/index.php/t-142166.html | sed -e '/ial pro/p;d' | cut -d " " --output-delimiter=_ -sf 37-39 | sed -e 's/.$//'` `awk '/clone/{print gensub("=","=0x","g",gensub(".*(V*) *(P*).*","-D\\\\1 -D\\\\2","",Q))}{Q=P;P=$0}' /proc/bus/usb/devices` -shared -Wl,-soname,libjtag_hw_your_name_here.so -o libjtag_hw_your_name_here.so -ldl libjtag_hw_your_name_here.c
then check that compilation went ok by typing this command:
nm -CD *.so|md5sum|awk '{if ($1 == "9c9ae1be799a6ebda49a84a7a3b09104") print "ok"; else print "problem"}'
then copy the .so file to the directory that has other files named libjtag_hw_*,
note that there are two directories, you can copy the .so file into both for normal situations
*/Edit: pasted it wrong