cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7R7 VS Code debug settings

geriTricky
Associate

Hi All,

I have been working with the STM32H7R7 MCU for a while.  I used the getting started manual of the application notes for Eclipse, but I could not set up the right debug environment for the STM32H7R7 device

I used the cubemx to generate the boot, appli and ext memory. I used exactly the same ioc file (except the setting of the cmake vs cubeide), however I could not flash and debug the device without the right json file.

I tried to build by myself, but I was not lucky enough to be succesfull. Also I have not found any examples on the web.

Could somebody help me with a json file, environment for debug and flashing?

 

Thank you very much in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Ok, so in my case the issue was that STM32CubeIDE for Visual Studio Code did not install all its extensions from the pack. I had to manually install the ones that provide the stlinkgdbtarget.

Hope this might help someone with the same problem.

Lukas

View solution in original post

5 REPLIES 5
Nawres GHARBI
ST Employee

Hi @geriTricky 
this an example on STM32H7R3, you can take it as an example 

remember when setting multiple contexts, the last one flashed is the first one to boot

you can add as much context as binaries you will flash

 

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "type": "stlinkgdbtarget",
            "request": "launch",
            "name": "STM32Cube: STM32 Launch ST-Link GDB Server",
            "origin": "snippet",
            "cwd": "${workspaceFolder}",
            "preBuild": "${command:st-stm32-ide-debug-launch.build}",
            "runEntry": "main",
            "serverExtLoader": [
                {
                    "loader": "C:/Users/******/AppData/Local/stm32cube/bundles/programmer/2.21.0-a10/bin/ExternalLoader/MX25UW25645G_NUCLEO-H7S3L8.stldr",
                    "initialize": false
                }
            ],
            "imagesAndSymbols": [
                {
                    "imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"

                },
                       {
                    "imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context2}"

                }
            ]
        }
    ]
}

I have similar issues with STM32Cube VSCode plugin. The given launch.json example is not "minimal working launch configuration". What is the : "type": "stlinkgdbtarget"? It cannot be found in extension list. Previous version of the plugin (2.xx) worked fine with cortex-debug type but now what kind of config type should be used instead?

Thanks,

Lukas

Ok, so in my case the issue was that STM32CubeIDE for Visual Studio Code did not install all its extensions from the pack. I had to manually install the ones that provide the stlinkgdbtarget.

Hope this might help someone with the same problem.

Lukas

vincent_grenet
ST Employee

@lukaspohl86it seems that unusual dependencies are not being pulled from the marketplace. Could you please let us know which version of the extension pack you currently have active? The "stlinkgdbtarget" dependency is included starting from version 3.x.y and above.

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.

Currently the STM32CubeIDE version that I am using is 3.6.4. But this glitch might have been caused by my attempt to move the whole STM ecosystem to separate VSCode profile (since the extension currently brakes the python debugging).