STM32F030F4 debug problem

Sysprogs forums Forums VisualGDB STM32F030F4 debug problem

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10712
    kaseat
    Participant

    Hi,

    I’ve tried to flash Cortex M0 STM32F030F4 MCU with VisualGDB plugin but faced with “Failed to verify the programmed image” problem (see GDBServer log below), while CoIDE’s debugger works fine with the same MCU. Cortex M3 STM32F103C8 MCU debuging with VisualGDB aslo works fine.

    I’ve examined STM32F030F4 and STM32F103C8 GDBServer logs and found this values a little bit suspicious: xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc (STM32F030F4) as opposite: xPSR: 0x01000000 pc: 0x08000200 msp: 0x20005000 (STM32F103C8).

    Do you have any ideas how to workaround this issue?

    Thanks.

    STM32F030F4 GDBServer log:

    Open On-Chip Debugger 0.9.0 (2016-10-14) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select <transport>’.
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    adapter speed: 1000 kHz
    adapter_nsrst_delay: 100
    none separate
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : clock speed 950 kHz
    Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
    Info : using stlink api v2
    Info : Target voltage: 3.295187
    Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
    adapter speed: 1000 kHz
    stm32f0x.cpu: target state: halted
    target halted due to debug-request, current mode: Thread
    xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
    in procedure ‘reset’
    in procedure ‘ocd_bouncer’
    in procedure ‘ocd_process_reset’
    in procedure ‘ocd_process_reset_inner’ called at file “embedded:startup.tcl”, line 248
    in procedure ‘stm32f0x.cpu’ called at file “embedded:startup.tcl”, line 370
    in procedure ‘ocd_bouncer’

    Error: jtag status contains invalid mode value – communication failure
    Polling target stm32f0x.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 100ms
    VisualGDB_OpenOCD_Ready
    Info : Previous state query failed, trying to reconnect
    Polling target stm32f0x.cpu failed, trying to reexamine
    Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
    Info : accepting ‘gdb’ connection on tcp/58463
    Info : device id = 0x10006444
    Info : flash size = 16kbytes
    Error: address + size wrapped(0xfffffffe, 0x00000004)
    Error: jtag status contains invalid mode value – communication failure
    Polling target stm32f0x.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 100ms

    Info : Previous state query failed, trying to reconnect
    Polling target stm32f0x.cpu failed, trying to reexamine
    Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
    adapter speed: 1000 kHz
    stm32f0x.cpu: target state: halted
    target halted due to debug-request, current mode: Thread
    xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
    in procedure ‘reset’
    in procedure ‘ocd_bouncer’
    in procedure ‘ocd_process_reset’
    in procedure ‘ocd_process_reset_inner’ called at file “embedded:startup.tcl”, line 248
    in procedure ‘stm32f0x.cpu’ called at file “embedded:startup.tcl”, line 370
    in procedure ‘ocd_bouncer’

    Error: jtag status contains invalid mode value – communication failure
    Polling target stm32f0x.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 100ms
    Info : Previous state query failed, trying to reconnect
    Polling target stm32f0x.cpu failed, trying to reexamine
    Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
    adapter speed: 1000 kHz
    stm32f0x.cpu: target state: halted
    target halted due to debug-request, current mode: Thread
    xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc

    #10714
    support
    Keymaster

    Hi,

    This could be an indication of a wiring problem, so errors can occur intermittently and it may appear that one IDE works, while a different IDE with slightly different timings does not. Please double-check your board connections.

    Another reason for this could be that your firmware is disabling the JTAG unit. Please try modifying the OpenOCD scripts as shown in this tutorial to enable the “connect under reset” mode.

    #10717
    kaseat
    Participant

    Thanks for your reply!
    This seems to be a wiring problem since enabling the “connect under reset” mode did not help. I’ll try another dev board then.

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