OpenCores
no use no use 1/1 no use no use
New debug system available
by nyawn on May 20, 2009
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: Oct 27, 2026
I'd like to announce the availability of a new debug system for the OR1200. It's designed to replace the "dbg_interface" core, the "jtag" core, and the "jp1/jp2" jtag proxy utility.

The Advanced Debug System supports several new features, including:

- The Altera USB-Blaster JTAG cable
- The Xilinx Platform Cable USB (DLC9)
- Support for multi-device JTAG chains, as found on many Xilinx development boards
- Support for internal JTAG blocks on both Altera and Xilinx FPGAs. (connect to the debug system through the same pins used to download the FPGA bitstream)
- BSDL parsing
- Documentation, both for individual components and for the system as a whole
- RSP support, compatible with GDB 6.8

The system has been tested in both Altera and Xilinx FPGA hardware. Further test reports are greatly appreciated!

Nathan Yawn
RE: New debug system available
by jt_eaton on May 24, 2009
jt_eaton
Posts: 142
Joined: Aug 18, 2008
Last seen: Sep 29, 2018
[

The system has been tested in both Altera and Xilinx FPGA hardware. Further test reports are greatly appreciated!

Nathan Yawn

-----------------------

Nathan,

I tried to compile this under ubuntu jaunty. I changed the makefile to native linux, ran make all and got:
----------------------------------
johne@hallway:~/OpenCores/adv_debug_sys/Software/adv_jtag_bridge$ make all
gcc -g -O2 -Wall -c adv_jtag_bridge.c
In file included from adv_jtag_bridge.c:37:
chain_commands.h:27: error: expected ‘)’ before ‘cmd’
chain_commands.h:32: error: expected declaration specifiers or ‘...’ before ‘uint16_t’
chain_commands.h:33: error: expected declaration specifiers or ‘...’ before ‘uint8_t’
chain_commands.h:35: error: expected declaration specifiers or ‘...’ before ‘uint16_t’
chain_commands.h:36: error: expected declaration specifiers or ‘...’ before ‘uint8_t’
chain_commands.h:38: error: expected declaration specifiers or ‘...’ before ‘uint16_t’
chain_commands.h:39: error: expected declaration specifiers or ‘...’ before ‘uint8_t’
In file included from adv_jtag_bridge.c:38:
cable_common.h:30: error: expected ‘)’ before ‘packet’
cable_common.h:31: error: expected ‘)’ before ‘packet_out’
cable_common.h:32: error: expected ‘)’ before ‘*’ token
cable_common.h:33: error: expected ‘)’ before ‘*’ token
cable_common.h:36: error: expected ‘)’ before ‘packet’
cable_common.h:37: error: expected ‘)’ before ‘packet_out’
cable_common.h:38: error: expected ‘)’ before ‘*’ token
cable_common.h:39: error: expected ‘)’ before ‘*’ token
In file included from adv_jtag_bridge.c:40:
bsdl.h:10: error: expected specifier-qualifier-list before ‘uint32_t’
bsdl.h:29: error: expected ‘)’ before ‘idcode’
bsdl.h:30: error: expected ‘)’ before ‘idcode’
bsdl.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bsdl_get_debug_cmd’
bsdl.h:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bsdl_get_user1_cmd’
bsdl.h:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bsdl_get_idcode_cmd’
adv_jtag_bridge.c:91: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
adv_jtag_bridge.c:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_debug_cmd’
adv_jtag_bridge.c: In function ‘configure_chain’:
adv_jtag_bridge.c:127: error: ‘uint32_t’ undeclared (first use in this function)
adv_jtag_bridge.c:127: error: (Each undeclared identifier is reported only once
adv_jtag_bridge.c:127: error: for each function it appears in.)
adv_jtag_bridge.c:127: error: expected ‘;’ before ‘cmd’
adv_jtag_bridge.c:133: error: ‘idcodes’ undeclared (first use in this function)
adv_jtag_bridge.c:146: warning: implicit declaration of function ‘bsdl_get_name’
adv_jtag_bridge.c:146: warning: assignment makes pointer from integer without a cast
adv_jtag_bridge.c:147: warning: implicit declaration of function ‘bsdl_get_IR_size’
adv_jtag_bridge.c:195: error: ‘cmd’ undeclared (first use in this function)
adv_jtag_bridge.c:195: warning: implicit declaration of function ‘get_debug_cmd’
adv_jtag_bridge.c:224: warning: implicit declaration of function ‘bsdl_get_idcode_cmd’
adv_jtag_bridge.c:226: error: expected ‘;’ before ‘id_read’
adv_jtag_bridge.c:227: warning: implicit declaration of function ‘jtag_get_idcode’
adv_jtag_bridge.c:227: error: ‘id_read’ undeclared (first use in this function)
adv_jtag_bridge.c: In function ‘get_IR_size’:
adv_jtag_bridge.c:441: error: ‘idcodes’ undeclared (first use in this function)
adv_jtag_bridge.c: At top level:
adv_jtag_bridge.c:464: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_debug_cmd’
make: *** [adv_jtag_bridge.o] Error 1
johne@hallway:~/OpenCores/adv_debug_sys/Software/adv_jtag_bridge$
--------------------------------------

