Willa

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: STM32 programing/debugging fails with GDB 15.1 #35876
    Willa
    Participant

    So, only one version of OpenOCD is involved; it hasn’t changed. Only GCC and GDB changed, and since VisualGDB is using GDB to issue the load command to OpenOCD, GDB is involved. I have been doing full rebuilds when I switch back and forth between the toolchains.

    I was going to try swapping the GDB executables, but I actually stumbled on a fix that works in the new GCC/GDB toolchain. I changed the Startup GDB commands from the default:

    set remotetimeout 60
    target remote :$$SYS:GDB_PORT$$
    mon halt
    mon reset init
    load

    to:

    target remote :$$SYS:GDB_PORT$$
    set remotetimeout 60
    target extended-remote :$$SYS:GDB_PORT$$
    mon halt
    mon reset init
    load

    I actually just changed ‘remote’ to ‘extended-remote’, per a note I found in the GDB log saying that extended-remote was “preferred.” VisualGDB force-adds the ‘target remote’ line to the start of the commands if it isn’t in the commands though, so I have no idea if it works without that first target remote.

    I went back and confirmed via a few wipes and reprograms; it works with extended-remote, but not with remote.

    I’ve never used the CLI level GDB commands for a remote target, so I’m no expert, but it seems that the difference is that extended-remote remains connected when the target exits. Maybe the newer version of GDB is triggering an exit before the programming starts, but after it fetches information like flash size.

Viewing 1 post (of 1 total)