Skip to main content
Visitor II
February 8, 2025
Question

STM32MP257F-EV1 Debug using stlink and openocd

  • February 8, 2025
  • 1 reply
  • 885 views

Hi 

I am trying to attach gdb using openocd to debug linux kernel, I am able to attach openocd.
but when I start with gdb scripts https://github.com/STMicroelectronics/wiki-stm32mp-addons/blob/main/gdb-scripts/Path_env.py

Gdb is not able to get symbols, after connecting, ,I have already build kernel with debug symbols and loaded on target 

gdb shows this: 
ype "apropos word" to search for commands related to "word"...
Reading symbols from //home/nik/ws/boards/5_stm32mp2/STM32MPU-Ecosystem-v6.0/Developer-Package/stm32mp2-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sources/aarch64-ostl-linux/linux-stm32mp-6.6.48-stm32mp-r1-r0/build/vmlinux...
(gdb) target extended-remote :3333
Remote debugging using :3333
0x000000000e005bfc in ?? ()
(gdb) bt
#0 0x000000000e005bfc in ?? ()
#1 0x000000000e011000 in ?? ()
Backtrace stopped: not enough registers or memory available to unwind further

Can someone please help here or share the detailed steps to use gdb and openocd?
Thanks in advance.

    This topic has been closed for replies.

    1 reply

    nikhilgtrAuthor
    Visitor II
    February 8, 2025

    I have only updated linux kernel image on the target, other all are from starter package

    do I need to flash all debug builds using STM32Cube Programmer, will then it will work ?