John Eaton

RE: New debug system available
by nyawn on May 26, 2009
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: Oct 27, 2026
Try including at the top of chain_commands.h (and maybe some of the other headers, if they give similar errors). It looks like the definition for uint32_t isn't included in on your system, as it is on mine. Probably, things like this are the reason people use autoconf. But, many years ago when I last looked at it, it was a mess - each version was subtly incompatible with previous versions, and the only people who actually knew how to use it were the authors...everyone else just sort cut & pasted from someone else, who had done the same from someone else, and so on. So I never bothered...but if someone knows how to use it and wants to submit a patch, I'm willing to integrate it.
RE: New debug system available
by jeremybennett on May 26, 2009
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Try including <stdint.h> at the top of chain_commands.h (and maybe some of the other headers, if they give similar errors). It looks like the definition for uint32_t isn't included in <sys/types.h> on your system, as it is on mine.

Probably, things like this are the reason people use autoconf. But, many years ago when I last looked at it, it was a mess - each version was subtly incompatible with previous versions, and the only people who actually knew how to use it were the authors...everyone else just sort cut & pasted from someone else, who had done the same from someone else, and so on. So I never bothered...but if someone knows how to use it and wants to submit a patch, I'm willing to integrate it.

Hi Nathan,

Your reply got mangled - the forum software saw the < in a header and assumed your message was pure HTML!

Older versions of GCC (pre 4.3) got quite slack about headers. Since 4.3, it's been much stricter about following the standards. sys/types.h should not include stdint.h. The latest versions of Ubuntu are particularly strict. They use GCC 4.3.2 and then add some additional library standards conformance checking. Since so many people use Ubuntu, I've taken to validating my software with GCC 4.3.2 before releasing (I don't have Ubuntu, so I still sometimes hit library issues).

Using autoconf, automake and libtool has a big learning curve, but once you have it under control, it does make a system much more maintainable. I've always found it useful to start from someone elses's configure.ac file and modify it for my purposes. If you stick to the mainstream features, it seems pretty robust to new versions.

As an example take a look at configure.ac and Makefile.am in the Or1ksim distribution. It's far from perfect, but it gives you the general idea. I also found the tutorial at sources.redhat.com/autobook/autobook/autobook.html very helpful. It puts things in context, in a way that the individual reference manuals don't.

HTH,

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

RE: New debug system available
by jt_eaton on May 26, 2009
jt_eaton
Posts: 142
Joined: Aug 18, 2008
Last seen: Sep 29, 2018
adding #include did help a bit. I now get: johne@hallway:~/OpenCores/adv_debug_sys/Software/adv_jtag_bridge$ make all gcc -g -O2 -Wall -c adv_jtag_bridge.c adv_jtag_bridge.c: In function ‘configure_chain’: adv_jtag_bridge.c:133: warning: passing argument 1 of ‘jtag_enumerate_chain’ from incompatible pointer type adv_jtag_bridge.c:154: warning: format ‘%08lX’ expects type ‘long unsigned int’, but argument 4 has type ‘uint32_t’ adv_jtag_bridge.c:162: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ adv_jtag_bridge.c:237: warning: format ‘%08lX’ expects type ‘long unsigned int’, but argument 2 has type ‘uint32_t’ adv_jtag_bridge.c:237: warning: format ‘%08lX’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ adv_jtag_bridge.c: In function ‘get_debug_cmd’: adv_jtag_bridge.c:488: warning: format ‘%0lX’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ gcc -g -O2 -Wall -c rsp-server.c rsp-server.c: In function ‘handle_rsp’: rsp-server.c:518: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result rsp-server.c: In function ‘rsp_write_mem_bin’: rsp-server.c:2645: warning: pointer targets in passing argument 2 of ‘dbg_wb_write_block8’ differ in signedness gcc -g -O2 -Wall -c chain_commands.c chain_commands.c:370: error: conflicting types for ‘jtag_enumerate_chain’ chain_commands.h:8: error: previous declaration of ‘jtag_enumerate_chain’ was here chain_commands.c: In function ‘jtag_enumerate_chain’: chain_commands.c:451: warning: assignment from incompatible pointer type chain_commands.c: In function ‘dbg_wb_burst_read’: chain_commands.c:939: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ chain_commands.c: In function ‘dbg_wb_burst_write’: chain_commands.c:1114: warning: passing argument 1 of ‘jtag_write_stream’ from incompatible pointer type chain_commands.c:1128: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘uint32_t’ make: *** [chain_commands.o] Error 1 johne@hallway:~/OpenCores/adv_debug_sys/Software/adv_jtag_bridge$
RE: New debug system available
by nyawn on May 28, 2009
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: Oct 27, 2026
Hm, I guess the newer, stricter GCC doesn't think uint32_t and 'unsigned long' are compatible, hence the error and all the warnings (the warnings just look they're in debug/error messages, though).

