I've created a patch for Impact so it supoorts Digilent USB. This patch could be modified to become some kind of SDK for different programmer cable which are not supported by Impact.
So here is my survey. What kind of programmer cables would you like to use with Impact?
For me, the biggest problem (with impact on linux) is the use of the windriver. It needs a recompile for every kernel update, it doesn't play nice with with other users of the parallel port (the normal lp module), it creates a security hole as big as a barn door, it taints the kernel and is usefull as a P.I.T.A. as ppdev/libusb could deliver the needed functionality for free.
Otherwise, the MPSSE mode of the FT2232 would be welcome.
B.t.w, I'll try to get MPSSE running for xilprog a.s.a.p.
How'd you patch it? It should be possible to port your change over to Linux (perhaps using a different technique but the mechanics of your patch should still apply)
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
I inject a dll into the impact.exe, and hook DeviceIoControl and some other kernel32 APIs. impact.exe calls DeviceIoControl to read/write LPT I/O port using windriver6 driver. Instead of calling original windrvr DeviceIoControl function I just forward the TMS/TDI/TDO/TCK bits to Digilent USB (or any other programmer cable).
On linux the easiest could be to create a brand new windrvr emulator driver where we implement all the IOCTLs used by impact. BTW, I have no clue why they are using the windriver as a device driver, because all the features they do with the Jungo driver ius really simple and generic(eg: user mode I/O access, USB acces to device, etc.)
Actually the question I have is what kinds of programmer cables can I use with linux. Impact -- I'd just as soon not use it. I prefer open source command line utilities. In fact I want everything to be a command line utility -- get rid of the IDE's. I use my own editor and "make" and I'm happy.
-Dave
--
David Ashley http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
if you do want todo some work on the topic, it makes WAY more sense to "discover" the Impact CableServer protocol, in that way you dont need to patch anything, you can support both win and linux and you can be either adding 3rdr party programmer support to impact by using 3rd party "cableserver" or you can add support for impact supported cables to 3rd party hardware.
the protocol is easy to figure out, start cableserver with debug logging, then etherreal and run impact and make some notices, then start your own cableserver and monitor difference in the comms.
I have done preliminary work for this, but unfortunatly I have not enought time right now for this task.If you are interested I can give all the info and programs I have (partial cableserver emu). If you need some Xilinx board I could have some overleft to 'sponsor' the project.
Antti XSIM => MicroBlaze+uClinux Simulator (open plugin SDK)
The support of Amontec JTAGkey would be very nice (based on FTDI FT2232
- FT2232L to be green). The Amontec JTAGkey is one of the only USB JTAG POD with very large io voltage range (all IOs can drive at 24mA) !
goto
formatting link
Note: We are working on a new version cheaper but without ESD-EMI overvoltage ... protection and for 5V to 2.8V only. Coming in the next two weeks. We are working on our own .dll for controlling the JTAGkey integrating JTAG layer.
Let me know if you want to receive one Amontec JTAGkey as sample (we will ship to you without any charge for you), this can be help for your integration.
If interested, send me an email to laurent DOT gauch @ amontec DOT com
The cableserver methos sounds much better. In that case the full Digilent USB could be utilized. Next week I'll look into it.
Uwe,
Yes and no. I use the windrvr.h to check which IOCTL is important to overwrite. The actual LPT I/O communication is very simple. You can see the location of port and data in the packets.
BTW I use strace to log low level API activity by impact.
I still use 6.3,and it doesn't exist there :( Afetr installing 8.2 I could make CableServer work (with a lot of impact and CableServer crashes :)
Here is what I think. I can easily hook the WSOCK32 functions in CableServer and see what parameters they have in accept, connect, recv, send, ioctlsocket, etc. In that case it would be much easier to reverse engineer the communication and reproduce the whole communication in a new CableServer.
Your idea will work on both Linux and Win32 for sure, so next week I start working on a new CableServer.
First I think I will implement the Paralell III support, that will be a good start to test and debug, and later implement other LPT based cables, and then implement Digilent USB, which I think should be easy.
it makes sense to make a "DummY" cableserver first, then add cable drivers as loadable plugins to it. or use the cable server as another brigge, like forwarding impact requests to altera jtagserver :)
or the cableserver could recognize both altera and impact protocols
Antti attached is VERY RAW something that was at least responding to some impact tcp packets. maybe its for older version and its all changed, anyway all the protocol is clearly visible and lots of info comes from cableserver commandline log, this is good source to look at , there are as example commands to set and clear single bits in parallel port, ..
---------- procedure TForm1.serverAccept(Sender: TObject; ClientSocket: TCustomIpClient); var a : array[0..100] of byte; slen,i,j,l : integer; pNumber, Speed: integer; pName, cName, s : string;
begin l := ClientSocket.ReceiveBuf(a, 100); // memo1.Lines.Add('ACCEPT '+inttostr(l));
case a[0] of $00: begin memo1.Lines.Add('X 00'); ClientSocket.Sendln(#$01, ''); end;
$01: begin memo1.Lines.Add('LOCK');
ClientSocket.Sendln(#$01, ''); repeat l := ClientSocket.ReceiveBuf(a, 100); if l>0 then begin ClientSocket.Sendln(#$01, ''); memo1.Lines.Add('cmd'+inttostr(l)); end; until (a[0] = 1) or (l
Sure, and soldiers desert from wars and go over to the enemy side all the time. But they'll have to live with themselves for the rest of their lives...:^).
-Dave
--
David Ashley http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
I've already hooked all the tcp/ip API in Cableserver, and dump all the recv, send buffers to the screen, so now if I run Cable server in debug mode, I can see the communication for all the messages between Impact and CableServer. The protocoll seems very simple especially in debug mode I can see what is the message, and what are the parameters.
Unfortunately this weekend i'm going for a short vacation :) But I'll jump on this when I get back.
Zoltan
PS: Here are couple of dumps for sampling:
Main -> GET INFO pName=LPT, pNumber=0, speed = 200000, cName=Parallel III. send
You're also a top poster sometimes :^). But anyway it's not directed at you, if I were to sell out and move to windows I'd be betraying the cause. You and most of the world are perfectly free to be in the windows camp. More power to you.
I use windows when I have to but I'm just so much more effective when I can use linux.
-Dave
--
David Ashley http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.