NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
emeb has joined #openocd
renrelkha has quit [Remote host closed the connection]
renrelkha has joined #openocd
Hawk777 has quit [Quit: Leaving.]
boru` has joined #openocd
boru has quit [Killed (NickServ (GHOST command used by boru`))]
boru` is now known as boru
akaWolf has joined #openocd
tsal has quit [Ping timeout: 258 seconds]
tsal has joined #openocd
emeb has left #openocd [#openocd]
Hawk777 has joined #openocd
<rue_shop2> erm, did xc3sprog development die like 4 years ago?
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
<PaulFertser> I didn't see it discussed here, probably so.
<PaulFertser> rue_shop2: you know you can play back SVF files (generated from any FPGA/CPLD tooling) with OpenOCD and UrJTAG?
<rue_shop2> no
<rue_shop2> I have a jed for a xc9536
<rue_shop2> not a 9536xl
<rue_shop2> a xc9536
<PaulFertser> But JED can be converted to SVF.
<rue_shop2> no idea
<rue_shop2> it looks like I have the info to modify the config for the 9536xl
<rue_shop2> but openocd has never worked for anything for me
<rue_shop2> ever
<PaulFertser> E.g. I have these notes for JED->SVF conversion: ``Lattice Diamond Deployment Tool``, checkboxes ``use rev.D format``, ``RESET``. do not set ``rev.C``.
<rue_shop2> ok...
<PaulFertser> I have personally used it. SVF playback works with all supported adapters.
<PaulFertser> Including bitbanging GPIOs of a SoC.
<rue_shop2> yea, openocd doesn't support the ft232h I have
<rue_shop2> er, I dont think it does
<PaulFertser> rue_shop2: ft232h supports MPSSE so supporting any ft232h is a matter of writing a simple config file (if it doesn't already exist).
<rue_shop2> no, thats why I had to use xc3sprog
<rue_shop2> ok, lets challange that
<PaulFertser> rue_shop2: I have ft232h breakout in my box, works just fine.
<rue_shop2> I have a ft232h with a xc9536 on it
<PaulFertser> Do you have schematics for the board?
<rue_shop2> lets see if you can help me get openocd to just identify it
<PaulFertser> Let's see
<rue_shop2> yes, the power and the jtag pins go directly to the jtag conenctor which works
<rue_shop2> cause I made the board :)
<rue_shop2> xc3sprog can identify the chip
<PaulFertser> And for ft232h board?
<rue_shop2> ah no
<rue_shop2> root@blackie3:/usr/share/openocd/scripts/cpld# xc3sprog -c ft232h
<rue_shop2> Using Libftdi,
<rue_shop2> JTAG loc.: 0 IDCODE: 0x29502093 Desc: XC9536 Rev: C IR length: 8
<PaulFertser> IIRC for Xilinx if you're using ISE you select "SVF writer" (or similar) as an adapter and then add and configure devices as usual, and it writes a file for you.
<PaulFertser> rue_shop2: ok, so what that ft232h board is? A plain breakout board or some buffers?
<rue_shop2> breakout
<rue_shop2> 1 sec
<PaulFertser> rue_shop2: what's USB VID:PID of it?
<rue_shop2> I can tell you the signals... tck is AD0, TDO is AD2, TDI is AD1, and TMS is AD3
<rue_shop2> Bus 001 Device 062: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
<PaulFertser> rue_shop2: ok, then try running: openocd -f interface/ftdi/c232hm.cfg -c "transport select jtag"
<rue_shop2> embedded:startup.tcl:60: Error: Can't find interface/ftdi/c232hm.cfg
<rue_shop2> in procedure 'script'
<rue_shop2> at file "embedded:startup.tcl", line 60
<PaulFertser> rue_shop2: what openocd version do you have?
<rue_shop2> Open On-Chip Debugger 0.10.0
<PaulFertser> rue_shop2: I have a feeling OpenOCD doesn't find its config files. Did you manually install that version?
<rue_shop2> hmm
<PaulFertser> rue_shop2: ah, no, sorry, that was added post-0.10.0
<rue_shop2> ok
<rue_shop2> its debian
<rue_shop2> need I say more?
<PaulFertser> rue_shop2: then try um232h.cfg instead
<rue_shop2> jtag
<rue_shop2> Error: An adapter speed is not selected in the init script. Insert a call to adapter_khz or jtag_rclk to proceed.
<PaulFertser> rue_shop2: there's a solid reason why Debian doesn't ship 0.11.0 yet. At the time the release was made they were exactly in freeze state.
<rue_shop2> ok
<PaulFertser> rue_shop2: ok, please add -c "adapter_khz 100"
<rue_shop2> they have severe version issue due to their policy of not allowing projects to duplicate code, which partly lead to docker
<rue_shop2> Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!
<rue_shop2> ^c
<rue_shop2> ^CError: libusb_handle_events() failed with LIBUSB_ERROR_INTERRUPTED
<rue_shop2> Segmentation fault
<PaulFertser> rue_shop2: try physically unplugging ft232h from USB, plug it back and retry.
<rue_shop2> I'm glad I'm not the only person having a time with it
<rue_shop2> --
<rue_shop2> Info : clock speed 100 kHz
<rue_shop2> Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!
<rue_shop2> Info : JTAG tap: auto0.tap tap/device found: 0x29502093 (mfg: 0x049 (Xilinx), part: 0x9502, ver: 0x2)
<rue_shop2> Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 8 -expected-id 0x29502093"
<rue_shop2> Warn : gdb services need one or more targets defined
<rue_shop2> nice
<PaulFertser> rue_shop2: yes, and now you can play back any SVF file.
<rue_shop2> ok, I need to know how to create one of those first
<rue_shop2> you say ise can do it
<PaulFertser> rue_shop2: yes, and vivaldi too but it was more complicated for whatever reason.
<PaulFertser> rue_shop2: what are you using?
<rue_shop2> ise :(
<rue_shop2> its ate all the rams
<PaulFertser> rue_shop2: so with ISE at least this part should be easy.
<rue_shop2> ok
<PaulFertser> " If the physical board is not available, the ".bsd" files can be manually added from the ISE designtools install directory. "
<rue_shop2> no, "no impact project file exists.."
<rue_shop2> hmm
<rue_shop2> its a direct chip connection
<PaulFertser> rue_shop2: right, no project, you press "create new blank" or some such
<PaulFertser> rue_shop2: direct chip means just one device in the chain
<rue_shop2> "enter boundry scan chain manually
<PaulFertser> Yes
<rue_shop2> ok, painless so far...
<rue_shop2> ah, ok
<rue_shop2> its cool to get to walk someone elses shoes for a bit
<rue_shop2> I'v only been working from what I had in my first tutorial with fpga
<rue_shop2> ok, I have an svf file, please continue :)
<PaulFertser> I'm surprised you're not playing with something that's supported by the free toolchain, e.g. iCE40
<rue_shop2> $$$$
<rue_shop2> I'v got less than $20 in hardware infront of me
<PaulFertser> rue_shop2: now stop OpenOCD and add this to the arguments: -c "init; svf /path/to/your.svf; shutdown"
nerozero has joined #openocd
<rue_shop2> I tore apart a nortel switch for some CPLDs, BGA, dead bugged one and been playing with that for a week
<rue_shop2> stand by
<rue_shop2> Info : clock speed 100 kHz
<rue_shop2> Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 8 -expected-id 0x29502093"
<rue_shop2> Info : JTAG tap: auto0.tap tap/device found: 0x29502093 (mfg: 0x049 (Xilinx), part: 0x9502, ver: 0x2)
<rue_shop2> Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!
<rue_shop2> Warn : gdb services need one or more targets defined
<rue_shop2> svf processing file: "main.svf"
<rue_shop2> Time used: 0m0s1ms
<rue_shop2> svf file programmed successfully for 0 commands with 0 errors
<rue_shop2> shutdown command invoked
<rue_shop2> so it should have worked?
<rue_shop2> 0 commands, and my test light not being on imply an issue
<rue_shop2> openocd -f interface/ftdi/um232h.cfg -c "transport select jtag" -c "adapter_khz 100" -c "init; svf main.svf; shutdown"
<PaulFertser> rue_shop2: no, zero comands sounds wrong, check what's inside the file
<rue_shop2> hah, nothing
<rue_shop2> 0 bytes
<rue_shop2> ok
Hawk777 has quit [Quit: Leaving.]
<rue_shop2> I think I goofed
<rue_shop2> :)
<rue_shop2> reworking, pls stand by
<rue_shop2> Error: tdo check error at line 40
<rue_shop2> Error: WANT = 0x0000003
<rue_shop2> Error: MASK = 0x0000003
<rue_shop2> Error: READ = 0x03ffffc
<rue_shop2> Error: fail to run command at line 1049
<rue_shop2> Error: tdo check error at line 40
<rue_shop2> Error: READ = 0x03ffffc
<rue_shop2> Error: WANT = 0x0000003
<rue_shop2> Error: MASK = 0x0000003
<rue_shop2> but
<rue_shop2> the test led is on
<rue_shop2> which implies success
<PaulFertser> The error is strange though.
<PaulFertser> Probably there're some comments in the file that would explain what it is checking.
<rue_shop2> / Loading devices with 'fbulk' instruction.
<PaulFertser> https://blog.xjtag.com/2016/07/creating-svf-files-using-xilinx-vivado/ <-- this convoluted way for vivado
<rue_shop2> maybe my user led isn't actually being driven on, its not bright, and its blue on 1k @ 5V
<rue_shop2> it should be blinding
<rue_shop2> I tried just an erase command, similar results
<PaulFertser> rue_shop2: probably you're selecting not exactly the right target CPLD when creating the chain?
<rue_shop2> xc9536
<PaulFertser> As you can see SVF is not something tricky, it's just a set of low-level JTAG interactions.
<PaulFertser> Is there some delay before that line 40? Probably you need it 10x higher?
<rue_shop2> there is a delay
<rue_shop2> higher?
<PaulFertser> rue_shop2: longer
<rue_shop2> adapter khz?
<PaulFertser> rue_shop2: I mean you can manually edit SVF, it's plain text list of commands to run.
<rue_shop2> yep, was browsing thru it
<PaulFertser> rue_shop2: you can try amending the frequency there in the first commands. You can also try making the delay before line 40 longer etc.
<rue_shop2> I did an svf for just the erase command
<rue_shop2> its failing
<rue_shop2> but a much simpler file
<rue_shop2> is runtest a delay?
<PaulFertser> rue_shop2: kinda yes
<PaulFertser> rue_shop2: it's a delay with JTAG clock running.
<rue_shop2> :)
<rue_shop2> svf file programmed successfully for 43 commands with 0 errors
<rue_shop2> shutdown command invoked
<PaulFertser> What did you change?
<rue_shop2> RUNTEST 1300000 TCK; to RUNTEST 2300000 TCK;
<rue_shop2> maybe the time units aren't the same between whats intended and whats implemented?
<PaulFertser> The time units are in JTAG clock periods and it sets the frequency at the start of the file.
<rue_shop2> hmm
<rue_shop2> hahahahahahahaha
<rue_shop2> ok so its programming ok
<rue_shop2> but, my led polarity isn't what I coded for..
<rue_shop2> I'm back to simple problems
<rue_shop2> er, I think anyhow
<PaulFertser> If you figure out the reason for insufficient runtest number please do not forget to share.
<rue_shop2> biab, I need to check if supper is 100% charcoal yet
thinkfat has joined #openocd
<rue_shop2> yay, I have a 1Hz led!
<PaulFertser> Great
thinkfat has quit [Ping timeout: 252 seconds]
<rue_shop2> 1 moment
<rue_shop2> :)
rudar has joined #openocd
<PaulFertser> Twitter is odd. I can read it when needed via nitter.snopyta.org but still odd.
flatmush has quit [Ping timeout: 265 seconds]
flatmush has joined #openocd
clever has quit [Ping timeout: 252 seconds]
clever has joined #openocd
akaWolf has quit [Ping timeout: 240 seconds]
<PaulFertser> For everybody's information, normally texinfo HTML docs are built and uploaded to the server (to be available via the Internet with a web browser) automatically each Monday, not on every commit merged to master.
akaWolf has joined #openocd
Hawk777 has joined #openocd
thinkfat has joined #openocd
unrznbl has joined #openocd
unrznbl has quit [Client Quit]
unrznbl has joined #openocd
unrznbl has quit [Quit: Client closed]
thinkfat has quit [Ping timeout: 252 seconds]
<borneoa_> PaulFertser: good to know. I thought it was updated at each release only.
<PaulFertser> borneoa_: at each release I manually generate and upload the docs to a separate section.
<PaulFertser> borneoa_: so now both blog posts and master branch html docs are update wrt libera move.
<PaulFertser> Not sure if we should add a new blog post announcing the move?
dliviu has quit [Ping timeout: 240 seconds]
nerozero has quit [Ping timeout: 252 seconds]
dliviu has joined #openocd
joconor has quit [Quit: ZNC 1.8.2 - https://znc.in]
joconor has joined #openocd
thinkfat has joined #openocd
thinkfat has quit [Ping timeout: 272 seconds]
thinkfat has joined #openocd
PaulFertser has quit [Ping timeout: 276 seconds]
rudar has quit [Quit: Leaving]
PaulFertser has joined #openocd
ericonr has quit [Quit: WeeChat 3.1]
ericonr has joined #openocd
thinkfat has quit [Quit: Konversation terminated!]