Change the prototype for jtag_enumerate_chain (chain_commands.h, line 8) so that id_array is a uint32_t **. So, it should read:

int jtag_enumerate_chain(uint32_t **id_array, int *num_devices);

Clearly, I'm going to have to set up a newer version of GCC to iron these sorts of bugs out. I appreciate the bug reports, though!
RE: New debug system available
by jeremybennett on May 28, 2009
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019
Hm, I guess the newer, stricter GCC doesn't think uint32_t and 'unsigned long' are compatible, hence the error and all the warnings (the warnings just look they're in debug/error messages, though).

Change the prototype for jtag_enumerate_chain (chain_commands.h, line 8) so that id_array is a uint32_t **. So, it should read:

int jtag_enumerate_chain(uint32_t **id_array, int *num_devices);

Clearly, I'm going to have to set up a newer version of GCC to iron these sorts of bugs out. I appreciate the bug reports, though!

Hi Nathan

Although uint32_t and long unsigned int are usually the same size, they are not always the same. C/C++ makes very few guarantees about the size of any of its intrinsic types. In any case A good compiler should warn you of a potential problem with your code - they are different types, even if they take up the same space in memory.

In recent years, I have moved to using the fixed width types throughout any code tackling the low level. It saves any ambiguity.

There's considerable merit in compiling code for distribution with all GCC's warnings turned on as werrors (-Wall -Werror). It imposes a programming style which survives on most architectures.

GDB, which is used on a vast number of different machines, has a script (the Awk Regression Index, or ARI), which looks for known troublesome constructs in code. Take a look at the last section of that page (Fixed problems). Some are GDB specific, but lots of them are generic to C/C++ programming.

ATB

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

RE: New debug system available
by jt_eaton on May 29, 2009
jt_eaton
Posts: 142
Joined: Aug 18, 2008
Last seen: Sep 29, 2018
hange the prototype for jtag_enumerate_chain (chain_commands.h, line 8) so that id_array is a uint32_t **. So, it should read:

int jtag_enumerate_chain(uint32_t **id_array, int *num_devices);

Clearly, I'm going to have to set up a newer version of GCC to iron these sorts of bugs out. I appreciate the bug reports, though!

Ok, heres what that fix does:
-------------------------------------------------------------------

