cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to debug - missing CMSIS_PACK_ROOT

AHugh.2
Associate III

Hi, 

My projet has been working fine until the last week or so where I can no longer debug. When I press F5 I get a "Missing CMSIS_PACK_ROOT" with a notification toast message of "gdb is not running".

Nothing has changed in terms of project settings, launch.json, etc. as far as I'm aware. All STM32 extensions and packs are the latest (these might have updated recently - i've tried older versions as a test but that didn't help).

  • Target device is STM32C562.
  • Using ST-Link GDB Server.
  • Windows 11 OS

Here is the log of "STM32Cube core" at startup.

2026-05-13 08:23:08.715 [Info]  Adding STM32Cube CLI path to environment: c:\Users\ZZZ\.vscode\extensions\stmicroelectronics.stm32cube-ide-core-1.3.0-win32-x64\resources\binaries\win32\x86_64
2026-05-13 08:23:09.984 [Info]  Configuring CUBE_BUNDLE_PATH environment: C:\Users\ZZZ\AppData\Local\stm32cube\bundles
2026-05-13 08:23:09.985 [Info]  NODE_EXTRA_CA_CERTS is not set
2026-05-13 08:23:10.369 [Info]  CMSIS_PACK_ROOT=C:\Users\ZZZ\AppData\Local\stm32cube\packs
2026-05-13 08:23:15.386 [Info]  cube wrapper version: 0.10.2
2026-05-13 08:23:16.090 [Info]  Online bundle cache built
2026-05-13 08:23:16.189 [Info]  Installing STM32Cube Bundle prerequisites
2026-05-13 08:23:16.735 [Info]  STM32Cube Core activated (8061 ms)
2026-05-13 08:23:16.735 [Info]  Syncing CMSIS-Pack metadata for C:\Users\ZZZ\AppData\Local\stm32cube\packs
2026-05-13 08:23:16.739 [Info]  No need to sync metadata; it was recently updated.

 I can't see anything else of note in any of the other output logs.

My launch.json:

"version": "0.2.0",
    "configurations": [
        {
            "type": "stlinkgdbtarget",
            "request": "launch",
            "name": "STM32Cube: STM32 Launch ST-Link GDB Server",
            "origin": "snippet",
            "cwd": "${workspaceFolder}",
            "runEntry": "main",
            "preRunCommands": [
                "set output-radix 16"
            ],            
            "imagesAndSymbols": [
                {
                    "imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
                }
            ],
            "liveWatch": {
                "enabled": true,
                "samplesPerSecond": "4"
            },
            //"quickReset": [
            //    "monitor reset",
            //    "tbreak main",
            //    "continue"
            //]            
        }
    ]
}

I tried the project on another PC and that seems to work (all STM32 extensions updated to latest) so it looks like a local problem.

I've also ran the "Set Up STM32Cube project(s)" command again.

Any ideas how I can resolve this, or see what is going wrong?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Julien D
ST Employee

Hi @AHugh.2,

This is a recurring, sporadic issue that some users are experiencing, and we are still struggling to identify the root cause.

A workaround that often works is to hard-code the CMSIS_PACK_ROOT environment variable in the system variables, using C:\Users\ZZZ\AppData\Local\stm32cube\packs as the value in your case.

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

2 REPLIES 2
Julien D
ST Employee

Hi @AHugh.2,

This is a recurring, sporadic issue that some users are experiencing, and we are still struggling to identify the root cause.

A workaround that often works is to hard-code the CMSIS_PACK_ROOT environment variable in the system variables, using C:\Users\ZZZ\AppData\Local\stm32cube\packs as the value in your case.

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.
AHugh.2
Associate III

Thanks Julien, that has resolved my debugging.

I have had this error as a recurring issue for a long time and usually restarting VSCode or even the PC resolves it but in this case it didn't.

Hope you get to the root cause of the issue!

Thanks.