NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
electricworry has quit [Ping timeout: 255 seconds]
PaulFertser has quit [Ping timeout: 268 seconds]
Hawk777 has joined #openocd
gzlb has quit [Ping timeout: 268 seconds]
gzlb has joined #openocd
nerozero has joined #openocd
PaulFertser has joined #openocd
Hawk777 has quit [Quit: Leaving.]
electricworry has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
Guest11 has joined #openocd
<Guest11> Hello, trying to run orbmule/examples/simple program with orbtrace+openocd+gdb on devboard with STM32H743VIT6, having the issue
<Guest11> Error: timed out while waiting for target halted
<Guest11> TARGET: stm32h7x.cpu0 - Not halted
<Guest11> .gdbinit:7: Error in sourced command file:
<Guest11> Remote communication error. Target disconnected.: Connection reset by peer.
<Guest11> if i remove init, reset init, halt from .gdbinit, gdb output is: https://gist.github.com/retif/0e8e7a0a4aea176a92e082a231cfc2c6
<PaulFertser> Guest11: hi
<PaulFertser> Guest11: "reset init" is only meant for flashing. "reset halt" resets and then halts at the very first instruction if possible.
<PaulFertser> Guest11: why do you have custom reset-init handler there in your config, why custom config and not upstream?
<PaulFertser> Guest11: my first suggestion: use just OpenOCD with upstream config. Try connecting and halting the target. Show OpenOCD log.
<Guest11> >why do you have custom reset-init
<Guest11> i am novice, trying to follow the guide and example project
<Guest11> thanks, i will try to use OpenOCD with upstream config
<PaulFertser> Guest11: you shouldn't use reset-init normally unless you know exactly why you need it.
<PaulFertser> Guest11: also do you have several cmsis-dap adapters connected at the same time? If not, just source the adapter config and then target config and that's it.
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
<Guest11> i have reduced board_simple.ocd to
<Guest11> source [find interface/cmsis-dap.cfg]
<Guest11> source [find target/stm32h7x_dual_bank.cfg]
<Guest11> and trying
<Guest11> > openocd -f board_simple.ocd -c "program ofiles/simple.elf verify reset exit"
<Guest11> and get
<Guest11> Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
<Guest11> Info : Using CMSIS-DAPv2 interface with VID:PID=0x1209:0x3443, serial=326C708163008E06
<Guest11> Info : CMSIS-DAP: SWD Supported
<Guest11> Info : CMSIS-DAP: JTAG Supported
<Guest11> Info : CMSIS-DAP: FW Version = 2.1.0
<Guest11> Info : CMSIS-DAP: Interface Initialised (SWD)
<Guest11> Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 1 nRESET = 1
<Guest11> Info : CMSIS-DAP: Interface ready
<Guest11> Info : clock speed 1800 kHz
<Guest11> Info : SWD DPIDR 0x6ba02477
<Guest11> Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
<Guest11> Info : starting gdb server for stm32h7x.cpu0 on 3333
<Guest11> reduced board_simple.ocd to
<Guest11> source [find interface/cmsis-dap.cfg]
<Guest11> source [find target/stm32h7x_dual_bank.cfg]
<Guest11> > openocd -f board_simple.ocd -c "program ofiles/simple.elf verify reset exit"
<Guest11> and get Error: timed out while waiting for target halted full log: https://gist.github.com/retif/903566ff77a44b805db85eb130e13338
<PaulFertser> Guest11: please always use some pastebin, never paste more than 2-3 lines to a pbulic channel.
<PaulFertser> I think the target's SRST is pulled down externally, do you think there's a chance of that?
<PaulFertser> It really looks like SWD communication itself is OK but the target can't do anything because it's kept in reset.
<PaulFertser> Guest11: what board is that, is that something you made?
Guest11 has quit [Quit: Client closed]
tlwoerner has quit [Remote host closed the connection]
tlwoerner has joined #openocd
tchebb has quit [Ping timeout: 272 seconds]
gzlb has quit [Quit: WeeChat 4.2.2]
tlwoerner has quit [Ping timeout: 268 seconds]
tlwoerner has joined #openocd
zjason` is now known as zjason
Guest11 has joined #openocd
<Guest11> i have checked the connection with multimeter, connection exists between reset pin on mc and reset pin on orbtrace device, and ground is not connected to reset pin. The devboard is powered from orbtrace only(by VTRef only) through 20pin cable. I have a linker.ld with memory layout for my MC stm32h743vit6 and compiled .elf for that. I have left only
<Guest11> absolute minimum in board.ocd and in .gdbinit, here is board.ocd, .gdbinit, linker.ld content along with shell command i am trying to run and the output i get: https://gist.github.com/retif/cfcf003c7e75e6841c72b8e49d7ff277 in short:
<Guest11> $ orbtrace -p vtref,3.3 -e vtref,on
<Guest11> $ openocd -f board.ocd -c "program ofiles/simple.elf"
<Guest11> output:
<Guest11> Error: timed out while waiting for target halted embedded:startup.tcl:530:
<Guest11> Error: Unable to reset target
<Guest11> > what board is that, is that something you made?
<PaulFertser> Guest11: have you measured the voltage on MCU reset pin while it's powered?
<PaulFertser> Guest11: is it a new board or some devboard?
<PaulFertser> Guest11: you have a button there SW3, right?
<Guest11> voltage on MCU reset pin is 3.14v, its a devboard
<PaulFertser> Guest11: were you able to ever flash it anyhow?
<Guest11> yes, there are SW3 button on the board
<PaulFertser> at what point are you measuring the MCU reset pin?
<Guest11> on the pin header
<PaulFertser> Guest11: pin 10 on P2?
<Guest11> yes
<PaulFertser> Guest11: when you press SW1 and connect to USB do you see a USB device appear on computer?
<Guest11> yes
<Guest11> DFU in FS mode
<PaulFertser> Guest11: have you tried flashing it with dfu-util?
<Guest11> 18:58:25 : File download complete
<PaulFertser> Guest11: please run openocd with -d3 -c "init; halt" and show the output.
<PaulFertser> Guest11: ok, that's not bad. So apparently "reset halt" doesn't work but if you just let the target run and halt it then you can halt and inspect and everything.
<PaulFertser> In this state you can attach GDB I think.
<PaulFertser> "program" assumes "reset halt" working so instead you can use "halt; flash write_image /path/to/elf; verify_image /path/to/elf"
<PaulFertser> All interactively from a Telnet session so you do not need to restart.
<PaulFertser> Guest11: using 0.11.0 isn't reasonable these days, how come you have a version that old?
<Guest11> its from ubuntu package
<PaulFertser> Guest11: on rather old ubuntu release?
<Guest11> i will update manually, thanks for pointing it out, didnt paid attention when it was released
<Guest11> 22.04
<PaulFertser> OK, that's quite old. Not sure if anything was changed wrt stm32h7 since then but probably yes.
<PaulFertser> In any case it looks like you can debug like that already.
<PaulFertser> Guest11: btw, if you're updating I suggest you self-compile current HEAD.
<PaulFertser> If not, you can probably use this 0.11.0 with a workaround.
<Guest11> thank you, very much, i will try to update to HEAD, and check how my board will work
<PaulFertser> Guest11: don't forget to not mix config files from different versions.
<Guest11> checked /usr/share/openocd after removing the package, its not there
<PaulFertser> Good
<PaulFertser> For regular CMSIS-DAP you only need hidapi dev files.
<PaulFertser> l see back then "reset halt" didn't work for anybody with H7, but no idea if it works with the current code.
joconor has quit [Quit: ZNC 1.8.2 - https://znc.in]
joconor has joined #openocd
avis has joined #openocd
<Fleck> can you flash MC9S12XF384 with openocd? Could not find info
avis has quit [Remote host closed the connection]
<PaulFertser> Fleck: hey. If flash driver isn't written then probably no. Some MCUs have bootloaders you can talk to over UART or USB for flashing but not with OpenOCD.
<Fleck> thanks, I am clueless about bootloaders etc... don't know
<PaulFertser> Fleck: I do not think I saw this 16-bit architecture mentioned before.
<PaulFertser> Fleck: but you can read the MCU datasheet.
<Fleck> yeah, I can, but don't have spare time, have other things to do :D thank you, as always, super helpful PaulFertser!
<PaulFertser> Fleck: welcome, sorry about bad news but at least you do not have to waste more time on this idea
Guest11 has quit [Quit: Client closed]
nerozero has quit [Ping timeout: 268 seconds]
slobodan has joined #openocd
slobodan_ has joined #openocd
slobodan has quit [Ping timeout: 268 seconds]
slobodan_ has quit [Read error: Connection reset by peer]
slobodan_ has joined #openocd
slobodan_ has quit [Ping timeout: 240 seconds]
joconor has quit [Ping timeout: 268 seconds]
joconor has joined #openocd
electricworry has quit [Ping timeout: 246 seconds]
avis has joined #openocd
avis has quit [Client Quit]
avis has joined #openocd
<avis> Having trouble writing to micron m25 flash after having enabled an spi port and tried to communicate it through protocols (sent WREN, FAST_READ)
<avis> Here's the related code: https://pastebin.com/z1wg1Suh
<avis> the end goal, ofc, is to use PAGEPROGRAM to copy a bitstream file over
<avis> everytime I try to do a READ, and read bytes from the cmdin endpoint, I only get two bytes; GETID only returns 10 out of twenty bytes, etc.