VisualGDB won’t flash the device a second time

Sysprogs forums Forums VisualGDB VisualGDB won’t flash the device a second time

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36945
    Al Chambers
    Participant

    I have a CMake project for an STM32U575 which I have been using successfully with VisualGDB for many months. My PC was recently replaced and I had to install VisualGDB (6.0R8 build 5338), STM32CubeProgrammer and other tools from scratch. I’m using Visual Studio Pro 2022: the same as on the old PC. The project builds fine but flashing the device does not appear to work. At least, it appears to flash the device the first time after importing the CMakeLists.txt to create the project files, but fails subsequently.

    Debugging an image does not work. Press the Start button and the usual white progress bar appears. I would expect this is turn progressively green as the flash is written, but that does not happen. No error is reported, but the flash has not been written with the new image (I checked with compare-sections in the GDBSession window), and the debugger does not stop at any break point. I am able to flash the image directly by running  “mon program path-to-build-folder/my-project.elf verify” in the GDBSession (I checked again).

    I have wondered if there is an issue with the base address for the application. It’s the usual 0x08000000 and is found in the linker script. I did not previously need to specify the linker script when importing CMakeLists.txt, but have done so just in case. It made no difference.

    Nothing has changed in the project hardware or source, nor in the way I am using VisualGDB to import CMakeLists.txt. Please advise.

     

    #36946
    support
    Keymaster

    Hi,

    This looks like a bug in some of the tools used to program the FLASH memory. If you are using OpenOCD, you can try installing earlier package versions via Tools->VisualGDB->VisualGDB Package Manager. If you are using a different tool, you can try running it manually on different machines to see if there is any pattern.

    #36947
    Al Chambers
    Participant

    I removed OpenOCD 20250710-0.12.0 (the latest) and installed OpenOCD 20250613-0.12.0 (most recent earlier version). The image was installed first time and the debugger is working. I didn’t even need to restart VisualStudio or anything: just install the package and press start. It’s too early to be certain, but that looks like a fix. Thanks very much.

    #36948
    Al Chambers
    Participant

    I spoke too soon. It worked the first time.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.