johne@hallway:~/OpenCores/adv_debug_sys/Software/adv_jtag_bridge$ make all
gcc -g -O2 -Wall -c chain_commands.c
chain_commands.c: In function ‘jtag_enumerate_chain’:
chain_commands.c:451: warning: assignment from incompatible pointer type
chain_commands.c: In function ‘dbg_wb_burst_read’:
chain_commands.c:939: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’
chain_commands.c: In function ‘dbg_wb_burst_write’:
chain_commands.c:1114: warning: passing argument 1 of ‘jtag_write_stream’ from incompatible pointer type
chain_commands.c:1128: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘uint32_t’
gcc -g -O2 -Wall -c cable_common.c
In file included from cable_common.c:26:
cable_common.h:30: error: expected ‘)’ before ‘packet’
cable_common.h:31: error: expected ‘)’ before ‘packet_out’
cable_common.h:32: error: expected ‘)’ before ‘*’ token
cable_common.h:33: error: expected ‘)’ before ‘*’ token
cable_common.h:36: error: expected ‘)’ before ‘packet’
cable_common.h:37: error: expected ‘)’ before ‘packet_out’
cable_common.h:38: error: expected ‘)’ before ‘*’ token
cable_common.h:39: error: expected ‘)’ before ‘*’ token
In file included from cable_common.c:27:
cable_parallel.h:10: error: expected ‘)’ before ‘value’
cable_parallel.h:11: error: expected ‘)’ before ‘value’
cable_parallel.h:13: error: expected ‘)’ before ‘value’
cable_parallel.h:14: error: expected ‘)’ before ‘value’
In file included from cable_common.c:28:
cable_sim.h:7: error: expected ‘)’ before ‘value’
cable_sim.h:8: error: expected ‘)’ before ‘value’
cable_sim.h:13: error: expected ‘)’ before ‘value’
cable_sim.h:14: error: expected ‘)’ before ‘value’
In file included from cable_common.c:29:
cable_usbblaster.h:7: error: expected ‘)’ before ‘value’
cable_usbblaster.h:8: error: expected ‘)’ before ‘value’
cable_usbblaster.h:9: error: expected ‘)’ before ‘*’ token
cable_usbblaster.h:10: error: expected ‘)’ before ‘*’ token
In file included from cable_common.c:30:
cable_xpc_dlc9.h:6: error: expected ‘)’ before ‘value’
cable_xpc_dlc9.h:7: error: expected ‘)’ before ‘value’
cable_xpc_dlc9.h:9: error: expected ‘)’ before ‘packet_out’
cable_common.c:37: error: expected ‘)’ before ‘*’ token
cable_common.c:38: error: expected ‘;’ before ‘int’
cable_common.c:50: error: ‘cable_rtl_sim_inout’ undeclared here (not in a function)
cable_common.c:50: warning: excess elements in struct initializer
cable_common.c:50: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:51: error: ‘cable_rtl_sim_out’ undeclared here (not in a function)
cable_common.c:51: warning: excess elements in struct initializer
cable_common.c:51: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:52: warning: excess elements in struct initializer
cable_common.c:52: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:53: warning: excess elements in struct initializer
cable_common.c:53: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:54: warning: excess elements in struct initializer
cable_common.c:54: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:55: error: ‘cable_common_write_bit’ undeclared here (not in a function)
cable_common.c:55: warning: excess elements in struct initializer
cable_common.c:55: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:56: error: ‘cable_common_read_write_bit’ undeclared here (not in a function)
cable_common.c:56: warning: excess elements in struct initializer
cable_common.c:56: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:57: error: ‘cable_common_write_stream’ undeclared here (not in a function)
cable_common.c:57: warning: excess elements in struct initializer
cable_common.c:57: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:58: error: ‘cable_common_read_stream’ undeclared here (not in a function)
cable_common.c:58: warning: excess elements in struct initializer
cable_common.c:58: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:59: warning: excess elements in struct initializer
cable_common.c:59: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:60: warning: excess elements in struct initializer
cable_common.c:60: warning: (near initialization for ‘jtag_cables[0]’)
cable_common.c:62: error: ‘cable_vpi_inout’ undeclared here (not in a function)
cable_common.c:62: warning: excess elements in struct initializer
cable_common.c:62: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:63: error: ‘cable_vpi_out’ undeclared here (not in a function)
cable_common.c:63: warning: excess elements in struct initializer
cable_common.c:63: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:64: warning: excess elements in struct initializer
cable_common.c:64: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:65: warning: excess elements in struct initializer
cable_common.c:65: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:66: warning: excess elements in struct initializer
cable_common.c:66: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:67: warning: excess elements in struct initializer
cable_common.c:67: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:68: warning: excess elements in struct initializer
cable_common.c:68: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:69: warning: excess elements in struct initializer
cable_common.c:69: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:70: warning: excess elements in struct initializer
cable_common.c:70: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:71: warning: excess elements in struct initializer
cable_common.c:71: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:72: warning: excess elements in struct initializer
cable_common.c:72: warning: (near initialization for ‘jtag_cables[1]’)
cable_common.c:74: error: ‘cable_xpc3_inout’ undeclared here (not in a function)
cable_common.c:74: warning: excess elements in struct initializer
cable_common.c:74: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:75: error: ‘cable_xpc3_out’ undeclared here (not in a function)
cable_common.c:75: warning: excess elements in struct initializer
cable_common.c:75: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:76: warning: excess elements in struct initializer
cable_common.c:76: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:77: warning: excess elements in struct initializer
cable_common.c:77: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:78: warning: excess elements in struct initializer
cable_common.c:78: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:79: warning: excess elements in struct initializer
cable_common.c:79: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:80: warning: excess elements in struct initializer
cable_common.c:80: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:81: warning: excess elements in struct initializer
cable_common.c:81: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:82: warning: excess elements in struct initializer
cable_common.c:82: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:83: warning: excess elements in struct initializer
cable_common.c:83: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:84: warning: excess elements in struct initializer
cable_common.c:84: warning: (near initialization for ‘jtag_cables[2]’)
cable_common.c:86: error: ‘cable_xess_inout’ undeclared here (not in a function)
cable_common.c:86: warning: excess elements in struct initializer
cable_common.c:86: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:87: error: ‘cable_xess_out’ undeclared here (not in a function)
cable_common.c:87: warning: excess elements in struct initializer
cable_common.c:87: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:88: warning: excess elements in struct initializer
cable_common.c:88: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:89: warning: excess elements in struct initializer
cable_common.c:89: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:90: warning: excess elements in struct initializer
cable_common.c:90: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:91: warning: excess elements in struct initializer
cable_common.c:91: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:92: warning: excess elements in struct initializer
cable_common.c:92: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:93: warning: excess elements in struct initializer
cable_common.c:93: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:94: warning: excess elements in struct initializer
cable_common.c:94: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:95: warning: excess elements in struct initializer
cable_common.c:95: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:96: warning: excess elements in struct initializer
cable_common.c:96: warning: (near initialization for ‘jtag_cables[3]’)
cable_common.c:98: error: ‘cable_usbblaster_inout’ undeclared here (not in a function)
cable_common.c:98: warning: excess elements in struct initializer
cable_common.c:98: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:99: error: ‘cable_usbblaster_out’ undeclared here (not in a function)
cable_common.c:99: warning: excess elements in struct initializer
cable_common.c:99: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:100: warning: excess elements in struct initializer
cable_common.c:100: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:101: warning: excess elements in struct initializer
cable_common.c:101: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:102: warning: excess elements in struct initializer
cable_common.c:102: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:103: warning: excess elements in struct initializer
cable_common.c:103: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:104: warning: excess elements in struct initializer
cable_common.c:104: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:105: error: ‘cable_usbblaster_write_stream’ undeclared here (not in a function)
cable_common.c:105: warning: excess elements in struct initializer
cable_common.c:105: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:106: error: ‘cable_usbblaster_read_stream’ undeclared here (not in a function)
cable_common.c:106: warning: excess elements in struct initializer
cable_common.c:106: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:107: warning: excess elements in struct initializer
cable_common.c:107: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:108: warning: excess elements in struct initializer
cable_common.c:108: warning: (near initialization for ‘jtag_cables[4]’)
cable_common.c:110: error: ‘cable_xpcusb_inout’ undeclared here (not in a function)
cable_common.c:110: warning: excess elements in struct initializer
cable_common.c:110: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:111: error: ‘cable_xpcusb_out’ undeclared here (not in a function)
cable_common.c:111: warning: excess elements in struct initializer
cable_common.c:111: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:112: warning: excess elements in struct initializer
cable_common.c:112: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:113: warning: excess elements in struct initializer
cable_common.c:113: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:114: warning: excess elements in struct initializer
cable_common.c:114: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:115: warning: excess elements in struct initializer
cable_common.c:115: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:116: error: ‘cable_xpcusb_read_write_bit’ undeclared here (not in a function)
cable_common.c:116: warning: excess elements in struct initializer
cable_common.c:116: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:117: warning: excess elements in struct initializer
cable_common.c:117: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:118: warning: excess elements in struct initializer
cable_common.c:118: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:119: warning: excess elements in struct initializer
cable_common.c:119: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:120: warning: excess elements in struct initializer
cable_common.c:120: warning: (near initialization for ‘jtag_cables[5]’)
cable_common.c:121: warning: excess elements in struct initializer
cable_common.c:121: warning: (near initialization for ‘jtag_cables[6]’)
cable_common.c:121: warning: excess elements in struct initializer
cable_common.c:121: warning: (near initialization for ‘jtag_cables[6]’)
cable_common.c:121: warning: excess elements in struct initializer
cable_common.c:121: warning: (near initialization for ‘jtag_cables[6]’)
cable_common.c: In function ‘cable_init’:
cable_common.c:149: error: ‘struct jtag_cable’ has no member named ‘init_func’
cable_common.c: In function ‘cable_parse_opt’:
cable_common.c:155: error: ‘struct jtag_cable’ has no member named ‘opt_func’
cable_common.c: In function ‘cable_get_args’:
cable_common.c:161: error: ‘struct jtag_cable’ has no member named ‘opts’
cable_common.c: In function ‘cable_print_help’:
cable_common.c:175: warning: format not a string literal and no format arguments
cable_common.c:180: error: ‘struct jtag_cable’ has no member named ‘help’
cable_common.c:182: error: ‘struct jtag_cable’ has no member named ‘help’
cable_common.c: At top level:
cable_common.c:190: error: expected ‘)’ before ‘*’ token
cable_common.c:194: error: expected ‘)’ before ‘*’ token
cable_common.c:198: error: expected ‘)’ before ‘packet’
cable_common.c:202: error: expected ‘)’ before ‘packet_out’
cable_common.c:218: error: expected ‘)’ before ‘packet’
cable_common.c:237: error: expected ‘)’ before ‘packet_out’
cable_common.c:258: error: expected ‘)’ before ‘*’ token
cable_common.c:287: error: expected ‘)’ before ‘*’ token
make: *** [cable_common.o] Error 1
johne@hallway:~/OpenCores/adv_debug_sys/Software/adv_jtag_bridge$
RE: New debug system available
by nyawn on May 30, 2009
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: Oct 27, 2026

