NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
debugging has joined #openocd
debugging has quit [Client Quit]
crabbedhaloablut has joined #openocd
erhankur has joined #openocd
erhankur has quit [Ping timeout: 255 seconds]
nerozero has joined #openocd
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
irl25519 has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
Hawk777 has quit [Quit: Leaving.]
irl25519 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
irl25519 has joined #openocd
Haohmaru has joined #openocd
Haohmaru has quit [Ping timeout: 245 seconds]
Haohmaru has joined #openocd
irl25519 has quit [Quit: Textual IRC Client: www.textualapp.com]
tsal has quit [Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in]
tsal has joined #openocd
tsal has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Read error: Connection reset by peer]
erhankur has joined #openocd
merethan has joined #openocd
merethan_ has joined #openocd
erhankur_ has joined #openocd
erhankur has quit [Ping timeout: 246 seconds]
renrelkha has quit [Quit: bye]
renrelkha has joined #openocd
<dormito> PaulFertser: a brief set of logs: https://bpa.st/4NQA for the tap enable/disable failures
<dormito> and the config file I'm using: https://bpa.st/IZ6Q
<dormito> ah yeah, looks like I just needed to throw on a configure with an empty event to disable (I asusme it's the same for enable)
erhankur has joined #openocd
erhankur_ has quit [Read error: Connection reset by peer]
vfazio has quit [Read error: Connection reset by peer]
vfazio has joined #openocd
<PaulFertser> dormito: he
<PaulFertser> dormito: hm, that might be a bug worth fixing then.
<dormito> Hmmm. should jtag_tap_handle_event()'s "switch (e)" statement be moved outside of the loop then?
<dormito> I think I have the "big IR" working. However loading the value NXP specified seems to just go into bypass (which is what ADIv6 says should happen for a reserved IR value). So either NXP omitted some details, or there's something I'm missing (but at this point seems to be out of scope for openocd)
<PaulFertser> dormito: BYPASS JTAG instruction is fixed for any JTAG tap, and in BYPASS the DR length is always 1.
<PaulFertser> dormito: my other guess is that IR length is really 4 not 8 and the script by NXP works by pushing unrelated 4 bits first.
<dormito> PaulFertser: yeah. if I send a non-zero value in (after sending the given instruciton), I get the value sent in left shifted by 1
<dormito> reading NXPs comments, it seems it should read a 64 bit register (that wouldn't make sense to it to be all zeros). but whats on the that page seems to be all the docs NXP publishes for it. So I may have to see if I can get ahold of someone at NXP
<PaulFertser> dormito: probably there's something else in the JTAG chain of the dev board which NXP had in mind?
<dormito> I double checked the schematics this morning: they say it's just connected traight to the header. And I checked the CPLD (which they sometimes call an FPGA), it has it's own jtag header.
indy has quit [Ping timeout: 255 seconds]
indy has joined #openocd
<PaulFertser> dormito: script mentioned in https://openocd.org/beyond_simple_debugging.html probably could detect DR length for any given IR.
erhankur_ has joined #openocd
erhankur has quit [Ping timeout: 246 seconds]
merethan_ has quit [Remote host closed the connection]
merethan_ has joined #openocd
<dormito> nice, thanks
<PaulFertser> dormito: I wrote it long time ago and didn't polish enough to be happy to upstream it, sorry. But I can answer questions about it.
<PaulFertser> I clearly remember I wanted to implement something like "discovery" in urjtag where it probes all possible IR values and prints DR length for them. Probably I did, can't remember.
<PaulFertser> dormito: also for this testing I suggest you rely on tap autodetection, without loading any target config at all.
<dormito> ah, I didn't even know about autodetect (just looked it up an tried it. Makes life a lot easier)
<PaulFertser> dormito: I guess autodetect shows you just one tap with 4 bits IR, right?
<PaulFertser> Guess the NXP docs are somehow incorrect.
<dormito> yeah, 1 tap, 4 bits
<dormito> and I am using NXP's RDB, so there shouldn't be any difference in the device I'm testing vs what their docs are written against :/
<PaulFertser> Is there probably any remote chance to test their ccs or whatever they call it?
<PaulFertser> Probably capturing exchange with a logic analyser.
<dormito> that seems to be their codewarrior's TCL interface. It might be possible, I 'm not too sure. I think you can get an evaluation code warrior licesnse, but I haven't looked too closely at any restrictions.
<PaulFertser> Many years ago I asked Freescale FAE for help and that was very fruitful, he looked through OpenOCD DRAM init code and showed me the error. Even though they didn't support OpenOCD and probably he was seeing it for the first time.
<PaulFertser> But that was when i.MX25 was a useful thing.
erhankur_ has quit [Remote host closed the connection]
<dormito> yeah, I'm going to see if I can get in touch with an NXP rep (and hopefully an FAE)
<silurian_invader> my experience with NXP reps is that they want to sell you code warrior :)
<dormito> that is somewhat my fear
<PaulFertser> dormito: have you tried checking DR lengths for all possible 4 bit IRs?
slobodan has joined #openocd
<dormito> I haven't done that. Its a good idea though.
<PaulFertser> dormito: that script has a function to do that.
<dormito> Hmm. could probably do that by hand. the ADI specifies 2 that it USEs and serves several for other things (Boundary scapn, IDCODE, BYPASS, etc). So the the remainder is fairly small
<dormito> Hmmm. Maybe I missed something. is the bsr.tcl script publically avaialbe?
<PaulFertser> dormito: yes, that youtube video mentions the repository
<PaulFertser> Can't find it right atm
<PaulFertser> olerem renamed it and so I failed to find it in the logs
<PaulFertser> dormito: it has "probe_instructions" proc, already written for you :))
<dormito> Ah nice
<dormito> I hadn't really looked at the questions slide screen (which is where I think the url is)
Haohmaru has quit [Ping timeout: 240 seconds]
erhankur has joined #openocd
HelloShittyAlt has quit [Ping timeout: 272 seconds]
erhankur has quit [Ping timeout: 255 seconds]
<PaulFertser> dormito: so what does it print?
nerozero has quit [Ping timeout: 255 seconds]
<dormito> PaulFertser: ah sorry, had to take care of some stuff. I'll have to check the script tomorrow.
<PaulFertser> np, sorry for not mentioning it before
<dormito> regarding the tapenable/disable. It looks to me like moving the switch in jtag_tap_handle_event out of the for loop would fix it. And, to me, it doesn't look like the switch statement is actually tied to the specific event handlers (just the events them selves).
<dormito> does that sound about right, or am I missreading the function?
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
<PaulFertser> dormito: I have no idea, I probably never touched that code
<dormito> ah ok
atmelwoes has joined #openocd
<atmelwoes> Hi everyone. I am looking for some help using openocd inside WSL2. openocd exits with an error "unable to find a matching CMSIS-DAP device". I'd love to get some help. My steps are detailed in the following pastebin https://pastebin.com/raw/LcUcgvJN
<PaulFertser> Hi
<PaulFertser> atmelwoes: does WSL2 support any kind of USB pass through now? I thought only USB IP was an option.
<PaulFertser> atmelwoes: but if you're running a windows host why not run a native windows openocd?
bvernoux has joined #openocd
<atmelwoes> I am building my code and wish to debug and upload it to the board in a reproducible environment. The final goal is to run it all inside a container from within WSL2, but first I'd like to troubleshoot why WSL2 itself cannot communicate with the programmer.
<PaulFertser> atmelwoes: WSL2 is a VM, right? It's like a limited Hyper-V guest essentially?
<atmelwoes> USB-IP is the recommended way by Microsoft to connect USB devices to WSL2 https://learn.microsoft.com/en-us/windows/wsl/connect-usb
merethan_ has quit [Ping timeout: 246 seconds]
merethan has quit [Ping timeout: 240 seconds]
<PaulFertser> atmelwoes: hm, I might see what's happening there.
<PaulFertser> atmelwoes: is that a self-built openocd binary?
<PaulFertser> atmelwoes: it looks like it was built without "hidapi" support, can you show output from configure please?
<atmelwoes> No, it is not self-built. I am using openocd from Alpine, as my WSL2 distribution is Alpine. I've tried running WSL2 with Ubuntu LTS 22.04 getting the same result.
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
<PaulFertser> atmelwoes: ok, is there a chance alpine is building it without hidapi? Can you show "ldd $(which openocd)"?
<PaulFertser> atmelwoes: try adding "cmsis_dap_backend hid" after sourcing the adapter config.
<atmelwoes>         /lib/ld-musl-x86_64.so.1 (0x7f33a3c5d000)
<atmelwoes>         libftdi1.so.2 => /usr/lib/libftdi1.so.2 (0x7f33a38fd000)
<atmelwoes>         libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x7f33a38e4000)
<atmelwoes>         libhidapi-hidraw.so.0 => /usr/lib/libhidapi-hidraw.so.0 (0x7f33a38dd000)
<atmelwoes>         libjaylink.so.0 => /usr/lib/libjaylink.so.0 (0x7f33a38cc000)
<atmelwoes>         libjim.so.0.82 => /usr/lib/libjim.so.0.82 (0x7f33a3885000)
<atmelwoes>         libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f33a3c5d000)
<atmelwoes>         libudev.so.1 => /lib/libudev.so.1 (0x7f33a3865000)
<atmelwoes>         libssl.so.3 => /lib/libssl.so.3 (0x7f33a37df000)
<atmelwoes>         libcrypto.so.3 => /lib/libcrypto.so.3 (0x7f33a33cc000)
<atmelwoes>         libz.so.1 => /lib/libz.so.1 (0x7f33a33b2000)
<atmelwoes> Here is the output after adding cmsis_dap_backend hid   https://pastebin.com/raw/Q1cya8y1
<PaulFertser> atmelwoes: I think this helps. Your hidapi library can only access the devices via "hidraw" kernel interface.
<PaulFertser> So device nodes like /dev/hidraw0 should be created if the kernel supports it.
<atmelwoes> So I need to recompile the kernel with CONFIG_HIDRAW as well? Any other config options required?
<PaulFertser> atmelwoes: I think no, that should be enough
<PaulFertser> Or you can probably use hidapi with libusb backend if your distro offers that.
<atmelwoes> Okay, thank you. I will compile the kernel and get back with the results. I will try it right now.
<PaulFertser> When I packaged for OpenWrt I compiled and tested libhidapi-libusb but it was a minimal testing.
<atmelwoes> Here's the result after compiling the kernel with both HIDDEV and HIDRAW https://pastebin.com/raw/uia9nRsu
<atmelwoes> after adding transport select swd, openocd seems to initialize properly. Here's the result: https://pastebin.com/raw/A7wr9qLr
irl25519 has joined #openocd
Matthias48 has joined #openocd
<Matthias48> Hi, is there anyone here with knowledge about the gerrit review system?
<PaulFertser> Matthias48: hi
<PaulFertser> Matthias48: I can try to help with it, yes.
<PaulFertser> atmelwoes: you also need to source a specific target config for that to be meaningful.
<Matthias48> When I look into my dshboard I see two changes in the group "Your turn", but I'm not knowing what I can do for it.
BuldiBaerBeer has joined #openocd
BuldiBaerBeer has quit [Client Quit]
BuldiBaerBeer has joined #openocd
<PaulFertser> Matthias48: hold on
BuldiBaerBeer has quit [Client Quit]
<Matthias48> OK. And when a change is in status "Ready" does this means that it will be merged in the next days? Will this be done automatically?
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
<PaulFertser> Matthias48: re https://review.openocd.org/c/openocd/+/7936 , I think it shouldn't be showing "your turn" because it has no unresolved comments. It has +2 so it means that the maintainers will submit it likely the next weekend.
<PaulFertser> Matthias48: https://review.openocd.org/c/openocd/+/7938 this has +1 but I think Antonio is just waiting as probably someone else might want to review too. So nothing to do from your side for now.
<PaulFertser> Matthias48: if it gets stuck for too long (like 3 weeks nothing is happening in that state) please feel free to ping here on IRC or on the mailing list.
<Matthias48> PaulFertser: Thank you. That's all for the moment I want to know.
<PaulFertser> Matthias48: thank you for contributing!
<PaulFertser> Matthias48: btw, is that still the case that you link against proprietary DLL on windows for that adapter?
<Matthias48> No, I've removed the dependency for the proprietary DLL on windows. I'm only using the libusb for that adapter for both: Linux and Windows.
<Matthias48> I've also fixed a bug that prevented the driver working with more than one TAP. Now it can work also with a dual core ESP32 which has two TAPs.
<PaulFertser> Matthias48: great, thank you.
<PaulFertser> Matthias48: please ping me if you have any issues with Gerrit, I'll try to help as soon as can.
<Matthias48> PaulFertser thank you for the offer.
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
<atmelwoes> PaulFertser I am now able to develop and debug inside a container created inside WSL2. Your support has been so helpful!
<PaulFertser> atmelwoes: glad to hear! :)
Matthias48 has quit [Quit: Client closed]
irl25519 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
irl25519 has joined #openocd
irl25519 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
noarb has quit [Ping timeout: 272 seconds]
bvernoux has quit [Read error: Connection reset by peer]
slobodan has quit [Ping timeout: 258 seconds]
erhankur has quit [Remote host closed the connection]
crabbedhaloablut has quit []
erhankur has joined #openocd
noarb has joined #openocd
wingsorc has joined #openocd