NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
jancoow has quit [Quit: The Lounge - https://thelounge.chat]
russ has quit [Ping timeout: 252 seconds]
jancoow has joined #openocd
Hawk777 has joined #openocd
infisc has joined #openocd
infisc has left #openocd [#openocd]
nerozero has joined #openocd
en-sc has joined #openocd
en-sc has quit [Remote host closed the connection]
Hawk777 has quit [Quit: Leaving.]
lxsameer has joined #openocd
Foxyloxy has quit [Read error: Connection reset by peer]
<gamiee> Hi, well, I am dealing with something very strange... again. After reset, when JTAG chain examination is being done, the ID code returned by chip is good. But after just resetting OpenOCD, when the JTAG chain examination runs again... The IDcode is different. Any ideas what this could be?
<antto> is it FF or 00?
<gamiee> Instead of 0x10000B6F, it's 0x04400000000
<gamiee> although, during scan, I notice that there is no IR update
<PaulFertser> gamiee: yes, after JTAG state machine reset the standard says IR should be pre-loaded with IDCODE instruction.
<gamiee> PaulFertser: it seems on T-Head cores this is not case. Else I do not know how to explain current behavior
<PaulFertser> gamiee: sometimes vendors do very odd things
<PaulFertser> gamiee: is it the same for you both with and without physical TRST?
<gamiee> PaulFertser: The chip (BL618) does not support physical TRST
<PaulFertser> OK
<PaulFertser> So OpenOCD should be doing TestLogicReset state transition then reading DR should be giving IDCODE if the hardware is sane.
<gamiee> I see OpenOCD is triggering TestLogicReset. But, hardware is not outputting the IDcode, but some garbage. (I am checking this with logic analyzer)
<PaulFertser> gamiee: otoh there's no standard IDCODE number, so OpenOCD can't know what to use there.
<gamiee> PaulFertser: exactly... sigh
<PaulFertser> So it's not like OpenOCD is not loading it on startup but loading after reset.
<PaulFertser> It has to count on the target in both cases.
<PaulFertser> And it should be all absolutely independent from CPU core etc.
<gamiee> I am going to check what CK-Link does
<gamiee> PaulFertser : Of course, first thing which CK-Link does is shift data to IR....
<gamiee> Question is, can I do something like that on OpenOCD?
<gamiee> I can override jtag_init I presume
<PaulFertser> gamiee: well, OpenOCD also does when it autodetects and verifies IR tap lengths on the chain.
<gamiee> PaulFertser : yeah... :/
<gamiee> one of options would be to override jtag_init, set IR code, and then run default jtag arp_init
<PaulFertser> gamiee: I see you're now forced to dig elbow deep into JTAG when all you wanted was OCD, heh.
<gamiee> PaulFertser : hahahaha yeah, seems there is no other way... :(
<PaulFertser> gamiee: but how can it be possible for OpenOCD to get the right codes after reset then?
<PaulFertser> Is full target reset pre-loading IDCODE while TLR does not, is that the difference?
<gamiee> PaulFertser : exactly what you said. Chip reset is pre-loading IDCODE into IR, but TLR does not.
<PaulFertser> Silly vendor :/
lxsameer has quit [Ping timeout: 252 seconds]
<gamiee> PaulFertser : it seems that vendor is T-Head
<gamiee> PaulFertser : Setting IR to IDCODE manually before solved the issue... sigh
<PaulFertser> gamiee: tricky :/ but well, at least this workaround works.
<gamiee> PaulFertser: yeah, but the workaround is kinda ugly honestly :(
<PaulFertser> gamiee: irscan should be inside if too.
<PaulFertser> And runtest
<gamiee> PaulFertser: ah yeah, good note. This was just quick PoC. I wonder if Antonio or someone else will know better way of doing this. Will see
<PaulFertser> Well, ugly vendors require ugly configs.
<PaulFertser> If you document the weird story behind IDCODE preloading there in the comment I guess it should be fine.
<gamiee> PaulFertser: yeah ofc, will try to document it properly. Thanks :)
<borneoa___> gamiee: no, no suggestions for this
<gamiee> borneoa___ : oh, okay, then I will keep it this way. Thanks for the info :)
Foxyloxy has joined #openocd
<gamiee> borneoa___ : thank you for the merge! I am super happy to see it upstreamed :)
<PaulFertser> Yay!
<borneoa___> gamiee: thanks to you for your contribution to OpenOCD
Henry_Nguyen_ has joined #openocd
<marex> does openocd have any way to disable dcache on aarch64 ?
<marex> it should be some sctlr write ...
nerozero has quit [Ping timeout: 252 seconds]
lxsameer has joined #openocd
Henry_Nguyen_ has quit [Quit: Connection closed for inactivity]
lxsameer has quit [Ping timeout: 252 seconds]
zjason has quit [Read error: Connection reset by peer]
zjason has joined #openocd