cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to debug with STM32F07 dev board. Attached the debug log, kindly help me in this. Thank

SNaga.6
Associate II

STMicroelectronics ST-LINK GDB server. Version 7.3.0

Copyright (c) 2023, STMicroelectronics. All rights reserved.

Starting server with the following options:

    Persistent Mode      : Disabled

    LogFile Name        : C:\Workspace\RTOS_Workspace\001_Tasks\Debug\st-link_gdbserver_log.txt

    Logging Level       : 31

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Enabled

    SWD Debug         : Enabled

    InitWhile         : Enabled

COM frequency = 4000 kHz

Target connection mode: Under reset

Reading ROM table for AP 0 @0xe00fffd0

Hardware watchpoint supported by the target 

ST-LINK Firmware version : V2J41M27

Device ID: 0x413

PC: 0x8000c24

ST-LINK device status: HALT_MODE

ST-LINK detects target voltage = 2.90 V

ST-LINK device status: HALT_MODE

ST-LINK device initialization OK

Stm32Device, pollAndNotify running...

SwvSrv state change: 0 -> 1

Waiting for debugger connection...

Waiting for connection on port 61234...

Waiting for connection on port 61235...

Accepted connection on port 61234...

Debugger connected

Waiting for debugger connection...

Waiting for connection on port 61234...

GDB session thread running

GdbSessionManager, session started: 1

Accepted connection on port 61234...

Debugger connected

Waiting for debugger connection...

Waiting for connection on port 61234...

GDB session thread running

GdbSessionManager, session started: 2

Accepted connection on port 61235...

SWV collect poll delay set to 3604µs for baudrate 1894000Hz (buffer size 2048b)

SwvSrv state change: 1 -> 2

Stm32Device, closeDevice() entry

SwvSrv state change: 2 -> 4

GDB session, device event: 5

GDB session, device event: 5

Stm32Device, pollAndNotify stopped

Stm32Device, closeDevice() exit

 ------ Switching to STM32CubeProgrammer ----- 

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.13.0          

   -------------------------------------------------------------------

Log output file:  C:\Users\SARAVA~1\AppData\Local\Temp\STM32CubeProgrammer_a22120.log

ST-LINK SN : 0670FF495277504867224633

ST-LINK FW : V2J41M27

Board    : STM32F4DISCOVERY

Voltage   : 2.90V

SWD freq  : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID  : 0x413

Revision ID : Rev Y

Device name : STM32F405xx/F407xx/F415xx/F417xx

Flash size : 1 MBytes (default)

Device type : MCU

Device CPU : Cortex-M4

BL Version : 0x91

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a22120.srec

 File     : ST-LINK_GDB_server_a22120.srec

 Size     : 15.46 KB 

 Address    : 0x08000000 

Erasing memory corresponding to segment 0:

Erasing internal memory sector 0

Download in Progress:

�������������������������������������������������� 0%

�������������������������������������������������� 100%

File download complete

Time elapsed during download operation: 00:00:00.506

Verifying ...

Read progress:

�������������������������������������������������� 50%

�������������������������������������������������� 100%

Download verified successfully 

 ------ Switching context ----- 

COM frequency = 4000 kHz

Target connection mode: Under reset

Reading ROM table for AP 0 @0xe00fffd0

Hardware watchpoint supported by the target 

ST-LINK Firmware version : V2J41M27

Device ID: 0x413

PC: 0x8000c24

ST-LINK detects target voltage = 2.90 V

ST-LINK device status: HALT_MODE

Stm32Device, pollAndNotify running...

SWV collect poll delay set to 3604µs for baudrate 1894000Hz (buffer size 2048b)

SwvSrv state change: 4 -> 2

GDB session, device event: 6

GDB session, device event: 6

SwvSrv state change: 2 -> 3

GDB session, device event: 3

GDB session, device event: 3

GDB session, device event: 1

GDB session, device event: 1

GDB session terminated: Client connection lost

GdbSessionManager, session terminated: 2

Received Ctrl-C from the client 

ST-LINK device status: RUN_MODE

Device not halted(0), performing Ctrl-C

GDB session, device event: 4

Device halted

Cleanup session: 2

GDB session disposed: 2

GDB session terminated: Client connection lost

GdbSessionManager, session terminated: 1

GdbSrv, last session terminated, signal dispose

Stopping port 61234

Received stop for port 61234, not accepting new connections.

GdbSrv, deInit entry.

Shutting down...

GdbSessionManager, deInit entry.

SwvSrv state change: 3 -> 1

SwvSrv session thread disposed

Waiting for connection on port 61235...

ST-LINK device status: HALT_MODE

Stopping port 61234

GDB session disposed: 1

GdbSessionManager, deInit exit

