2025-07-25 10:17 AM
Hi everyone,
I am trying to debug my CubeMX (CMake/Ninja) project based on the STM32H7A3VG in VSCode.
When I use the elf-File in Ozone I can step through the code as expected. With VSCode the debugger seems to start, but no debugging is possible.
Other controller like STM32F446x or STM32F407xx I can debug with no problem.
I adapted the launch.json for the STM32H7A3VG and its M7 core also with the help of chatgpt but something is missing, I guess.
Here is my launch.json:
---------
{
[2025-07-25T17:12:01.110Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:/programme/SEGGER/JLink_V854/JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50001 -swoport 50002 -telnetport 50003 -device STM32H7A3VG -select usb=269302857
SEGGER J-Link GDB Server V8.54 Command Line Version
JLinkARM.dll V8.54 (DLL compiled Jul 23 2025 12:20:05)
Command line: -singlerun -nogui -if swd -port 50001 -swoport 50002 -telnetport 50003 -device STM32H7A3VG -select usb=269302857
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 50001
SWO raw output listening port: 50002
Terminal I/O port: 50003
Accept remote connection: localhost only
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: STM32H7A3VG
Target device parameters: none
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled May 7 2021 16:26:12
Hardware: V9.30
S/N: 269302857
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.21 V
Listening on TCP/IP port 50001
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 0000:0000:0000:0000:0000:0000:0000:0001
GDB client (conn. 760) requested target.xml from GDB Server
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x00000020
Read register 'r1' (4 bytes) from hardware: 0x10000020
Read register 'r2' (4 bytes) from hardware: 0x30000020
Read register 'r3' (4 bytes) from hardware: 0xD1020008
Read register 'r4' (4 bytes) from hardware: 0x30000020
Read register 'r5' (4 bytes) from hardware: 0x00000000
Read register 'r6' (4 bytes) from hardware: 0x00000000
Read register 'r7' (4 bytes) from hardware: 0xF0FF0120
Read register 'r8' (4 bytes) from hardware: 0x00000000
Read register 'r9' (4 bytes) from hardware: 0x00000000
Read register 'r10' (4 bytes) from hardware: 0x00000000
Read register 'r11' (4 bytes) from hardware: 0x00000000
Read register 'r12' (4 bytes) from hardware: 0x00000000
Read register 'sp' (4 bytes) from hardware: 0xF0FF0120
Read register 'lr' (4 bytes) from hardware: 0x47290008
Read register 'pc' (4 bytes) from hardware: 0x56260008
Read register 'xpsr' (4 bytes) from hardware: 0x00000061
Read 4 bytes @ address 0x08002656 (Data = 0xF88DF000)
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x1FF0F7CC)
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x1FF0F7CC)
Received monitor command: reset
Resetting target
Downloading 684 bytes @ address 0x08000000
Downloading 9936 bytes @ address 0x080002AC
Downloading 360 bytes @ address 0x0800297C
Downloading 4 bytes @ address 0x08002AE4
Downloading 4 bytes @ address 0x08002AE8
Downloading 16 bytes @ address 0x08002AEC
Writing register 'pc' = 0x0800290C
Comparing flash [....................] Done.
Received monitor command: reset
Resetting target
Reading 64 bytes @ address 0x08002640
Read 2 bytes @ address 0x08002656 (Data = 0xF000)
Read 2 bytes @ address 0x08002656 (Data = 0xF000)
Read 2 bytes @ address 0x0800265A (Data = 0xF7FF)
Read 2 bytes @ address 0x08002666 (Data = 0x2300)
Read 2 bytes @ address 0x08002656 (Data = 0xF000)
Setting breakpoint @ address 0x08002656, Kind = 2, Type = THUMB, BPHandle = 0x0001
Setting breakpoint @ address 0x0800265A, Kind = 2, Type = THUMB, BPHandle = 0x0002
Setting breakpoint @ address 0x08002666, Kind = 2, Type = THUMB, BPHandle = 0x0003
Starting target CPU...
Solved! Go to Solution.
2025-07-27 4:50 AM
Problem solved. Sorry to bother you here.
I got BOOT0 pin wrongly on 3.3V.
2025-07-27 4:50 AM
Problem solved. Sorry to bother you here.
I got BOOT0 pin wrongly on 3.3V.