Openocd with DE-10 nano  (usb blaster 2) [Solved] - Page 1
Forum section: electronics / general

author: fabiodl
author_rank: Frequent Contributor
timestamp: March 31, 2021, 12:33:21 am
content: Has anyone managed to use openocd with the Terasic DE-10 nano board?Quartus programmer works. I tried two boards, so I'd exclude hardware problems.I correctly set the path of usb_blaster_firrmware in altera-usb-blaster2.cfgI added the udev rulesI defined the chain as by attachmentI am using Open On-Chip Debugger 0.10.0 (but version 0.9 gives the same errorWith the following commandCode:openocd -f altera-usb-blaster2.cfg -f chain.cfg -c init -c "svf -quiet /tmp/jfpgaIo.svf" -c shutdownI get the following outputCode:Open On-Chip Debugger 0.10.0Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmlWarn : Adapter driver 'usb_blaster' did not declare which transports it allows; assuming legacy JTAG-onlyInfo : only one transport option; autoselect 'jtag'adapter speed: 1000 kHzcycv_dbginitInfo : Altera USB-Blaster II found (Firm. rev. = 1.36)Info : This adapter doesn't support configurable speedInfo : JTAG tap: fpgasoc.fpga.tap tap/device found: 0x02d020dd (mfg: 0x06e (Altera), part: 0x2d02, ver: 0x0)Info : JTAG tap: fpgasoc.dap tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)Info : DAP transaction stalled (WAIT) - slowing downInfo : DAP transaction stalled (WAIT) - slowing downInfo : DAP transaction stalled (WAIT) - slowing downInfo : fpgasoc.cpu.0: hardware has 6 breakpoints, 4 watchpointsInfo : DAP transaction stalled (WAIT) - slowing downInfo : DAP transaction stalled (WAIT) - slowing downInfo : DAP transaction stalled (WAIT) - slowing downInfo : fpgasoc.cpu.1: hardware has 6 breakpoints, 4 watchpointssvf processing file: "/tmp/jfpgaIo.svf"Error: Translation from khz to jtag_speed not implementedin procedure 'svf'in procedure 'ocd_bouncer'Error: tdo check error at line 55217Error: READ = 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Error: WANT = 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000Error: MASK = 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000Time used: 0m4s849mssvf file programmed failed

author: SMB784
author_rank: Frequent Contributor
timestamp: March 31, 2021, 12:54:41 am
content: QuoteYou are improperly specifying your JTAG speed. Which version of OpenOCD are you using? Check the config file, and compare how you specify the JTAG speed to the examples in the OpenOCD documentation.

author: fabiodl
author_rank: Frequent Contributor
timestamp: March 31, 2021, 01:15:25 am
content: I was using 0.10 (as shown in the log).I tried using the latest git version, but the error is the same.I reduced the chain to the following minimal fileCode:jtag newtap fpgasoc.fpga tap -irlen 10 -ircapture 0x01 -irmask 0x3 -expected-id 0x02d020ddjtag newtap fpgasoc cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id 0x4ba00477and the other configuration file is the interface/altera-usb-blaster2.cfg that comes with the latest git installation.That file readsCode:## Altera USB-Blaster II#adapter driver usb_blasterusb_blaster_vid_pid 0x09fb 0x6010 0x09fb 0x6810usb_blaster_lowlevel_driver ublast2usb_blaster_firmware /path/to/quartus/blaster_6810.hexwhere the path was adjusted to the correct oneThe output is the followingCode:Open On-Chip Debugger 0.11.0+dev-00062-g6405d35f3-dirty (2021-03-31-10:01)Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmlDEPRECATED! use 'adapter driver' not 'interface'Info : only one transport option; autoselect 'jtag'Info : Altera USB-Blaster II found (Firm. rev. = 1.36)Info : This adapter doesn't support configurable speedInfo : JTAG tap: fpgasoc.fpga.tap tap/device found: 0x02d020dd (mfg: 0x06e (Altera), part: 0x2d02, ver: 0x0)Info : JTAG tap: fpgasoc.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x4)Warn : gdb services need one or more targets definedsvf processing file: "/tmp/jfpgaIo.svf"FREQUENCY 3.30E+07 HZ;Error: Translation from khz to jtag_speed not implementedTRST ABSENT;ENDDR IDLE;ENDIR IRPAUSE;STATE IDLE;SIR 10 TDI (002);RUNTEST IDLE 33000 TCK ENDSTATE IDLE;FFFFFFFFFFFFFFFFFFFFFFFFFF);SIR 10 TDI (004);RUNTEST 165 TCK;0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000);SIR 10 TDI (003);RUNTEST 135168 TCK;RUNTEST 512 TCK;SIR 10 TDI (3FF);RUNTEST 33000 TCK;STATE IDLE;Error: tdo check error at line 55217Error: READ = 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Error: WANT = 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000Error: MASK = 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000Time used: 0m4s827mssvf file programmed failed

author: SMB784
author_rank: Frequent Contributor
timestamp: March 31, 2021, 01:29:50 am
content: Quote3.3x107Hz is 33 MHz, which seems awfully fast for a JTAG interface. Usually these communicate in the hundreds of kilohertz. It is also saying you are having a translation error for the jtag speed. I think there is still something wrong with how you are specifying JTAG, and I don't see that you are specifying the speed anywhere in your config file. Also, openocd is now in version 0.11. I recommend building it from the source:https://github.com/ntfreak/openocdIt has a slightly different way of specifying the JTAG speed, which might clear up your issue. Check out how I specify the adapter speed in my OpenOCD implementation for programming a xilinx part using an FT232H adapter:https://github.com/SMB784/SQRL/blob/master/SQRL.program_scripts/xilinx-artix7.cfg

author: fabiodl
author_rank: Frequent Contributor
timestamp: March 31, 2021, 02:02:32 am
content: The speed is the default in quartus.I tried reducing it down to 100Khz and it made no difference.For posterity, I found a solutionI do not know why, but the svf generated byCode:quartus_sh --flow compile pjname.qpfis bad.If I genetate it usingCode:quartus_cpf -c -q 33Mhz -g 3.3 -n p Chain1.cdf /tmp/out.svfthen it works