cancel
Showing results for 
Search instead for 
Did you mean: 

VSCode Debugging: How to skip image download to MCU when launching debug session?

BKara.3
Associate II

Hello everyone,

We are exploring a transition from Eclipse based CubeIDE to VSCode. While progress on STM32 VSCode plugin is progressing, there is still some rough edges that should be fixed.

 

One of it is as in subject... How to skip image download to MCU when launching debug session?

 

We are trying to import TF-M project from mainline Trusted Firmware Repository to our vscode environment. We successfully built and run BL2, TFM_S and TFM_NS, but unfortunately we are still struggling with debugging.

 

How to start debug (we are using JLink) but to skip download of the image? TF-M is "fragile" to any flash rewrite, and we would like to just start debug session without any flash download.

Something similar as in Eclipse STM32CubeIDE:

BKara3_0-1758552449247.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Florent V
ST Employee

Hi BKara,

In your debug configuration you should have the attribute:

"imagesAndSymbols": [
    {
       "imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
    }
]
 
Replace imageFileName attribute by symbolFilename to load only the symbols.
 
"imagesAndSymbols": [
    {
        "symbolFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
    }
]

BR,
Flo
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.

View solution in original post

5 REPLIES 5
Florent V
ST Employee

Hi BKara,

In your debug configuration you should have the attribute:

"imagesAndSymbols": [
    {
       "imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
    }
]
 
Replace imageFileName attribute by symbolFilename to load only the symbols.
 
"imagesAndSymbols": [
    {
        "symbolFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
    }
]

BR,
Flo
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.
BKara.3
Associate II

Hi Florent, 

Yes, that was that.

Just to confirm, if there are multiple entries like:

"imagesAndSymbols": [
    {
        "symbolFileName": "${workspaceFolder}/build_s/bin/bl2.elf"
    },
    {
        "symbolFileName": "${workspaceFolder}/build_s/bin/tfm_s.elf"
    }
]

 debugger will load all entries?

Thanks
Branko

Hi,

Exactly, and in the same order of declaration.

BR,
Flo

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.

Flo,

 

One more time, thank you for your answer. 

We had some problems to run multiple images this way with JLink debugger in VS Code.

I do not know how to report, it's just not work, debugging want even start. Maybe it's the problem in our configuration (we are debugging 3 projects, BL2, TFM_S and TFM_NS), but in classic STM32CubeIDE this was working flawlessly. 

 

We will try to formalize bug report, but could I kindly ask you to give comments if JLink multiple images are tested/proven working.

 

Thanks
Branko

LudovicR
ST Employee

Hi BKara,

We have tested okay multiple elf with JLink, the order is important just like in STM32CubeIDE.

I understand you have migrated your STM32CubeIDE project to CMake VSCode, and rebuilt it inside VSCode. In that case I guess you have to reload VSCode generated images onto your board.

Which device are you using?

 

BR, 

Ludovic