NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
slobodan has quit [Ping timeout: 268 seconds]
Hawk777 has joined #openocd
tsal has joined #openocd
tsal_ has quit [Ping timeout: 255 seconds]
nerozero has joined #openocd
zear has quit [Read error: Connection reset by peer]
zear has joined #openocd
MGF_Fabio has joined #openocd
MGF_Fabio has quit [Client Quit]
MGF_Fabio has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
MGF_Fabio has quit [Quit: Konversation terminated!]
MGF_Fabio has joined #openocd
slobodan has joined #openocd
jakab922 has joined #openocd
jakab922 has quit [Ping timeout: 255 seconds]
vampirefrog has quit [Remote host closed the connection]
vampirefrog has joined #openocd
jakab922 has joined #openocd
Hawk777 has joined #openocd
Guest94 has joined #openocd
<Guest94> Anyone know to enable/add the "dump_image" command?  I'd like to add it for my target, but can't find an example cfg to use as a starting point
<Guest94> According to this site, the ath79 has dump_image, yet I can't find where it's implemented : https://riverloopsecurity.com/blog/2021/07/hw-101-jtag-part3/
Haohmaru has quit [Quit: saionara]
<Hawk777> It’s not target-specific. It’s a regular command that works on all targets. It should work as long as OpenOCD knows how to access the memory at the address you’re trying to dump, which means either that memory is RAM, or you have a Flash driver set up.
<Hawk777> Actually, if it’s on-chip Flash which is mapped into the address space in hardware, you probably don’t even need a Flash driver set up for read-only access.
<Guest94> The target is Microchip's SmartFusion2  (Cortex-M3), and Eclipse is able to flash the NVM using OpenOCD, but when I try the dump_image it says it's unknown command
<Hawk777> Is it using some really ancient version of OpenOCD? I don’t know when that command was added. And, to clarify, it’s using plain dump_image, not “some_other_prefix dump_image”, right?
<Guest94> Kinda old maybe "Open On-Chip Debugger 0.10.0+dev-00859-g95a8cd9b5-dirty (2020-10-21-21:19)".. and yes, the command is just --command dump_image
<Guest94> And it's not listed when doing OpenOcd --help.   Since there's a cfg file to write to memory.. would I need to create my own cfg / dump_image version?
MGF_Fabio has quit [Ping timeout: 268 seconds]
<Hawk777> --help doesn’t list all commands since there are hundreds of them, it only lists the command-line parameters.
<Hawk777> Version doesn’t look like the problem. It should have been in since 0.1
<Hawk777> Are you passing the parameters, with proper quoting, e.g. <openocd -c "init ; dump_image /path/to/output.bin 0x1234 0x5678"> or whatever?
<Guest94> I think so, but what is 'init'?    before doing the dump_image file  addr len,  I verify that I'm connected to the server and that the target is reset
<Guest94> Would init be a cfg file that does the same thing?
<Hawk777> You said you were using --command, which is a command-line option to OpenOCD; if you’re passing a command-line option, you can’t be connected already, because OpenOCD isn’t running yet. Are you passing options on the command line, or are you connecting via Telnet?
<Hawk777> The “init” command tells OpenOCD to switch from configuration mode to runtime mode. Normally it runs automatically after any config files and command line --command options have finished, so that commands you send over Telnet are interpreted in runtime mode. However you can also include “init” in a --command option, if you want additional commands passed via --command to work in runtime mode instead of configuration mode.
<Hawk777> There are some commands that only work in one mode or the other—I think most commands that access the target probably only work in runtime mode, while most commands that configure the chain (i.e. set up which targets exist and their properties) only work in configuration mode.
<Guest94> I'm using the command line.. doing one command at a time.   So maybe that's the issue?  it connects to the server, but when the command finishes, my next command of dump_image goes nowhere?
<Hawk777> What do you mean by “connects to the server”?
<Guest94> I pass the same cfg file that Eclipse is using.  Once that OpenOcd command executes with that cfg file, it dumps a bunch of text saying the OpenOCd version, the port that the server is running on, etc.
<Hawk777> Yep.
<Hawk777> And then what do you do?
<Guest94> After that, I execute the openocd --c dump_image .... command.
<Guest94> Maybe they need to be combined?  They can be run individually?
<Hawk777> Ah. Don’t run a second copy of OpenOCD; only one OpenOCD instance can talk to a target at a time. If OpenOCD is already running (as it sounds like it is), what you want to do is telnet into the port indicated for the telnet port, and then enter commands there (without --command).
<Guest94> Not sure it matters, but the second time I execute openocd, it's without the cfg file that I do first.. I only do the dump_image part.
<Hawk777> Then it won’t have any targets to talk to at all. One instance of OpenOCD doesn’t talk to another instance; OpenOCD is *only* the server half, it’s not also a client for itself.
<Guest94> Thanks, that's got to be the problem.  I'll try the openocd cfg, then telnetting to do the dump.   Thank you much for the help!!
<Hawk777> Good luck!
Guest94 has quit [Quit: Client closed]
nerozero has quit [Ping timeout: 240 seconds]
gzlb has quit [Ping timeout: 256 seconds]
gzlb has joined #openocd
Foxyloxy_ has quit [Read error: Connection reset by peer]
Foxyloxy has joined #openocd
c4017 has joined #openocd
<c4017> I'm working with STM32MP15 (Cortex-A7 plus Cortex-M4 in one chip). The built in stm32mp15x.cfg file worked, but how can I select which core I debug? By default it looks like the A7 core is being debugged, but I need to debug the M4
<PaulFertser> c4017: another GDB port is +1
<PaulFertser> Each non-SMP target created by config gets a dedicated GDB server.
<PaulFertser> For telnet interface you can select current target with the "targets" command.
zjason`` has joined #openocd
<c4017> oh cool, that worked! Thanks
<PaulFertser> Welcome :)
zjason` has quit [Ping timeout: 264 seconds]
slobodan has quit [Ping timeout: 246 seconds]
jakab922 has quit [Ping timeout: 256 seconds]
Kerr has joined #openocd
c4017 has quit [Quit: Client closed]