Error Debugging.

Sysprogs forums Forums VisualGDB Error Debugging.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13546
    Dubbie
    Participant

    I was previously using an old version of visualGDB and it was working fine with my custom board.

    The board has a STM32F031G6 connected with stlinkV2 using SWD

    I upgraded to the latest VisualGDB and paid for a license extension so that I could use the CubeMX import feature.

    I imported a project from CubeMX which seems to build fine. However I can’t seem to debug anymore. When I hit debug, it flashes the chip fine (it runs) but then can’t connect.

    adapter speed: 950 kHz
    target halted due to debug-request, current mode: Thread
    xPSR: 0xc1000000 pc: 0x08001c58 msp: 0x20001000
    Error: jtag status contains invalid mode value - communication failure
    Warn : target stm32f0x.cpu is not halted
    Polling target stm32f0x.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 100ms
    jtag status contains invalid mode value - communication failure
    Info : Previous state query failed, trying to reconnect

    it seems to be refusing to communicate with the debugger.
    Any ideas what I can try?

    Thanks in advance.

    #13551
    support
    Keymaster

    Hi,

    The “communication failure” errors almost always indicate wiring problems. Please double-check your board schematics, soldering/connections and try lowering JTAG frequency.

    This could be also caused by your firmware disabling the JTAG pins at runtime. If the problem disappears after erasing the FLASH memory contents, please try using the “connect under reset” checkbox.

    #13563
    Dubbie
    Participant

    The disabling does sound plausible. I do have to manually delete the flash before it will work again. Thanks, will investigate in the morning.

    #13580
    Dubbie
    Participant

    Just as a followup.

    The problem was indeed that I had forgotten to enable SWD in the firmware, (I had temporarily disabled it for a different reason and forgotten to turn it back on) so as soon as the new image booted, then nothing worked.

    Thanks for the nudge in the right direction!

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