{"id":11942,"date":"2017-08-07T07:21:17","date_gmt":"2017-08-07T06:21:17","guid":{"rendered":"https:\/\/sysprogs.com\/w\/?p=11942"},"modified":"2017-08-07T07:49:51","modified_gmt":"2017-08-07T06:49:51","slug":"the-updated-visualgdb-embedded-debug-experience","status":"publish","type":"post","link":"https:\/\/sysprogs.com\/w\/the-updated-visualgdb-embedded-debug-experience\/","title":{"rendered":"The Updated VisualGDB Embedded Debugging Experience"},"content":{"rendered":"<p>VisualGDB has a history of supporting embedded devices that has gone through several steps of evolution. The very first VisualGDB version released 5 years ago expected you to know the\u00a0gdb and OpenOCD command lines,\u00a0one of the next versions provided convenient GUI for locating OpenOCD scripts and settings that eventually morphed into\u00a0detecting the\u00a0settings for common devices and debug adapters, still requiring to go into script editing to support\u00a0choosing a specific ST-Link instance or turning on the &#8220;Connect under reset&#8221;.<\/p>\n<p>VisualGDB 5.3 Preview 5\u00a0replaces this experience with a much more streamlined (and powerful) UI and I will show you\u00a0its main highlights in this post.<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/intro.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11943\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/intro.png\" alt=\"intro\" width=\"637\" height=\"237\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/intro.png 637w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/intro-300x112.png 300w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<h2>Device View<\/h2>\n<p>The previous versions of VisualGDB relied on\u00a0some basic knowledge about the underlying debug tools.\u00a0Depending on the\u00a0type of your debug adapter you had to choose between Segger J-Link software, OpenOCD or the GDB stub for ESP8266 devices.\u00a0VisualGDB 5.3 Preview 5 abstracts this out. Simply plug in your USB debugger and VisualGDB will display it in the &#8220;USB Devices&#8221; view. Select it and VisualGDB will automatically pick the best\u00a0underlying debug method to use with your device. If multiple debug methods can work on the same device, VisualGDB will let you pick one:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/jlink.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11944\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/jlink.png\" alt=\"jlink\" width=\"637\" height=\"197\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/jlink.png 637w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/jlink-300x93.png 300w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/a><\/p>\n<p>If you have connected more than one debug adapter of the same type (e.g. several ST boards with on-board ST-Links), VisualGDB\u00a0will let you pick a specific\u00a0instance, remember its serial number and automatically pass it to OpenOCD or Segger software so you won&#8217;t need to edit any settings manually.<\/p>\n<h2>Advanced Settings<\/h2>\n<p>For advanced users that want to customize\u00a0the OpenOCD (or Segger Software) command lines and startup commands, we added a special advanced view. Simply expand it and you&#8217;ll be able to edit the command line and the\u00a0corresponding GDB startup commands used by VisualGDB:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/advanced.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11945\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/advanced.png\" alt=\"advanced\" width=\"822\" height=\"642\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/advanced.png 822w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/advanced-300x234.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/advanced-768x600.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/a><\/p>\n<p>You can use it to insert custom FLASH initialization code,\u00a0load custom data sections, setup clocks and more. The advanced settings\u00a0are linked with\u00a0the basic settings\u00a0configurable via the GUI, so you won&#8217;t\u00a0lose any of your custom settings when\u00a0editing common parameters via GUI.<\/p>\n<h2>New OpenOCD Experience<\/h2>\n<p>We have\u00a0completely redesigned\u00a0the settings page for OpenOCD with usability in mind. If you want to try a rare unsupported device or debug adapter, you no longer need to switch to the custom view\u00a0losing the simplicity of the basic view. Simply enable the &#8220;Show raw OpenOCD scripts&#8221; checkbox and you can choose\u00a0raw script files additionally to known devices and programming adapters:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/openocd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11946\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/openocd.png\" alt=\"openocd\" width=\"640\" height=\"481\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/openocd.png 640w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/openocd-300x225.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>We have also made it extremely easy to edit common settings hardcoded in OpenOCD scripts. You can now change the ST-Link frequency and enable the &#8220;connect under reset&#8221; mode via the GUI instead of locating and editing the OpenOCD scripts manually:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/newsettings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11947\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/newsettings.png\" alt=\"newsettings\" width=\"698\" height=\"359\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/newsettings.png 698w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/newsettings-300x154.png 300w\" sizes=\"(max-width: 698px) 100vw, 698px\" \/><\/a><\/p>\n<p>VisualGDB will automatically\u00a0create a temporary script with the necessary edits for you.<\/p>\n<h2>Better\u00a0Error Handling<\/h2>\n<p>The new Device View makes VisualGDB aware of the exact USB\u00a0programmer instance used with the project, so it can check and fix more common errors. If you start debugging your project on a different machine with multiple ST-Links attached to it, instead of\u00a0letting OpenOCD produce a cryptic error message,\u00a0VisualGDB will simply let you choose\u00a0the instance you want to use:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/multidev.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11948\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/multidev.png\" alt=\"multidev\" width=\"386\" height=\"243\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/multidev.png 386w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/multidev-300x189.png 300w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a>VisualGDB will now check for missing USB drivers\u00a0each time you start debugging your project, so you won&#8217;t need to go to the\u00a0debug settings and check the drivers manually:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/driver.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11949\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/driver.png\" alt=\"driver\" width=\"896\" height=\"189\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/driver.png 896w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/driver-300x63.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/driver-768x162.png 768w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/a><\/p>\n<p>For errors that could not be automatically diagnosed, VisualGDB will try to automatically extract the error text from the OpenOCD\/J-Link log and will let you quickly view the entire log with one click\u00a0of a mouse:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-11950\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/error-1024x295.png\" alt=\"error\" width=\"474\" height=\"137\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/error-1024x295.png 1024w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/error-300x86.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/error-768x221.png 768w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/error.png 1631w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>We have also extended the automatic connection testing to\u00a0all major\u00a0debug methods and made it more comprehensive. Instead of just checking that the OpenOCD output looks right, VisualGDB will actually try connecting to it and reading the device registers, letting you catch common configuration errors easier\u00a0straight from the settings window:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-11951\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/test-1024x641.png\" alt=\"test\" width=\"474\" height=\"297\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/test-1024x641.png 1024w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/test-300x188.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/test-768x480.png 768w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/test.png 1175w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<h2>Improved ESP8266\/ESP32 Debugging<\/h2>\n<p>We have also released updates to our ESP8266 and ESP32 toolchains that\u00a0use\u00a0the new debug method system.\u00a0Aside from being able to add custom startup commands, we have added a convenient interface for including embedded resources (binary files programmed a fixed addresses in FLASH). Simply use the new GUI and\u00a0VisualGDB will program the extra files automatically:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/espxx.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11953\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/espxx.png\" alt=\"espxx\" width=\"822\" height=\"642\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/espxx.png 822w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/espxx-300x234.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/espxx-768x600.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/a><\/p>\n<h2>Backward Compatibility<\/h2>\n<p>Once you convert your project to the new VisualGDB 5.3 Preview 5 format,\u00a0opening it with the previous VisualGDB versions would require re-entering debug settings. The rest of the settings\u00a0are backward compatible. If you prefer the old debug method-based view, you can always switch back to it by selecting &#8220;Show: Debug Methods&#8221;:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/methods.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11952\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/methods.png\" alt=\"methods\" width=\"687\" height=\"317\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/methods.png 687w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/08\/methods-300x138.png 300w\" sizes=\"(max-width: 687px) 100vw, 687px\" \/><\/a><\/p>\n<p>VisualGDB will remember the last used mode and automatically choose it when creating new projects.<\/p>\n<h2>Try it Out<\/h2>\n<p>You can download VisualGDB 5.3 Preview 5 from the <a href=\"https:\/\/visualgdb.com\/download\/\">download page<\/a>. Don&#8217;t forget to update your debug packages and toolchains via Tools-&gt;VisualGDB-&gt;Manage VisualGDB Packages. Give it a shot and never hesitate to submit feedback via the <a href=\"https:\/\/sysprogs.com\/w\/forums\/forum\/visualgdb\/\">forums <\/a>or <a href=\"http:\/\/sysprogs.com\/support\/\">support form<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VisualGDB has a history of supporting embedded devices that has gone through several steps of evolution. The very first VisualGDB version released 5 years ago expected you to know the\u00a0gdb and OpenOCD command lines,\u00a0one of the next versions provided convenient GUI for locating OpenOCD scripts and settings that eventually morphed into\u00a0detecting the\u00a0settings for common devices &hellip; <a href=\"https:\/\/sysprogs.com\/w\/the-updated-visualgdb-embedded-debug-experience\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The Updated VisualGDB Embedded Debugging Experience<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[422],"_links":{"self":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/11942"}],"collection":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/comments?post=11942"}],"version-history":[{"count":8,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/11942\/revisions"}],"predecessor-version":[{"id":11963,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/11942\/revisions\/11963"}],"wp:attachment":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/media?parent=11942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/categories?post=11942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/tags?post=11942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}