NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
<Guest11> Hi. I can find no references to it being discussed, but MounRiver/WCH (China...) is distributing a modified OpenOCD without the license and without the source. MounRiver_Studio_Community_Linux_x64_V110 contains COPYING, et. al for GCC, GDB, etc. but it's not clear they modified it. They absolutely modified OpenOCD to support their SWD thing for
<Guest11> their CH32V307 and CH32V103 parts. toolchain/OpenOCD/bin/wch-riscv.cfg shows they've added an 'adapter driver wlink' and support for their flash, but that source isn't offered. Support@ http://mounriver.com/ has refused to offer source.  They're supposed to offer source for GCC, Expat, libz and everything else that's GPLed, but it's not clear they
<Guest11> modified them materially. Without source to their OpenOCD devs, we can't recompile OpenOCD for Pi or Chromebook to load code for their parts. Think the story is the same with thier WCH549 WCH-LINK debugging boards, but there may be RISC-V sauce needed, too. Can you please give them a legal bump to include (and comply with...) COPYING for OpenOCD
<Guest11> and provide working source?
_franck_ has quit [Quit: Ping timeout (120 seconds)]
_franck_ has joined #openocd
tsal has quit [Ping timeout: 240 seconds]
thinkfat_ has quit [Ping timeout: 256 seconds]
thinkfat_ has joined #openocd
tsal has joined #openocd
Hawk777 has joined #openocd
Bertl_oO is now known as Bertl_zZ
Xogium has quit [Quit: Leaving.]
Xogium has joined #openocd
nerozero has joined #openocd
Xogium has quit [Quit: Leaving.]
Xogium has joined #openocd
<PaulFertser> Guest11: hi
<PaulFertser> Guest11: how nasty of them :/
<PaulFertser> Guest11: have you tried contacting them for the source? Unfortunately, I didn't see it published anywhere yet.
<PaulFertser> Guest11: it's not like OpenOCD devs can give anybody a legal bump :(
indy has joined #openocd
LinuxHackerman[m has joined #openocd
Hawk777 has quit [Quit: Leaving.]
LinuxHackerman has left #openocd [#openocd]
Haohmaru has joined #openocd
dliviu has quit [Ping timeout: 246 seconds]
<Haohmaru> so, anything like with "mon xyz" or "monitor xyz" tells gdb to send the "xyz" to the other end (gdb-server (openocd))
<Haohmaru> right?
<PaulFertser> Right
c4017_ has quit [Ping timeout: 250 seconds]
<Haohmaru> "reset halt" uses the chip's RESET pin to externally reset the chip and then tries to prevent it from running its program?
<PaulFertser> Only if reset_config includes srst.
<Haohmaru> what's that?
<PaulFertser> It's a command described in the manual.
<Haohmaru> i'm basically trying to figure out and document those commands i'm copy/pasting around
dliviu has joined #openocd
<Haohmaru> i saw the manual, but i'm trying to explain the commands in a way more dumber language ;P~
merethan has joined #openocd
<karlp> Guest11: I've already been poking patrick at WCH for sources, and asking him again on their discord.
<karlp> he's currently not replied,
<karlp> we've been getting _some_ information regarding the bootloader protocol though, so I have some hopes that this _will_ get resolved, but yes, kinda sucky right now.
<karlp> bright side, it mostly works? :|
<Haohmaru> so i just ran gdb --tui .. it's not bad so far
<Haohmaru> way better than bare CLI
<Haohmaru> it even syntax highlights the code
<karlp> oh, nice, there goes cgbd's reason for life ;)
<rkta> the tui also has different layouts, try 'layout next' or 'la n'
<Haohmaru> this is the kind of thing where you probably wanna put the terminal in a bigger window
<Haohmaru> kewl
<Haohmaru> je suis <optimized out>
Guest11 has quit [Quit: Client closed]
merethan has quit [Remote host closed the connection]
merethan has joined #openocd
Bertl_zZ is now known as Bertl
merethan has quit [Remote host closed the connection]
merethan has joined #openocd
merethan has quit [Remote host closed the connection]
merethan has joined #openocd
dliviu has quit [Ping timeout: 246 seconds]
dliviu has joined #openocd
merethan has quit [Remote host closed the connection]
merethan has joined #openocd
merethan has quit [Remote host closed the connection]
merethan has joined #openocd
emeb has joined #openocd
merethan has quit [Remote host closed the connection]
merethan has joined #openocd
xloem[m] has joined #openocd
kraiskil has joined #openocd
<xloem[m]> Hi #openocd … I’ve been using the flashrom serprog tools to flash plcc32/lpc bios chips to work with coreboot, and I’m running into issues. Is this a problem I could solve with openocd?
kraiskil has quit [Ping timeout: 250 seconds]
Haohmaru has quit []
<PaulFertser> xloem[m]: unlikely, flashrom is the tool to flash memory chips
<PaulFertser> xloem[m]: OpenOCD is handy when you have some FPGA or CPU to control using a debug protocol over JTAG or SWD.
<xloem[m]> ok thanks
merethan has quit [Ping timeout: 240 seconds]
djgl has joined #openocd
Bertl is now known as Bertl_oO
<djgl> Hi, on my (SWD-only) RK3568 board the SRST line also resets the debug logic. Can I tell OpenOCD somehow that it has to reconnect? When I execute "halt" after "reset" all it does is print the DPIDR register. I need to restart OpenOCD to be able to halt the target. reset_config srst_gates_jtag and srst_pulls_trst don't help.
<PaulFertser> djgl: hi
<djgl> hi
<PaulFertser> djgl: usually if it has issues with talking to the target it re-examines it automatically.
nerozero has quit [Ping timeout: 246 seconds]
<PaulFertser> djgl: you can force it manually with $TARGETNAME arp_examine
<PaulFertser> djgl: you can add that to configure -event reset-deassert-post { ... }
<PaulFertser> djgl: and if you prepare a config which works with rockchip reliably it would be nice to see it upstreamed.
<djgl> PaulFertser, arp_examine doesn't help. I see that openocd defers executing arp_examine on the sleeping cores after reset, so I guess it already executes it on the running core.
<PaulFertser> djgl: you can see the current target and the list of all targets with "targets" command.
<PaulFertser> And you should be able to force arp_examine on any of them.
<djgl> PaulFertser, on the other other three cores arp_examine works and prints the number of breakpoints and watchpoints, but I am still unable to halt the cores.
<PaulFertser> djgl: do you select them with "targets" command prior to trying to halt?
<djgl> I use them in an smp configuration. halt tries to halt them all and it works before I execute reset
<PaulFertser> djgl: probably you need to arp_examine all of them after reset before trying another halt.
<djgl> PaulFertser, if I don't use smp, I can halt the other cores after arp_examine
<djgl> Maybe I need more "adapter srst delay"?
<djgl> no...
<djgl> ok, then maybe also -defer-examine the first core...
<PaulFertser> fwiw you can try running OpenOCD with -d3 and see what it does differently on startup compared to manual arp_examine calls you do later.
<PaulFertser> In this case there's also cross-trigger interface involved, probably it's that one that needs some additional examination.
<PaulFertser> djgl: in aarch64_examine you might want to patch out condition after " don't re-probe hardware after each reset "
<PaulFertser> djgl: have you tried instead of using SRST triggering a watchdog reset, does it also reset debug logic?
<djgl> PaulFertser, I'll look into it
<djgl> PaulFertser, new problem: when I -defer-examine the first core and then do arp_examine after reset, I get "Could not find APB-AP for debug access". It works before reset.
<djgl> PaulFertser, thank you for your help. I guess I will spend more time on this this weekend.
<PaulFertser> djgl: my other two ideas might provide more food for thought.
<PaulFertser> djgl: it's clear from the code that first startup is special, so you can easily make it not special.
<PaulFertser> And in case watchdog reset doesn't reset debug then it'd be the best option I guess. And you can trigger watchdog by suitable mdw command or two.
<djgl> PaulFertser, before I connected the SRST line I tried to perform a reset like U-Boot does (write 0xfdb9 to 0xfdd200d4), but it had a similar effect. Also I wanted a way to reset the board that works even when the Cortex-A55 cores no longer respond and Rockchip didn't add a MEM-AP with access to the normal address space.
<djgl> Rockchip also missed the opportunity to use a JTAG-AP to debug the RISC-V on that chip through SWD, but that's another story.
<PaulFertser> djgl: I see. So probably that's another case where OpenOCD needs some special tweak. Good luck with your debugging btw.
<PaulFertser> OpenOCD doesn't support JTAG-AP anyway.
nvmd has joined #openocd
nvmd has quit [Quit: WeeChat 3.5]
nvmd has joined #openocd
wingsorc has joined #openocd
djgl has quit [Quit: djgl]
Steffanx- has joined #openocd
akaWolf has quit [Ping timeout: 240 seconds]
nvmd has quit [Quit: WeeChat 3.5]
sbach has quit [Read error: Connection reset by peer]
sbach has joined #openocd
akaWolf has joined #openocd
Steffanx- has quit [Quit: Connection closed for inactivity]