{"id":8414,"date":"2023-09-20T21:50:44","date_gmt":"2023-09-21T04:50:44","guid":{"rendered":"https:\/\/visualgdb.com\/w\/?p=8414"},"modified":"2023-09-20T21:55:10","modified_gmt":"2023-09-21T04:55:10","slug":"troubleshooting-keil-toolchain-issues","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/documentation\/toolchains\/keil\/","title":{"rendered":"Troubleshooting Keil Toolchain Issues"},"content":{"rendered":"<p>VisualGDB can automatically recognize the Keil ARMCC and ARMClang toolchains and import the installed device definitions from them:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2023\/09\/keil.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8415\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2023\/09\/keil.png\" alt=\"\" width=\"886\" height=\"693\" \/><\/a><\/p>\n<p>VisualGDB tries locating the toolchain by checking the <strong>HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Keil\\Products\\MDK\\Path<\/strong> value in the registry and then looking for the <strong>bin\\armcc.exe<\/strong> and <strong>bin\\armclang.exe<\/strong> files. This logic is defined in the <strong>%VISUALGDB_DIR%\\Rules\\KnownToolchains.xml<\/strong> file.<\/p>\n<p>If the automatic detection fails, you can simply click &#8220;Locate an IAR\/Keil toolchain manually&#8221; in the toolchain selector and point VisualGDB to the correct directory.<\/p>\n<h2>Importing Keil Packs<\/h2>\n<p>VisualGDB will automatically locate and import the Keil packs (device definitions) in the following directories:<\/p>\n<ul>\n<li>&lt;toolchain directory&gt;\\pack<\/li>\n<li>%LOCALAPPDATA%\\Arm\\Packs<\/li>\n<\/ul>\n<p>You can also specify additional directories to check for packs via <strong><span id=\"FullSettingPath\">Tools-&gt;Options-&gt;VisualGDB-&gt;Embedded-&gt;Keil-&gt;Extra pack directories<\/span><\/strong>.<\/p>\n<h2>Obtaining Diagnostic Logs<\/h2>\n<p>If you do not see the Keil devices in the list, you can troubleshoot it by opening <strong>View-&gt;Other Windows-&gt;VisualGDB Diagnostics Console<\/strong>, enabling logging there, and clicking <strong>Tools-&gt;VisualGDB-&gt;Manage VisualGDB Packages <\/strong>to force VisualGDB to rescan all installed packages. Here is a sample output showing the package location:<\/p>\n<pre class=\"\">Looking for Keil packages for e:\\Keil_v5\\ARM\\ARMCLANG...\r\nScanning e:\\Keil_v5\\ARM\\pack...\r\nFound 0 packages in e:\\Keil_v5\\ARM\\pack.\r\nScanning C:\\Users\\vmuser\\AppData\\Local\\Arm\\Packs...\r\nFound 10 packages in C:\\Users\\vmuser\\AppData\\Local\\Arm\\Packs.<\/pre>\n<p>If the directories shown there don&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VisualGDB can automatically recognize the Keil ARMCC and ARMClang toolchains and import the installed device definitions from them: VisualGDB tries<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[202],"tags":[147],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/8414"}],"collection":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/comments?post=8414"}],"version-history":[{"count":1,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/8414\/revisions"}],"predecessor-version":[{"id":8416,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/8414\/revisions\/8416"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=8414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=8414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=8414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}