I got a Ubuntu 9.04 live CD and built the advanced JTAG bridge. I committed the changes to SVN - if you update to the latest TRUNK, you should be able to build adv_jtag_bridge (you'll still get a lot of warnings, mostly about printf statements). I'm going to try to fix some of the warnings and test again to make sure it still works under cygwin, then I'll tag release 1.0.1. But, this should hopefully get you going in the mean time...
RE: New debug system available
by jt_eaton on May 31, 2009
jt_eaton
Posts: 142
Joined: Aug 18, 2008
Last seen: Sep 29, 2018

I got a Ubuntu 9.04 live CD and built the advanced JTAG bridge. I committed the changes to SVN - if you update to the latest TRUNK, you should be able to build adv_jtag_bridge (you'll still get a lot of warnings, mostly about printf statements). I'm going to try to fix some of the warnings and test again to make sure it still works under cygwin, then I'll tag release 1.0.1. But, this should hopefully get you going in the mean time...
-------------------------------------

Ok it compiles now and runs. I don't have a real usbblaster, I have digilent boards and run a script I got from comp.arch.fpga that reprograms the digilent module to use usbblaster protocol. I don't think it mimics the PID/VID so it can't be found . It shows up as:

Bus 001 Device 003: ID 16c0:06ad VOTI

I'll hack away and see if I can make it look like a real usbblaster

Thanks,

John Eaton
RE: New debug system available
by nyawn on Jun 2, 2009
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: Oct 27, 2026
Glad it runs. If it's easier, you can also change the USB ID that adv_jtag_bridge looks for when using the 'usbblaster' cable option, I think it's #defined near the top of cable_usbblaster.c.
RE: New debug system available
by jt_eaton on Jun 2, 2009
jt_eaton
Posts: 142
Joined: Aug 18, 2008
Last seen: Sep 29, 2018
Glad it runs. If it's easier, you can also change the USB ID that adv_jtag_bridge looks for when using the 'usbblaster' cable option, I think it's #defined near the top of cable_usbblaster.c.
--------------------

I tried that. It gets farther but hangs:

johne@hallway:~/OpenCores/adv_debug_sys/Software/adv_jtag_bridge$ ./adv_jtag_bridge usbblaster
Found Altera USB-Blaster
Found Altera USB-Blaster
firmware version = 0x0400 (1024)
Enumerating JTAG chain...


----------------------------

The script that I am using reprograms the digilent usb controller to look "like" a usbblaster. I would not expect it the be 100% compatible.

John Eaton

RE: New debug system available
by nyawn on Jun 2, 2009
nyawn
Posts: 173
Joined: Dec 19, 2008
Last seen: Oct 27, 2026

If you need more info on how a USB-Blaster actually works, I suggest you look at the "usbjtag" project (not on OpenCores, have to google it). It's code for a Cypress chip that emulates a USB-Blaster well enough for Quartus to download bitstreams (and well enough to work with adv_jtag_bridge). It should give you a good idea of how a USB-Blaster is supposed to work, which could be useful if you can modify your cable.

The other thing you might try is to modify cable_common.c, and change the cable struct so that the generic burst functions will be used instead of the USB-Blaster specific ones. This will slow performance, but will use only the bit-bang interface of the cable - if your problem is in the burst routines, this could work around it.

no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.