cancel
Showing results for 
Search instead for 
Did you mean: 

N6 VS Code launch.json for debugging

JNT
Visitor

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!

 

0 REPLIES 0