Jam STAPL Player extensions

Hi All,

I have sent to alt.sources very "quick & dirty" extensions to Altera's Jam STAPL Player, allowing it to work with multiple JTAG chains interfaced with SCANSTA111 bridge, and making programming faster, when using a fast, but high latency interface (like some kinds of VME or USB). The main idea is to cache JTAG writes, and use block transfer to speed up programming (however the interface itself or th receiving side must take care of the appropriate timing). The code is placed as public domain. No warranty at all. If anybody finds it useful, or at least inspiring, I'll be glad.

--
Regards, Wojtek

PS. This is the google link to my post:
http://groups.google.pl/group/alt.sources/browse_frm/thread/14749b0c309c468b/16c9cb91e4ec23bb
Reply to
Wojciech Zabolotny
Loading thread data ...

Very interesting - I may have to take a look at that as I've crudely done something very similar, intended only for rare usage but am now using it enough that it would be worth getting right.

Major question though: how are you building it? What compiler, and have you come up with a sane Makefile? GCC (win32) produced irreconcilable errors. Haven't been able to make it into a sensible visual C project, though visual C will process the makefile - so I can compile it, but as a sort of ugly end-run around the IDE's concept of a project.

Reply to
cs_posting

I use Linux, so I don't know about any Windows-specific questions...

The file being the final part of the message is the "shar" archive, so you need to use something like "$unshare < saved_message.txt" to recover the files my_jtag.h and my_jtag.c . To compile the files themselves you may use just: $gcc -c my_jtag.c However to make full use of this sources you also need to download Jam STAPL Player sources, modify the names of the replaced functions, implement your low level I/O routines, modify the makefile to include the my_jtag.o and so on...

So this is rather a draft of the solution, not the complete solution.

The full solution has been tested with VME and CAEN controller, but I'm afraid I can not publish it.

I'm going to write the USB based JTAG programmer with simple microcontroller and the modified Jam Player on the PC side, but I have no time to finish the design :- ( (it will be GPL'ed).

-- Regards, Wojtek

Reply to
wzab

So you were able to get some unix make utility and GCC to process the included makefile for the jam player?

I couldn't get the combination of GNU make (cygwin win32) and GCC (cygwin win32) to do so (a bunch of wierd errors about circular definitions) which is what prompted my question.

Reply to
cs_posting

Not exactly First, if you get the original jp_25.exe

formatting link
player.jsp) , you need to unpack it with "unzip -LL jp_25.exe" - to get lowercase filenames. Then I convert all the DOS end-of-lines into U**X ones: $for i in *; do dos2unix $i ; done

Then you have to convert the makefile.mak: All ".obj" you should replace with ".o" You should also change two compilation rules: ============================================== .c.obj : cl /W4 /c /O2 /ML /DWINNT $<

# LINK: add appropriate linker command here

jam.exe : $(OBJS) link $(OBJS) advapi32.lib /out:jam.exe ============================================== Should be replaced with: ============================================== .c.o : gcc -c $*.c -O2

# LINK: add appropriate linker command here

jam.exe : $(OBJS) gcc -o jam.exe $(OBJS)

==============================================

Finally you should set port to UNIX in jamport.h:

/* change this line to build a different port */ #define PORT UNIX

And make some corrections in jamstub.c: You should comment out: #include #include #include

Now it should compile (but YOU SHOULD ADJUST THE I/O ROUTINES!)

The above description was tested on GCC+Linux. I don't know if it will work for GCC+Cygwin :-(.

-- HTH & Regards, Wojtek

Reply to
wzab

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.