Troubleshooting Keil Toolchain Issues

VisualGDB can automatically recognize the Keil ARMCC and ARMClang toolchains and import the installed device definitions from them:

VisualGDB tries locating the toolchain by checking the HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Keil\Products\MDK\Path value in the registry and then looking for the bin\armcc.exe and bin\armclang.exe files. This logic is defined in the %VISUALGDB_DIR%\Rules\KnownToolchains.xml file.

If the automatic detection fails, you can simply click “Locate an IAR/Keil toolchain manually” in the toolchain selector and point VisualGDB to the correct directory.

Importing Keil Packs

VisualGDB will automatically locate and import the Keil packs (device definitions) in the following directories:

  • <toolchain directory>\pack
  • %LOCALAPPDATA%\Arm\Packs

You can also specify additional directories to check for packs via Tools->Options->VisualGDB->Embedded->Keil->Extra pack directories.

Obtaining Diagnostic Logs

If you do not see the Keil devices in the list, you can troubleshoot it by opening View->Other Windows->VisualGDB Diagnostics Console, enabling logging there, and clicking Tools->VisualGDB->Manage VisualGDB Packages to force VisualGDB to rescan all installed packages. Here is a sample output showing the package location:

Looking for Keil packages for e:\Keil_v5\ARM\ARMCLANG...
Scanning e:\Keil_v5\ARM\pack...
Found 0 packages in e:\Keil_v5\ARM\pack.
Scanning C:\Users\vmuser\AppData\Local\Arm\Packs...
Found 10 packages in C:\Users\vmuser\AppData\Local\Arm\Packs.

If the directories shown there don’t match the expected ones, or the log shows some exceptions, double-check all paths and permissions, and make sure VisualGDB can access the pack files.