NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
cp- has quit [Ping timeout: 265 seconds]
tsal_ has joined #openocd
tsal has quit [Ping timeout: 252 seconds]
nerozero has joined #openocd
nerozero has quit [Remote host closed the connection]
nerozero has joined #openocd
rigid has quit [Read error: Connection reset by peer]
rigid has joined #openocd
rigid has quit [Changing host]
rigid has joined #openocd
Haohmaru has joined #openocd
cambrian_invader has quit [Ping timeout: 252 seconds]
cambrian_invader has joined #openocd
muli has joined #openocd
<muli> Hi, 1st here for me. I'm trying to flash an STM32L151 with a Raspi5 via linuxgpiod. I got it working with the JLink-Debugger where I'm erasing the flash via GDB. No I'm trying the same via the GPIOs but I got the following error from "startup.tcl":
<muli> (gdb) monitor reset halt
<muli> Translation from khz to adapter speed not implemented
<muli> Error executing event reset-start on target stm32l1.cpu:
<muli> embedded:startup.tcl:1193: Error:
<muli> in procedure 'ocd_process_reset'
<muli> in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 1193
<muli> [stm32l1.cpu] halted due to debug-request, current mode: Thread
<muli> xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
<muli> As far as I see "startup.tcl" is part of the OpenOCD binary and there are several files called "startup.tcl" but they are shorter than 1000 lines. How do I know where to look for the error. Grep gives me the following (from the source code):
<muli> pi@cm5-pi:~/Documents/openocd $ grep -rn 'ocd_process_reset_inner' *
<muli> src/target/startup.tcl:21:set success [expr {[catch {ocd_process_reset_inner $MODE} result] == 0}]
<muli> src/target/startup.tcl:31:proc ocd_process_reset_inner { MODE } {
<muli> tcl/target/ti_cc3220sf.cfg:26:proc ocd_process_reset_inner { MODE } {
<muli> tcl/target/psoc4.cfg:98:proc ocd_process_reset_inner { MODE } {
<muli> Any help is appreciated.
gpol1 has joined #openocd
gpol has quit [Ping timeout: 276 seconds]
Deneb^ has joined #openocd
Guest64 has joined #openocd
<karlp> muli: what version of openocd, and with what target/board config please?
<karlp> what does openocd say when it connects, before you get gdb involved?
<karlp> with gdb, you should be able to just use "load" without needing any manual reset halt steps.
<PaulFertser> Hm, looks like a regression, linuxgpiod can't set frequency and so reset halt fails.
<PaulFertser> muli: I suggest you comment out all "adapter speed" commands from target/stm32l1.cfg and retry.
Haohmaru has quit [Quit: saionara]
<muli> Version is 0.12.0, The target config is the following: https://pastebin.com/c6B1bee8 it's nearly identical to the stm32l1.cfg but I added the 2nd bank (I know there's stm32l1x_dual_bank.cfg but I made a copy of the configuration to not mess with the original).
<PaulFertser> muli: I suspect there's some regression with adapters that can't set speed
<muli> Config for the Raspi is: https://pastebin.com/Uq0eRpp4 (should be identical to the original one)
<PaulFertser> (or it was never tested
<muli> Ok, I commented out all "adapter speed" comments. Got to plug things back in and see …
<muli> The error is gone and it looks like the reset is working now.
<muli> Thank you.
<muli> Now I got to figure out how to unlock and erase flash memory. The obvious gdb-commands are failing.
<muli> Do you think in general it's a good idea to try this with the GPIOs of the Pi5 or is it a deal breaker to not be able to set the adapter speed and I should stick to some kind of programming adapter?
<karlp> what gdb commands are you using, and how are they failing?
<karlp> also, this is breakage, we should get it fixed.
<muli> For unlocking bank 1 I tried:
<muli> (gdb) monitor stm32lx unlock 1
<muli> SWD DPIDR 0x2ba01477
<muli> Failed to read memory at 0x1ff80008
<muli> STM32Lx unlock failed
<muli> Protocol error with Rcmd
<muli> To erase bank 1 I tried to methods:
<muli> (gdb) monitor stm32lx unlock 1
<muli> SWD DPIDR 0x2ba01477
<muli> Failed to read memory at 0x1ff80008
<muli> STM32Lx unlock failed
<muli> Protocol error with Rcmd
<muli> and
<muli> (gdb) monitor stm32lx mass_erase 1
<muli> [stm32l1.cpu] target was in unknown state when halt was requested
<muli> SWD DPIDR 0x2ba01477
<muli> [stm32l1.cpu] clearing lockup after double fault
<muli> [stm32l1.cpu] external reset detected
<muli> [stm32l1.cpu] halted due to debug-request, current mode: Handler HardFault
<muli> xPSR: 0xa1000003 pc: 0xfffffffe msp: 0x20000f08
<muli> SWD DPIDR 0x2ba01477
<muli> Failed to read memory at 0x1ff80008
<muli> stm32lx mass erase failed
<muli> Protocol error with Rcmd
<muli> If I can help to get this fixed tell me how I may help.
cp- has joined #openocd
muli91 has joined #openocd
<muli91> Hm, should install a proper IRC client.
Guest64 has quit [Ping timeout: 272 seconds]
muli has quit [Ping timeout: 272 seconds]
muli has joined #openocd
muli has left #openocd [#openocd]
muli has joined #openocd
muli91 has quit [Quit: Client closed]
Foxyloxy_ has joined #openocd
gpol has joined #openocd
dliviu has joined #openocd
rigid_ has joined #openocd
jfsimon has quit [Remote host closed the connection]
jfsimon has joined #openocd
juri__ has joined #openocd
akaWolf1 has joined #openocd
jfsimon has quit [Max SendQ exceeded]
gpol1 has quit [*.net *.split]
rigid has quit [*.net *.split]
nerozero has quit [*.net *.split]
nohit has quit [*.net *.split]
juri_ has quit [*.net *.split]
nashpa has quit [*.net *.split]
Foxyloxy has quit [*.net *.split]
Xogium has quit [*.net *.split]
jybz has quit [*.net *.split]
akaWolf has quit [*.net *.split]
akaWolf1 is now known as akaWolf
jfsimon has joined #openocd
muli has quit [Quit: leaving]
nohit has joined #openocd
Xogium has joined #openocd
jybz has joined #openocd
nohit has quit [*.net *.split]
Xogium has quit [*.net *.split]
jybz has quit [*.net *.split]
Xogium has joined #openocd
nohit has joined #openocd
jybz has joined #openocd
jfsimon has quit [Quit: Leaving]
jfsimon has joined #openocd
Deneb^ has quit [Quit: Leaving]