NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
joconor has quit [Quit: ZNC 1.8.2 - https://znc.in]
joconor has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Hawk777 has joined #openocd
nerozero has joined #openocd
guestinator has quit [Remote host closed the connection]
guestinator has joined #openocd
<gamiee> Hi PaulFertser: yeah I noticed this behavior after I removed bunch of "mem" stuff in my gdb init file.
<gamiee> What I am surprised is that when "load" is issued, gdb most likely issues reset. What I know is that Flash is not configured properly. Sadly, since chip is already probed, the init which is in probe function doesn't trigger, thus Flash functions are executed without flash being initialized at all.
<gamiee> Should I re-initialize Flash on every flash action or how this should be handled?
guestinator has quit [Remote host closed the connection]
guestinator has joined #openocd
akaWolf has quit [Ping timeout: 252 seconds]
<PaulFertser> gamiee: by default "load" should lead to flasherase command which in OpenOCD by default does "reset init" which is the established way to prepare for flashing.
Haohmaru has joined #openocd
<gamiee> PaulFertser: ah okay! good, so that explains why chip is reset. So this leads me to the another question, where I should initialize flash then? I would expect that reset init also calls probe again.
akaWolf has joined #openocd
<PaulFertser> gamiee: hm, no, flash probing happens just once per session, either after explicit "flash probe" command or by auto-probing via any flash operation.
Hawk777 has quit [Quit: Leaving.]
<gamiee> PaulFertser: so when I should be initializing the flash? In auto-probe routine?
<gamiee> Or in every flash related function ?
<gamiee> the probing only once per session makes sense, that's good. But sadly, even when I tried to inspire from other flash bank drivers, I did not figured out where they initialize flash.
<PaulFertser> gamiee: I think in the probe function you should do everything needed to basically provide good output for "flash info 0" command but you can not count on hardware state to persist later. What you should be able to count on is that flash functions are called after "reset init", that is, "reset halt" and then the reset-init Tcl hook executed.
<PaulFertser> gamiee: most flash controllers do not require any kind of explicit initialisation.
<gamiee> PaulFertser : that
<gamiee> oops :D
<gamiee> That
<gamiee> aaaaa
<gamiee> That's strange, for BL602/BL702 etc., I need to init GPIOs for flash (both internal and external flashes are connected through gpio) and also configure some basic information, like if it's QSPI or SPI, delays etc. Without this configuration, every flash command fails.
<gamiee> From this, it seems that I should rather initialize flash on every action, or dunno. :/
<gamiee> Any ideas what would be best to do please?
joconor has quit [Ping timeout: 252 seconds]
joconor has joined #openocd
<PaulFertser> gamiee: I might be able to some example in the code base but no promises.
<gamiee> PaulFertser: OK thanks. Well, in worst case, I will just initialize it always, or do some detection.
<PaulFertser> gamiee: you can see from e44539d66c8929679321704768125df9ba7d5f67 that stm32 qspi interface init is all handled in board config files (as it's board specific) in reset-init handler.
<gamiee> ohh wait, so I should do flash init in TCL rather in flash bank driver? :O
<PaulFertser> gamiee: well, sometimes for some targets
<gamiee> well, I would love to keep it in driver :D like I can still call custom function from driver for that.
<gamiee> through TCL.
<gamiee> This reminds me I want to also improve reset mechanism, but I need to run algorithm, what is possible only from C as far as I know... So that's another thing i am not sure how I should do properly :D
Haohmaru has quit [Read error: Connection reset by peer]
Ha0hmaru has joined #openocd
Ha0hmaru is now known as Haohmaru
HelloShitty has joined #openocd
guestinator has quit [Ping timeout: 256 seconds]
guestinator has joined #openocd
guestinator has quit [Remote host closed the connection]
guestinator has joined #openocd
joconor has quit [Quit: ZNC 1.8.2 - https://znc.in]
joconor has joined #openocd
Haohmaru has quit [Quit: saionara]
zjason` has joined #openocd
zjason has quit [Ping timeout: 252 seconds]
<gamiee> is 100 KiB/s speed of flash writing fast? :D
<PaulFertser> Yes, quite fast
<gamiee> glad to hear that! Now to verify the integrity of file I flashed :D
rkta has left #openocd [#openocd]
<gamiee> yep, data are the same, yay!
<gamiee> And the speed mostly depends on JTAG speed, I increased JTAG Speed and got even 140 KiB/s
nerozero has quit [Ping timeout: 252 seconds]
zjason`` has joined #openocd
zjason` has quit [Ping timeout: 252 seconds]
mithro has quit [Ping timeout: 244 seconds]
NishanthMenon has quit [Ping timeout: 252 seconds]
dnm has quit [Ping timeout: 252 seconds]
mithro has joined #openocd
ringo has quit [Ping timeout: 252 seconds]
NishanthMenon has joined #openocd
dnm has joined #openocd
ringo has joined #openocd
ringo is now known as Guest1414
wmat_ has joined #openocd
wmat has quit [Ping timeout: 246 seconds]