NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
tsal_ has quit [Ping timeout: 252 seconds]
tsal has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
noarb has quit [Client Quit]
Hawk777 has quit [Quit: Leaving.]
noarb has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
diddly has quit [Ping timeout: 245 seconds]
diddly has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
noarb has quit [Quit: ZNC 1.8.2 - https://znc.in]
noarb has joined #openocd
noarb has quit [Ping timeout: 252 seconds]
nerozero has joined #openocd
Hawk777 has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
alkane has quit [Ping timeout: 252 seconds]
alkane has joined #openocd
Deneb has joined #openocd
merethan has joined #openocd
JoseT has joined #openocd
<JoseT> Hi, My openocd code is working well with telnet client for flashing, however on the gdb same image is throwing segmentation fault. I dont have issue in flashing smaller files(~30-50kb), but with bigger images ~200-300kb. I do have a flash size of 512kb. So far couldnt find anything obvious from debugging. Double checked the config files for all
<JoseT> memory definitions and looks good. Does anyone have any siggestions on how to debug this on gdb?
<Haohmaru> files below 64k are okay? any uint16_ts anywhere?
<Haohmaru> can't you run it thru the debugger to see where it crashes?
<Haohmaru> i mean, it turns into debuggeroverflow, but...
<Haohmaru> you're running your own modified openocd, connecting to it thru gdb to it to flash some target, and... openocd crashes when the file is too big?
<Haohmaru> doing the same thru telnet instead of thru gdb doesn't crash?
<JoseT> Its working well when I am using telnet client and use program but fails in gdb when I use load. Same thing happening when I trued running in VS code
<Haohmaru> mmm
<Haohmaru> "program" can be used thru gdb too btw, not that that answers any question.. just saying
<Haohmaru> well, at least i think it can
<Haohmaru> the more familiar folks here shall say something
* Haohmaru hides
<JoseT> I am aware of only load in gdb, but anyway thanks for your suggestions. I will explore more gdb client to interact with OpenOCD.
<JoseT> If there are other suggestions from anyone please do let me know
<Haohmaru> "monitor <xyz>" and the shorter "mon <xyz>" in gdb would send the command <xyz> to openocd
<Haohmaru> thus i'd think "mon program blah.elf" might be legit
Haohmaru has quit [Quit: saionara]
<JoseT> yes, sure, thanks
<JoseT> "mon program blah.elf" this also goes through, but still it fails in vs code /load
JoseT has quit [Quit: Client closed]
JoseT has joined #openocd
JoseT has quit [Client Quit]
JoseT has joined #openocd
JoseT has quit [Client Quit]
JoseT has joined #openocd
Hawk777 has joined #openocd
JoseT has quit [Client Quit]
JoseT has joined #openocd
JoseT has quit [Client Quit]
<PaulFertser> :/ why JoseT left
<PaulFertser> I'd tell to start in GDB and provide "bt all"
<PaulFertser> Also, full log from openocd -d3 crashing.
<antto> i'd guess... "weefee"
mithro has quit [Ping timeout: 260 seconds]
key2 has quit [Ping timeout: 260 seconds]
zapb__ has joined #openocd
dnm has quit [Ping timeout: 260 seconds]
NishanthMenon has quit [Ping timeout: 260 seconds]
Henry_Nguyen_ has quit [Ping timeout: 260 seconds]
Steffanx has quit [Ping timeout: 260 seconds]
Henry_Nguyen_ has joined #openocd
zapb_ has quit [Ping timeout: 260 seconds]
dnm has joined #openocd
mithro has joined #openocd
NishanthMenon has joined #openocd
key2 has joined #openocd
Steffanx has joined #openocd
Deneb has quit [Quit: Leaving]
JoseT has joined #openocd
<antto> JoseT, you missed some messages earlier
<antto> check logs
JoseT has quit [Ping timeout: 240 seconds]
JoseT has joined #openocd
JoseT has quit [Client Quit]
JoseT has joined #openocd
JoseT has quit [Client Quit]
JoseT has joined #openocd
<JoseT> Sorry, I had to step out :)
<JoseT> I couldnt find anything from -d
<JoseT> Debug: 1061 44916 arm_adi_v5.c:1120 dap_put_ap(): refcount AP#0x2 put 0
<JoseT> Debug: 1062 44916 arm_adi_v5.c:1095 dap_get_ap(): refcount AP#0x2 get 1
<JoseT> Debug: 1063 44918 arm_adi_v5.c:1120 dap_put_ap(): refcount AP#0x2 put 0
<JoseT> Segmentation fault
<JoseT> gdb bt shows no stack
<JoseT> 0x00024bca in ?? ()
<JoseT> 
<JoseT> (gdb) load build/zephyr/zephyr.elf
<JoseT> 
<JoseT> Loading section rom_start, size 0x8c lma 0x0
<JoseT> 
<JoseT> Loading section text, size 0x2b434 lma 0x90
<JoseT> 
<JoseT> Loading section .ARM.exidx, size 0x8 lma 0x2b4c4
<JoseT> 
<JoseT> Loading section initlevel, size 0x78 lma 0x2b4cc
<JoseT> 
<JoseT> Loading section device_area, size 0x3c lma 0x2b544
<JoseT> 
<JoseT> Loading section bt_l2cap_fixed_chan_area, size 0x24 lma 0x2b580
<JoseT> 
<JoseT> Loading section bt_conn_cb_area, size 0x20 lma 0x2b5a4
<JoseT> 
<JoseT> 
<JoseT> Loading section k_sem_area, size 0x30 lma 0x31c38
<JoseT> 
<JoseT> Loading section k_fifo_area, size 0x18 lma 0x31c68
<JoseT> 
<JoseT> Loading section net_buf_pool_area, size 0x134 lma 0x31c80
<JoseT> 
<JoseT> Loading section .last_section, size 0x4 lma 0x31db4
<JoseT> 
<JoseT> Loading section .ti_ccfg, size 0x800 lma 0x4e020000
<JoseT> 
<JoseT> Remote connection closed
<JoseT> 
<JoseT> (gdb) bt all
<JoseT> 
<JoseT> No stack.
<JoseT> 
<JoseT> (gdb)
<JoseT> antto PaulFertser
<antto> btw, don't paste such long walls of text directly here, use a pastebin site and paste the link instead
<JoseT> Sorry for that. will do that
russ has quit [Remote host closed the connection]
<cambrian_invader> JoseT: do you have an openocd compiled with debug info?
<cambrian_invader> if you have gotten it from a distro repo, have you installed e.g. openocd-dbg ?
<cambrian_invader> (the package name may be different depening on your distro)
JakeSays is now known as JakeSayss
<JoseT> I havent used openocd-dbg, but thats a good direction for me to check
JoseT has quit [Quit: Client closed]
nerozero has quit [Ping timeout: 248 seconds]
JoseT has joined #openocd
<PaulFertser> JoseT: hi
<PaulFertser> JoseT: hm, how do you build openocd and how do you start it?
<PaulFertser> JoseT: I suggest to run openocd itself under gdb and then use another gdb to try load.
<PaulFertser> JoseT: also paste your current diff to upstream somewhere
<JoseT> Hi, I have added my flash driver and config updates on an openocd version
<JoseT> Open On-Chip Debugger 0.12.0+dev-gac8ef2ccb-dirty (2025-01-13-09:02)
<JoseT> Is it possible to enable dbg on my version?
<PaulFertser> JoseT: yes, please paste your full diff somewhere. Run OpenOCD itself under GDB, get it to segfault and how the backtrace.
<PaulFertser> JoseT: it's enabled by default in the default build, just start it under GDB from src/openocd binary
<JoseT> okay I will try, thanks
<PaulFertser> cambrian_invader: by default OpenOCD is built with enough debug info, it's just stripped by "make install" but the original binary has it.
<PaulFertser> JoseT: if you can do it within like 15 minutes I should be able to help.
<cambrian_invader> PaulFertser: if he's using a distro openocd it will have been stripped
<JoseT> tanks, I am just going to start on it
<PaulFertser> cambrian_invader: right, but that's not the case
<cambrian_invader> hence the "if"
<PaulFertser> JoseT is in the process of developing a new flash driver, right?
<JoseT> ys PaulFertser, we have a AP based flashing mechanism to be supported through openocd
JakeSayss is now known as JakeSays
JoseT has quit [Quit: Client closed]
<karlp> is the ti_ccfg lma correct, and is it presented correctly to gdb?
<karlp> but yeah, you need to gdb openocd, and make sure it's built with symbols, and have the "other" gdb to try and load your firmware.
key2 has quit [Quit: Connection closed for inactivity]