Page 1 of 1

Espressif IDE + linux + openocd + gdb : Cannot access memory at address

Posted: Mon Sep 22, 2025 4:36 pm
by esp32.damiano
After quite some pain I have a 99% reliable developing environment, slow, but almost reliable

The setup
  • Linux, because windows is spyware
  • esp32-c6 custom board with ES8388, actually producing sound
  • openocd started manually and connecting using USB to the above
  • GDB started in aclipse by following
    https://docs.espressif.com/projects/esp ... -app-debug
    there are a few quirks, ask me for details if needed
  • code that starts thread to manage a console + some gpio +wify + a pipeline to play sound
the above works, the issue is while debugging a specific part of sw, namely, if I break at the following function
1a.png
1a.png (25.64 KiB) Viewed 7113 times
if I do a "step", the debugger complain that it cannot read the memory
1b.png
1b.png (19.81 KiB) Viewed 7113 times
I already have the following in Startup -> Initialization commands

Code: Select all

mon reset halt
mon program_esp ${workspace_loc:wiradio/build/wiradio.bin} 0x10000 verify skip_loaded
set mem inaccessible-by-default off
maintenance flush register-cache
any other magic that need to be enabled ?

Re: Espressif IDE + linux + openocd + gdb : Cannot access memory at address

Posted: Tue Sep 23, 2025 5:49 pm
by esp32.damiano
Solved...

actually written in the instructions, that you ned to source or provide the gdbinit, the problem is... how ?

add

Code: Select all

-x build/gdbinit/gdbinit
in the COMMAND LINE of the gdb