zephyrproject-rtos / openocd

OpenOCD with Zephyr patches for building Zephyr SDK
Other
28 stars 45 forks source link

stm32h723 device support #36

Closed KozhinovAlexander closed 3 years ago

KozhinovAlexander commented 3 years ago

Hello all. I am trying to run my nucleo_h723zg board (see this Zephyr PR) with latest OpenOCD (this repo).

The connection to the board can not be established and I am getting following errors

GDB-Side:

Reading symbols from '/home/nukers/Documents/DevProjects/zephyrproject/zephyr/build/zephyr/zephyr.elf'
Finished reading symbols
Please check OUTPUT tab (Adapter Output) for output from /usr/local/bin/openocd
Launching server: "/usr/local/bin/openocd" "-c" "gdb_port 50000" "-s" "/home/nukers/Documents/DevProjects/zephyrproject/zephyr_vscode_workspace/../" "-f" "zephyr/boards/arm/nucleo_h723zg/support/openocd.cfg"
Launching GDB: "/home/nukers/zephyr-sdk-0.11.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb" "-q" "--interpreter=mi2"
1-gdb-set target-async on
2-interpreter-exec console "source /home/nukers/.vscode-server/extensions/marus25.cortex-debug-0.3.7/support/gdbsupport.init"
3-target-select extended-remote localhost:50000
4-interpreter-exec console "monitor reset halt"
5-target-download
6-interpreter-exec console "monitor reset halt"
7-enable-pretty-printing
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-added","output":[["id","i1"]]}]}
GDB -> App: {"outOfBandRecord":[{"isStream":true,"type":"console","content":"Reading symbols from /home/nukers/Documents/DevProjects/zephyrproject/zephyr/build/zephyr/zephyr.elf...\n"}]}
Reading symbols from /home/nukers/Documents/DevProjects/zephyrproject/zephyr/build/zephyr/zephyr.elf...
GDB -> App: {"token":1,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
GDB -> App: {"token":2,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
GDB -> App: {"token":3,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Remote connection closed"]]}}

ST-Link V3 side:

Open On-Chip Debugger 0.10.0+dev-01404-g393448342-dirty (2020-11-01-11:59)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1800 kHz
Info : STLINK V3J7M2 (API v3) VID:PID 0483:374E
Info : Target voltage: 3.270400
Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 50000
Info : Listening on port 50000 for gdb connections
Info : accepting 'gdb' connection on tcp/50000
Debugger attaching: halting execution
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0802e278 msp: 0x20008c70
force hard breakpoints
Warn : Cannot identify target as a STM32H7xx family.
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected

Therefore I have following questions:

  1. Is stm32h723 SoC fully supported with current OpenOCD dev repo?
  2. What are your suggestions for reason of occurred errors?
KozhinovAlexander commented 3 years ago

@galak @ABOSTM Can you please take a look?

KozhinovAlexander commented 3 years ago

According to line 826 of stm32h7xx.c OpenOCD file there is no support for stm32h723xG SoC for now.

erwango commented 3 years ago

@Nukersson this repo is mainly a mirror from official openocd. You won't get openocd support from here. Main openocd repo is here: http://openocd.zylin.com/#/q/status:open I'm not sure there's a way to report issues, but anyway it is likely that this chip is not yet supported and you have to wait a bit.

manoj153 commented 3 years ago

Hi, I am using the same board and got debugging work, the error suggests that the openocd don't support the chip, I am using v0.12.0 SDK that bundled with a much recent open-ocd that fixes the issue.

KozhinovAlexander commented 3 years ago

Tested with SDK 12 and it works. Closed.