NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
Hawk777 has joined #openocd
nerozero has joined #openocd
PlasmaHH has joined #openocd
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
gzlb has joined #openocd
Deneb has joined #openocd
<PlasmaHH> is there any setting or so that when openocd cannot read some memory it will tell gdb instead of returning 0 ? with other debuggers and on the host I get nice errors for these cases...
<PaulFertser> PlasmaHH: hm, are you sure it's returning 0 ?
<PaulFertser> PlasmaHH: it's not normal, please use some pastebin to show the logs.
<PlasmaHH> PaulFertser: absolutely ... x on any address thats not mapped or otherwise inaccessible is returning 0
<PaulFertser> PlasmaHH: on what target?
<PaulFertser> PlasmaHH: and what does "mon mdw" for that address say?
<PlasmaHH> PaulFertser: Failed to read memory at 0x05536364\nProtocol error with Rcmd
<PaulFertser> PlasmaHH: hm, odd, so can you do "set debug remote 1" and re-run "x" for that address and show both what GDB and what OpenOCD says?
<PlasmaHH> PaulFertser: is there a possibility that the support for this particular stlink debugger is at fault? I am using a patch from ST for it
<PaulFertser> PlasmaHH: damn that's nasty indeed, thank you for reporting.
<PlasmaHH> openocd only says Failed to read memory, I guess I would need some debug settings for it too?
<PaulFertser> PlasmaHH: no, looks not adapter specific at all.
<PaulFertser> PlasmaHH: you can run "openocd -d3", yes, that alone would show everything that's of interest properly.
<PlasmaHH> in case its intresting, I have git commit eebcf3cff plus that st patch
<PlasmaHH> PaulFertser: https://paste.opensuse.org/pastes/45896a0a6521 for the x command
<PaulFertser> PlasmaHH: the last one is perfect
<PaulFertser> PlasmaHH: do you feel like creating a bug report on SF.net so that it's not forgotten?
<PlasmaHH> sure, you don't happen to have direct link to the project page? ;)
<PaulFertser> :)
<PlasmaHH> ( I am not going through a rant on how the content proxy at the company somehow blocked the search )
<PlasmaHH> PaulFertser: https://sourceforge.net/p/openocd/tickets/406/ hope that has everything necessary
<PaulFertser> PlasmaHH: thank you!
<PlasmaHH> this problem is extremely annoying because I usually have a mechanism in place in my gdb plugin that automatically creates me a blacklist for memory that is not accessible, mostly because there are some peripherals that you cannot read, otherwise the chip locks up
<PaulFertser> Sure thing!
<PaulFertser> PlasmaHH: oh shit, there's an undocumented command to fix the behaviour: gdb_report_data_abort
<PaulFertser> Documented command.
<PaulFertser> PlasmaHH: so do "gdb_report_data_abort enable"
<PlasmaHH> PaulFertser: arguably that should be the default behaviour
<PaulFertser> PlasmaHH: yeah, if you can try stack traces with that enabled; probably it was meaningful only back in 2008.
<PaulFertser> PlasmaHH: once you try doing everything you normally do, and stack traces and probably stack traces from inside ISR handlers, and everything works, please just add to the ticket that the default behaviour should be flipped.
<PlasmaHH> PaulFertser: no problems with stack traces with that enabled... I also can't think of a case where it would be a problem ...
<PlasmaHH> in all the months with this project now I have never encountered any problem with the jtrace probe which reports that back to gdb, so if must be rather rare I guess
<PaulFertser> PlasmaHH: guess was fixed since 2008, yes.
<PlasmaHH> PaulFertser: getting an internal server error for that one from here... sigh
<PaulFertser> PlasmaHH: hence my wording
<PlasmaHH> now the one other thing that would really round off my detection code is if there was a way openocd notifies me within gdb about when the connection to the chip is lost...
<PaulFertser> PlasmaHH: does that work with jlink gdb server?
<PlasmaHH> PaulFertser: no, unfortunately not
<PlasmaHH> haven't found any that does it, sadly
<PlasmaHH> Usually you only notice when stuff throws errors all over the place ;)
<PaulFertser> PlasmaHH: but you want it while the target is halted or running?
<PaulFertser> OpenOCD doesn't poll halted target.
<PlasmaHH> PaulFertser: let me get a wider picture... so when I do e.g. x/i 0xe0040000 then I (now) get a failed read, and openocd seems to detect that something is wrong: https://paste.opensuse.org/pastes/1f17cb9fef86
<PaulFertser> PlasmaHH: yep, probably after a failing read you can check output from "mon targets"? If that doesn't have any indication, I can try to check if there's anything else that can report that target isn't available atm.
<PlasmaHH> PaulFertser: state changes to unknown... thats not as good as any "event" type direct message to gdb but far better than nothing ( maybe the gdbserver protocol doesn't even have anything, don#t know )
<PaulFertser> PlasmaHH: so at least you have a workaround now, good.
<PlasmaHH> PaulFertser: yeah, thanks, nothing is more annoying than lots of stuff suddenly not working and not kowing why.... also hate it when chips lock up just by reading something ;)
<PaulFertser> Indeed!
<PlasmaHH> and some debugging tool manufacturers say something along the line of "well, its their fault, tell them to fix it" ... yep, great idea
bohdan-tymkiv has joined #openocd
defiant has joined #openocd
<PlasmaHH> now I just need some proper hardware to use the etm trace features and get that somehow into my gdb plugin ;)
slobodan has joined #openocd
<PaulFertser> PlasmaHH: orbtrace
<PlasmaHH> PaulFertser: seems like they're out of stock at places where they are sold :/
<PaulFertser> PlasmaHH: ask zyp on ##stm32 directly
<PlasmaHH> PaulFertser: oh nice, yea
<PlasmaHH> PaulFertser: end goal is to have some somewhat convenient way to combine instruction trace and power consumption...
<PaulFertser> PlasmaHH: would be great to have
<PlasmaHH> PaulFertser: segger jtrace promises to do that, but besides their current measurement being very noisy, their tooling sucks and their support flips you the bird... stlink brought out a nice thing for current measurement, unfortunately no tracing, but that made me think of maybe combining two dedicated devices for that purpose
bohdan-tymkiv has quit [Quit: Client closed]
defiant has quit [Quit: defiant]
PlasmaHH has quit [Ping timeout: 250 seconds]
PlasmaHH has joined #openocd
slobodan has quit [Quit: Leaving]
slobodan has joined #openocd
PsySc0rpi0n has quit [Ping timeout: 252 seconds]
noarb has quit [Ping timeout: 264 seconds]
PlasmaHH has quit [Ping timeout: 250 seconds]
noarb has joined #openocd
vfazio has joined #openocd
Haohmaru has quit [Ping timeout: 260 seconds]
nerozero has quit [Ping timeout: 240 seconds]
peepsalot has joined #openocd
Deneb has quit [Quit: Leaving]
PaulFertser has quit [Ping timeout: 240 seconds]
zjason` has joined #openocd
zjason has quit [Ping timeout: 264 seconds]
PaulFertser has joined #openocd
<aisha[m]> hey all, I finally got the wires needed for connecting my orange pi 5 to the jlink but I'm not sure what wires to connect it to, is there anyway to know how to connect to the device by which pins in the gpio?
slobodan has quit [Ping timeout: 252 seconds]