Skip to main content
Visitor II
September 22, 2025
Solved

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

  • September 22, 2025
  • 3 replies
  • 667 views

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

 

    This topic has been closed for replies.
    Best answer by Florent V

    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

    3 replies

    Florent VAnswer
    ST Employee
    September 22, 2025

    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
    BKara.3Author
    Visitor II
    September 25, 2025

    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

    ST Employee
    September 25, 2025

    Hi,

    Exactly, and in the same order of declaration.

    BR,
    Flo

    BKara.3Author
    Visitor II
    October 16, 2025

    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

    ST Employee
    October 17, 2025

    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