help needed ... problems with adb_debug_sys
by afr1g11 on Apr 5, 2012 |
afr1g11
Posts: 31 Joined: Oct 12, 2011 Last seen: Jun 28, 2013 |
||
hello,
I get the following message while trying to connect to my de2-115 board (altera cyclone 4) ./adv_jtag_bridge -b ./ usbblaster Found Altera USB-Blaster Failed to reset USB Blaster Found Altera USB-Blaster USBBlaster driver failed to set configuration Failed to initialize cable 'usbblaster', aborting. I'm using ubuntu virtual machine on windows 7. Both libusb, libusb-0.1 compatible api, libftdi were compiled with the default commands: ./configure ./make sudo ./make install Can anyone tell me what seems to be the issue / has anyone seen such errors before? Please help. Regards, AR |
RE: help needed ... problems with adb_debug_sys
by crevars on Apr 5, 2012 |
crevars
Posts: 29 Joined: Jun 7, 2008 Last seen: Mar 11, 2014 |
||
You sould try to use ./adv_jtag_bridge ft245. I've never get it works using usb_blaster option.
|
RE: help needed ... problems with adb_debug_sys
by crevars on Apr 5, 2012 |
crevars
Posts: 29 Joined: Jun 7, 2008 Last seen: Mar 11, 2014 |
||
Hi,
You should try to use ./adv_jtag_bridge ft245 This config : ./adv_jtag_bridge usbblaster doesn't work for me. Franck. |
RE: help needed ... problems with adb_debug_sys
by afr1g11 on Apr 5, 2012 |
afr1g11
Posts: 31 Joined: Oct 12, 2011 Last seen: Jun 28, 2013 |
||
i've tried ft245 option ... this is what i get:
./adv_jtag_bridge ft245 'usb_blaster' interface using libftdi unable to open ftdi device with VID 0x9FB, PID 0x6001: inappropriate permissions on device! Failed to initialize cable 'ft245', aborting. My usb cable is recognised as altera ... lsusb Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet Bus 001 Device 006: ID 09fb:6001 Altera :-( |
RE: help needed ... problems with adb_debug_sys
by afr1g11 on Apr 5, 2012 |
afr1g11
Posts: 31 Joined: Oct 12, 2011 Last seen: Jun 28, 2013 |
||
Some success ...
the problem is probably due to user priviledge when the adv_debug_sys tries to access the drivers in the /usr/local directory ... using root priviledges sorts this out ...
sudo ./adv_jtag_bridge -b ~/bsd
but now i get these new errors:
sudo ./adv_jtag_bridge -b ~/bsd ft245
'usb_blaster' interface using libftdi
current latency timer: 2
Enumerating JTAG chain...
ftdi_read_data: usb bulk read failed
ftdi_read_data: usb bulk read failed
Failed to read stream from the EP1 FIFO (-1)
ftdi_read_data: usb bulk read failed
Failed to read stream from the EP1 FIFO (-1)
Error 'USB' enumerating JTAG chain, aborting.
sudo ./adv_jtag_bridge -b ~/bsd usbblaster
Found Altera USB-Blaster
Found Altera USB-Blaster
firmware version = 0x0004 (4)
Enumerating JTAG chain...
Failed to read from the EP1 FIFO (-110):
No errorError 'USB' enumerating JTAG chain, aborting.
Any ideas what can I do now ???
Regards,
AR
|
RE: help needed ... problems with adb_debug_sys
by nyawn on Apr 8, 2012 |
nyawn
Posts: 173 Joined: Dec 19, 2008 Last seen: May 31, 2023 |
||
This is still a problem with your setup, something between USB and your VM. Libusb isn't able to do anything at all to the device. I don't use a VM, maybe someone else who has one working can give you some hints.
|
RE: help needed ... problems with adb_debug_sys
by afr1g11 on Apr 9, 2012 |
afr1g11
Posts: 31 Joined: Oct 12, 2011 Last seen: Jun 28, 2013 |
||
Hi Nathan,
Thanks for all your all your help. I believe it is a problem with the VM since sometimes it connects well and sometimes it doesn't do anything at all. And sometimes the connection breaks once I try to connect the GNU Debugger to port 9999. However, the VM i'm using is the same ORPSoC Virtual Box Ubuntu 11.10 distibution that comes with the toolchain and debugger preinstalled. I haven't heard any other posts on the forums regarding this. I have some specific questions and would be very grateful if you could tale some time answering them. (a) Is there any other alternative way of connecting instead of using adv_dbg_sys software? (b) I've enabled the JSP on my 'adv_dbg_defines.v' file as well as in the 'Makefile.classic'. I've compiled using the following commands: autoconf sudo ./configure make install make 'libusb', 'libusb 0.1 compatible api', 'libftdi' were compiled similarly. Advanced hardware whatchpoint wasn't compiled as this is not necessary in my case. None of the patches were applied. Ideally, when the system connects to the 'Altera Virtual JTAG Tap' (which it does sometimes after 10 - 20 retries) I should be getting a msg saying 'JSP listening on host xxx port 9944' etc. But I don't get any such message despite having JSP enabled. Am I compiling with any missing parameters? Can you see any other issue with the flow? Many thanks in advance! Regards, AR |
RE: help needed ... problems with adb_debug_sys
by crevars on Apr 10, 2012 |
crevars
Posts: 29 Joined: Jun 7, 2008 Last seen: Mar 11, 2014 |
||
Hi,
I can answer to the (a) question. It is still under test but I patched OpenOCD to support the Advanced Debug Interface. I works with the Altera Virtual JTAG. You'll find the patch here http://openrisc.net/forum.html It is to applied against the OpenOCD version here: http://git.openrisc.net/cgit.cgi/julius/openocd/ It looks more stable than adv_jtag_bridge... Franck. |
RE: help needed ... problems with adb_debug_sys
by afr1g11 on Apr 10, 2012 |
afr1g11
Posts: 31 Joined: Oct 12, 2011 Last seen: Jun 28, 2013 |
||
Franck,
Thanks a lot ...
Just to clarify a few points on the order of execution:
[1] Patch the usb_blaster_driver with your patch file using linux "patch " command which should enable support for adv_debug_sys (as a `define statement)
[2] run ./bootstrap
[3] run ./configure with these arguments: '--enable-usb_blaster_libftdi --enable-adv_debug_sys --enable-maintainer-mode'
[4] Compile the source code with 'make' and 'make install'
[5] Put FPGA JTAG ID in vjtag.cfg (Should be obtainable through quartus.
[6] Save the following as a startup.tcl file and use it as a startup script using 'source startup.tcl'
[7] Run the compiled binary located in the '\src' folder
I'm a linux novice hence require this clarification.
Please do reply back.
Regards,
AR
|
RE: help needed ... problems with adb_debug_sys
by crevars on Apr 11, 2012 |
crevars
Posts: 29 Joined: Jun 7, 2008 Last seen: Mar 11, 2014 |
||
Attached you'll find the patches to apply. Julius is going to create a new branch (for testing purpose) with patches applied. So for now, this is how to proceed:
git://openrisc.net/julius/openocd cd openocd tar xvzf patch.tar.gz git apply 000* (you'll have some whitespace errors which need to be fixed...) ./bootstrap ./configure --enable-usb_blaster_libftdi --enable-adv_debug_sys --enable-maintainer-mode make As you said: Put FPGA JTAG ID in vjtag.cfg This is my startup script (altera-dev.tcl): source [find ./tcl/interface/altera-usb-blaster.cfg] usb_blaster pin6 1 usb_blaster pin8 1 source [find ./tcl/target/vjtag.cfg] proc fpga_test_init {} { } gdb_port 50001 init #echo "Halting processor" halt foreach name [target names] { set y [$name cget -endian] set z [$name cget -type] puts [format "Chip is %s, Endian: %s, type: %s" \ $name $y $z] } Then : sudo ./src/openocd -f ./tcl/interface/altera-usb-blaster.cfg -f altera-dev.tcl Good luck :) Franck.
patch.tar.gz (23 kb)
|
RE: help needed ... problems with adb_debug_sys
by crevars on Apr 11, 2012 |
crevars
Posts: 29 Joined: Jun 7, 2008 Last seen: Mar 11, 2014 |
||
First line of the procedure it is: git clone git://openrisc.net/julius/openocd
|
RE: help needed ... problems with adb_debug_sys
by nyawn on Apr 12, 2012 |
nyawn
Posts: 173 Joined: Dec 19, 2008 Last seen: May 31, 2023 |
||
To your other two questions:
(b) Are you using the Makefile.classic to compile, or did you used the autotools ./configure process? If the latter, then you'll need to run ./configure again with the right option to enable JSP support in adv_jtag_bridge: --enable-jsp-server=yes. There are two other JSP-related options, make sure you set them to match your configuration (check ./configure --help for the full list). You'll then need to 'make clean; make' to rebuild adv_jtag_bridge (this is true even if you're using the Makefile.classic). If the JSP support is compiled in, you'll see a message as part of the help (./adv_jtag_bridge -h) that says "Compiled with support for the JTAG Serial Port (JSP)." Franck, I'm curious what you mean by "more stable"? |
RE: help needed ... problems with adb_debug_sys
by afr1g11 on Apr 12, 2012 |
afr1g11
Posts: 31 Joined: Oct 12, 2011 Last seen: Jun 28, 2013 |
||
Franck,
Thanks a lot for your help and support - finally I'm able to connect and it is a lot more stable than adv_dbg_sys :-) However, I'm getting the following msg when I try to load linux into SDRAM through GDB: Output from GDB: ================ (gdb) load Loading section .text, size 0x11847c lma 0x0 Loading section .rodata, size 0x132d0 lma 0x11a000 Loading section __ksymtab, size 0x2728 lma 0x12d2d0 Loading section __ksymtab_gpl, size 0xf80 lma 0x12f9f8 Loading section __ksymtab_strings, size 0x7323 lma 0x130978 Loading section __param, size 0x90 lma 0x137c9c Loading section .data, size 0xf5c0 lma 0x138000 Loading section __ex_table, size 0x7f0 lma 0x1475c0 Loading section .head.text, size 0x4000 lma 0x148000 Loading section .init.text, size 0xdb3c lma 0x14c000 Loading section .init.data, size 0x14acc4 lma 0x159b40 Start address 0xc0000000, load size 2762583 Transfer rate: 7 KB/sec, 15696 bytes/write. Output from openOCD: ==================== Open On-Chip Debugger 0.5.0-dev-gd27b377-dirty (2012-04-12-03:24) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html Warn : Adapter driver 'usb_blaster' did not declare which transports it allows; assuming legacy JTAG-only Info : only one transport option; autoselect 'jtag' 3000 kHz Warn : Interface already configured, ignoring 3000 kHz Info : No lowlevel driver configured, will try them all Info : usb blaster interface using libftdi Error: Translation from khz to jtag_speed not implemented Error: Translation from khz to jtag_speed not implemented Error: Translation from jtag_speed to khz not implemented Info : adapter-specific clock speed value -1076490936 Info : JTAG tap: or1k.cpu tap/device found: 0x020f70dd (mfg: 0x06e, part: 0x20f7, ver: 0x0) target state: halted Chip is or1k.cpu, Endian: big, type: or1k Info : accepting 'gdb' connection from 50001 Warn : acknowledgment received, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending Does this indicate there's something wrong with the Synthesis / RTL code? Also, is a there a way to telnet to openOCD to get the linux console ??? Many thanks and I promise not to bother you again ... Regards, AR |
RE: help needed ... problems with adb_debug_sys
by afr1g11 on Apr 12, 2012 |
afr1g11
Posts: 31 Joined: Oct 12, 2011 Last seen: Jun 28, 2013 |
||
@Nathan,
Tried your suggestions and this is working wonderfully well now :-) But I'm getting the following msg: ERROR! WB bus error during burst write, address 0x0 (index 0x0), retrying! There's something wrong with my synthesis ... I'm using positive reset for OR1200 (as defined in OR1200_defines.v) and nReset as an input to the orpSoC top module ... I've used the same files used in the DE2-115 port ... have you come across anything like this before ??? Any hints ??? Many thanks though for your help :-) Regards, AR |
RE: help needed ... problems with adb_debug_sys
by crevars on Apr 12, 2012 |
crevars
Posts: 29 Joined: Jun 7, 2008 Last seen: Mar 11, 2014 |
||
@afr1g11
finally I'm able to connect and it is a lot more stable than adv_dbg_sys :-)
That's good to know. Error: Translation from khz to jtag_speed not implemented Error: Translation from khz to jtag_speed not implemented Error: Translation from jtag_speed to khz not implemented Info : adapter-specific clock speed value -1076490936 Warn : acknowledgment received, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending Warn : negative acknowledgment, but no packet pending I also have those warnings. It is not related to an RTL problem. It's comming from the OpenOCD port, this need to be fixed. However, it does work anyway.... Also, is a there a way to telnet to openOCD to get the linux console ??? Not yet, the JSP is not supported by OpenOCD for now. Many thanks and I promise not to bother you again ... You don't bother me at all :) Franck. |