2025-02-10 06:15 PM
I'm having some difficulty getting debugging working in VSCode for the N6 series. Does anyone have a sample one that actually works? I'm obviously using the `stlink` server backend for `cortex-debug`, and I have tried using CubeIDE to get the exact gdb-server arguments used when it launches a debug session. However even when I do that, I still end up with a corrupted stack pointer or missing sources? The symptom is that the debug session says something to the effect of "??@<hex> Unknown Source". It also seems to have problems halting the core at startup.
Here's something representative of the config I'm using right now:
{
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceFolder}",
"executable": "${workspaceFolder}/FSBL/build/<my_project_name>.elf",
"name": "Debug with ST-Link",
"request": "launch",
"type": "cortex-debug",
"runToEntryPoint": "main",
"showDevDebugOutput": "none",
"servertype": "stlink",
"serverArgs": [
"-l", "1", "-s", "-m", "1", "-k",
],
},
]
}
I've tried using a lot more arguments spelling out all the possible source locations, post-launch commands, etc, but so far it's been to no avail. Any help is appreciated!
2025-02-11 06:40 AM
Hello @JNT,
This issue is spotted and under investigation for STM32N6 product, the launch.json file is created with default STLink configuration (Not specific to N6), so not able to start a debug session (Internal ticket number: 197953), I will keep you updated!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.