SwvSrv deInit entry

Stopping port 61235

Received stop for port 61235, not accepting new connections.

SwvSrv deInit exit

Stm32Device, closeDevice() entry

Stm32Device, pollAndNotify stopped

Stm32Device, closeDevice() exit

Stm32Device, deInit success

GdbSrv, deInit exit.

Exit.

7 REPLIES 7
MM..1
Chief III

And what? Maybe you use pins in code = debug not possible or voltage unstable

ST-LINK detects target voltage = 2.90 V

ST-LINK device status: HALT_MODE

Which board and chip specifically?

Is it a low pin count device?

Can you connect under reset? Is NRST physically connected in your design?

Can you connect or adjust BOOT0 pin or settings?

Does your code interfere with the SWD pin configuration? Disable it, or go into a low power mode?

Problems are hard to troubleshoot without context to work from. Elaborate

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SNaga.6
Associate II

Board : STM32F407VG MCU * New order code STM32F407G-DISC1

I am trying to integrate freeRTOS and run a sample program using SWD pin. I am getting the below error and log(partial)

0693W00000bhKarQAE.png

[3.688] spawnCubeProgrammer():  13:52:50:876 Download verified successfully 
[3.688] spawnCubeProgrammer():  13:52:50:876 
[3.688] spawnCubeProgrammer():  
[3.688] spawnCubeProgrammer():   ------ Switching context ----- 
[3.693] reset_hw_wtchpt_module():  Hardware watchpoint supported by the target 
[3.693] Device_Initialise():  SWD frequency = 4000 kHz
[3.693] Device_Initialise():  ST-LINK Firmware version : V2J41S27
[3.693] Device_Initialise():  Device ID: 0x413
[3.693] Device_Initialise():  PC: 0x8001f6c
[3.709] Device_Initialise():  ST-LINK detects target voltage = 2.90 V
[3.709] Device_Initialise():  ST-LINK device status: HALT_MODE
[3.709] initServerContext():  ST-LINK device initialization OK
[3.709] write():  <632> Tx: $OK#9a
[3.709] read():  <632> Rx: $T1#85
[3.709] write():  <632> Tx: $OK#9a
[3.709] read():  <632> Rx: $T1#85
[3.709] write():  <632> Tx: $OK#9a
[3.709] read():  <632> Rx: $m8001f6c,4#95
[3.709] handlePacket():  Reading 0x4 bytes of memory from addr 0x8001f6c 
[3.709] write():  <632> Tx: $dff834d0#63
[3.709] read():  <632> Rx: $m8001f6c,2#93
[3.709] handlePacket():  Reading 0x2 bytes of memory from addr 0x8001f6c 
[3.709] write():  <632> Tx: $dff8#68
[3.709] read():  <632> Rx: $m8001f6e,2#95
[3.709] handlePacket():  Reading 0x2 bytes of memory from addr 0x8001f6e 
[3.709] write():  <632> Tx: $34d0#fb
[3.727] read():  <632> Rx: $qXfer:threads:read::0,bfb#fb
[3.727] write():  <632> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#8b
[3.789] read():  <632> Rx: $m8001800,40#5e
[3.789] handlePacket():  Reading 0x40 bytes of memory from addr 0x8001800 
[3.789] write():  <632> Tx: $02affef765fe00f041f800f0a9f807f10803019302230093174bc8221749184801f052f978617b69012b09d04ff0500383f31188bff36f8fbff34f8f3b61fee7#f0
[3.789] read():  <632> Rx: $m8001802,2#2e
[3.789] handlePacket():  Reading 0x2 bytes of memory from addr 0x8001802 
[3.789] write():  <632> Tx: $fef7#68
[3.804] read():  <632> Rx: $Z1,8001802,2#78
[3.805] write():  <632> Tx: $OK#9a
[3.805] read():  <632> Rx: $vCont;c#a8
[3.805] SWV_SetStatus():  SWV_SetStatus(true): stop_reply_pending == 0
[3.820] handle_vCont_c():  handle_vCont_c, continue thread
[3.820] write():  <632> Tx: $OK#9a
[3.836] SWV_SetStatus():  SWV_SetStatus(false): stop_reply_pending == 1
[3.836] handleGDBConnection():  TraceCaptureStart and SWV event set to APP_FALSE (0)
[3.852] Device_GetHaltReason():  NVIC_DFSR_REG = 0x0000000A 
[3.852] write():  <632> Tx: %Stop:T05hwbreak:;thread:1;core:0;#7e
[3.852] read():  <632> Rx: $vStopped#55
[3.852] write():  <632> Tx: $OK#9a
[3.852] read():  <632> Rx: $g#67
[3.852] write():  <632> Tx: $000000207800000000000008b5010008000000000000000000000000e0ff01200000000000000000000000000000000000000000d8ff0120a31f0008021800080000006100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8ff012000000000#e0
[3.870] read():  <632> Rx: $qXfer:threads:read::0,bfb#fb
[3.870] write():  <632> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#8b
[3.870] read():  <632> Rx: $z1,8001802,2#98
[3.870] write():  <632> Tx: $OK#9a
[3.871] read():  <632> Rx: $m8001802,4#30
[3.871] handlePacket():  Reading 0x4 bytes of memory from addr 0x8001802 
[3.871] write():  <632> Tx: $fef765fe#9e
[3.878] read():  <632> Rx: $T1#85
[3.878] write():  <632> Tx: $OK#9a
[3.878] read():  <632> Rx: $T1#85
[3.878] write():  <632> Tx: $OK#9a
[3.899] read():  <632> Rx: $qXfer:threads:read::0,bfb#fb
[3.899] write():  <632> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#8b
[3.899] read():  <632> Rx: $qXfer:threads:read::0,bfb#fb
[3.899] write():  <632> Tx: $l<?xml version="1.0"?><threads><thread id="1" core="0" name="main"></thread></threads>#8b
[5.359] read():  <632> Rx: $m2001ffc0,40#1f
[5.359] handlePacket():  Reading 0x40 bytes of memory from addr 0x2001ffc0 
[5.359] write():  <632> Tx: $a5a5a51d05000000c40000200200000000000000f004002000ed00e0185000080000000014500008b501000825460008000000000000000000000000a31f0008#e5
[5.359] read():  <632> Rx: $m8001fa2,4#8f
[5.359] handlePacket():  Reading 0x4 bytes of memory from addr 0x8001fa2 
[5.359] write():  <632> Tx: $70470000#92
[5.359] read():  <632> Rx: $m8001f40,40#90
[5.359] handlePacket():  Reading 0x40 bytes of memory from addr 0x8001f40 
[5.359] write():  <632> Tx: $80b400af084bd3f88830074a43f47003c2f88830044b4ff000629a6000bfbd465df8047b704700bf00ed00e0dff834d0002103e00c4b5b58435004310b480c4b#94
[5.359] read():  <632> Rx: $m8001fa4,4#91
[5.359] handlePacket():  Reading 0x4 bytes of memory from addr 0x8001fa4 
[5.359] write():  <632> Tx: $00000220#84
[5.453] read():  <632> Rx: $m2001ffc0,40#1f
[5.453] handlePacket():  Reading 0x40 bytes of memory from addr 0x2001ffc0 
[5.453] write():  <632> Tx: $a5a5a51d05000000c40000200200000000000000f004002000ed00e0185000080000000014500008b501000825460008000000000000000000000000a31f0008#e5
[5.453] read():  <632> Rx: $m2001ffc0,40#1f
[5.453] handlePacket():  Reading 0x40 bytes of memory from addr 0x2001ffc0 
[5.453] write():  <632> Tx: $a5a5a51d05000000c40000200200000000000000f004002000ed00e0185000080000000014500008b501000825460008000000000000000000000000a31f0008#e5
[5.453] read():  <632> Rx: $m2001ffc0,40#1f
[5.453] handlePacket():  Reading 0x40 bytes of memory from addr 0x2001ffc0 
[5.453] write():  <632> Tx: $a5a5a51d05000000c40000200200000000000000f004002000ed00e0185000080000000014500008b501000825460008000000000000000000000000a31f0008#e5
[14.092] read():  <632> Rx: $vCont;c#a8
[14.092] SWV_SetStatus():  SWV_SetStatus(true): stop_reply_pending == 0
[14.110] handle_vCont_c():  handle_vCont_c, continue thread
[14.110] write():  <632> Tx: $OK#9a
[14.110] read():  <632> Rx: $T1#85
[14.110] write():  <632> Tx: $OK#9a
[14.110] read():  <632> Rx: $T1#85
[14.110] write():  <632> Tx: $OK#9a
[14.126] Device_GetStatus():  ST-LINK device status: RUN_MODE
[29.648] read():  <632> Rx: $vKill;a410#33
[29.648] handlePacket():  Hidden/Unsupported v-command 'vKill', see RSP for details
[29.648] write():  <632> Tx: $#00
[29.648] read():  <632> Rx: $k#6b
[29.648] stop():  Stopping port 61235

For what you need SWV. ?

Sorry, it is not SWV. Confiured SWO pin for supportinng printf style debugging

Rim LANDOLSI
ST Employee

Hello @SNaga.6​ ?

Could you, please, attach a screenshot of the debug configuration.

Thanks,

Rim

Check SB12 for SWO/PB3 operation

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..