{"id":11683,"date":"2017-07-11T16:13:10","date_gmt":"2017-07-11T15:13:10","guid":{"rendered":"https:\/\/sysprogs.com\/w\/?p=11683"},"modified":"2017-07-11T16:13:10","modified_gmt":"2017-07-11T15:13:10","slug":"introducing-the-new-toolchain-engine","status":"publish","type":"post","link":"https:\/\/sysprogs.com\/w\/introducing-the-new-toolchain-engine\/","title":{"rendered":"Introducing the New Toolchain Engine"},"content":{"rendered":"<p>Today we are proud to announce the\u00a0release of VisualGDB 5.3 Preview 3 that introduces a new\u00a0improved\u00a0engine for toolchains and BSPs. The new engine completely decouples project settings from toolchain settings, letting you easily switch between different toolchain options and seamlessly open projects on\u00a0machines\u00a0that have different toolchain\/BSP installation directories.<\/p>\n<p><a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/tc.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11684\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/tc.png\" alt=\"tc\" width=\"633\" height=\"202\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/tc.png 633w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/tc-300x96.png 300w\" sizes=\"(max-width: 633px) 100vw, 633px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<h2>Toolchains<\/h2>\n<p>The previous VisualGDB versions stored toolchain information inside project files. E.g. if you had a Raspberry Pi toolchain installed in <strong>C:\\SysGCC\\Raspberry<\/strong>, the path would get stored inside the project file and in the related Make files (if you were using GNU Make). Opening the project on a different machine\u00a0where the toolchain is installed in <strong>D:\\SysGCC\\Raspberry<\/strong> would require minor edits.\u00a0\u00a0VisualGDB\u00a0tried to\u00a0detect the changed paths automatically and update the projects, but it did not work\u00a0with all combinations of\u00a0paths.<\/p>\n<p>Starting from VisualGDB 5.3 Preview 3, all toolchain-specific settings are stored separately from the projects. Location,\u00a0path mappings (e.g. <strong>\/cygdrive\/c\/foo<\/strong> vs <strong>\/c\/foo<\/strong> or <strong>c:\/foo<\/strong>) and other settings like extra PATH directories are now conveniently stored in\u00a0the toolchain profiles under <strong>%LOCALAPPDATA%\\VisualGDB\\ToolchainProfiles<\/strong>.\u00a0Instead of duplicating\u00a0these\u00a0settings, the projects automatically inherit them from the selected toolchain and still allow you to override any of the settings via\u00a0VisualGDB Project Properties.<\/p>\n<p>New per-project variables like $(ToolchainDir) and $(ToolchainMake) and environment variables like $(TOOLCHAIN_ROOT) are\u00a0automatically set to point to the correct toolchain on each\u00a0developer machine, so you don&#8217;t need to\u00a0hardcode any paths or manually configure environment variables:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/make.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11685\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/make.png\" alt=\"make\" width=\"803\" height=\"577\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/make.png 803w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/make-300x216.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/make-768x552.png 768w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/a><\/p>\n<p>The same now works for MSBuild projects: instead of\u00a0\u00a0setting the toolchain path, the projects\u00a0now\u00a0only need to\u00a0contain the toolchain ID and version:<\/p>\n<p><a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/msbuild.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11686\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/msbuild.png\" alt=\"msbuild\" width=\"822\" height=\"558\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/msbuild.png 822w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/msbuild-300x204.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/msbuild-768x521.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/a><\/p>\n<p>VisualGDB can now understand multiple versions of the same toolchain installed in different directories and let you choose a specific version for each project, so you can\u00a0take it easy experimenting with a new toolchain, while using the old one for the critical projects (this is supported starting from the Custom edition). If you don&#8217;t have the same toolchain version installed on all your\u00a0development machines,\u00a0VisualGDB will help you choose a substitute when you open a project:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/replace.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11687\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/replace.png\" alt=\"replace\" width=\"396\" height=\"294\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/replace.png 396w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/replace-300x223.png 300w\" sizes=\"(max-width: 396px) 100vw, 396px\" \/><\/a><\/p>\n<h2>Invariant File Paths<\/h2>\n<p>One big limitation of the Visual C++ projects is that they\u00a0normally\u00a0reference all source files by their relative paths. So if\u00a0your project is located in c:\\Projects\\Demo and the BSP package with the embedded board drivers is in c:\\users\\me\\AppData\\Local\\VisualGDB, the project file will contain paths like <strong>..\\..\\users\\me\\AppData\u00a0<\/strong>that would cause trouble when opening the project on different machines.<\/p>\n<p>So VisualGDB 5.3 Preview 3 introduces a powerful workaround to that. Instead\u00a0of relying on limited Visual Studio APIs to edit the files, VisualGDB now edits the <strong>.vcxproj<\/strong> files directly and uses variables like $(BSP_ROOT) to encode all paths within the .vxcproj file:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/xml.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11688\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/xml.png\" alt=\"xml\" width=\"786\" height=\"377\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/xml.png 786w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/xml-300x144.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/xml-768x368.png 768w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/a><\/p>\n<p>This makes the project file completely independent from\u00a0the\u00a0locations of the toolchain, BSP, unit test frameworks or firmware packages on each development machine and avoid unnecessary\u00a0noise in the source control system when the file is modified by different developers. VisualGDB automatically generates\u00a0MSBuild rules for deriving paths like BSP_ROOT from\u00a0the BSP ID and the toolchain ID under your %LOCALAPPDATA%, so the projects don&#8217;t need to contain any of\u00a0them.<\/p>\n<h2>Multiple BSP Versions<\/h2>\n<p>Like with toolchains, we made it easy to install different versions of the same BSP side-by-side. Simply click &#8220;Allow installing multiple versions of this BSP&#8221; (Custom edition and higher) and VisualGDB will flag this BSP as a multi-version BSP:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/devices.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11689\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/devices.png\" alt=\"devices\" width=\"986\" height=\"436\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/devices.png 986w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/devices-300x133.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/devices-768x340.png 768w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><\/a><\/p>\n<p>You can then install older versions of it via the VisualGDB Package Manager\u00a0without replacing the\u00a0latest one:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/inst.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11692\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/inst.png\" alt=\"inst\" width=\"986\" height=\"436\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/inst.png 986w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/inst-300x133.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/inst-768x340.png 768w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><\/a><\/p>\n<p>Then simply pick the version you want when creating\u00a0or editing a project and\u00a0VisualGDB will associate your project with that specific version:<a href=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/ver.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11693\" src=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/ver.png\" alt=\"ver\" width=\"822\" height=\"642\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/ver.png 822w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/ver-300x234.png 300w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2017\/07\/ver-768x600.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/a><\/p>\n<p>You can retarget projects for different BSP versions via\u00a0VisualGDB Project Properties or simply\u00a0disable the multiple versions for your BSP to automatically use the same version for all projects.<\/p>\n<h2>Backward Compatibility<\/h2>\n<p>The new VisualGDB build will automatically pick up existing toolchains and will also import the in-project toolchain definitions from projects created with older versions, but projects created with the\u00a0v5.3 Preview 3 or later won&#8217;t build under older versions of\u00a0VisualGDB (unless you re-select the toolchain from the properties dialog of the older version). Embedded projects using the new $(BSP_ROOT) syntax won&#8217;t build on the older versions of VisualGDB unless you manually create a .props file translating IDs to directories and include it from the project file:<\/p>\n<pre class=\"\">&lt;Project ToolsVersion=\"4.0\" xmlns=\"http:\/\/schemas.microsoft.com\/developer\/msbuild\/2003\"&gt;\r\n &lt;PropertyGroup Condition=\"'$(BSP_ID)' != ''\"&gt;\r\n &lt;BSP_ROOT Condition=\"'$(BSP_ID)' == 'com.sysprogs.arm.stm32'\"&gt;$(LOCALAPPDATA)\/VisualGDB\/EmbeddedBSPs\/arm-eabi\/com.sysprogs.arm.stm32&lt;\/BSP_ROOT&gt;\r\n &lt;\/PropertyGroup&gt;\r\n&lt;\/Project&gt;<\/pre>\n<h3>Try it out<\/h3>\n<p>You can download VisualGDB 5.3 Preview 3 <a href=\"http:\/\/visualgdb.com\/download\/\">here<\/a>. As always, we will be excited to hear your feedback, so don&#8217;t hesitate to reach out to us via our <a href=\"http:\/\/sysprogs.com\/support\/\">support page<\/a>\u00a0 or <a href=\"http:\/\/sysprogs.com\/w\/visualgdb\">forum<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we are proud to announce the\u00a0release of VisualGDB 5.3 Preview 3 that introduces a new\u00a0improved\u00a0engine for toolchains and BSPs. The new engine completely decouples project settings from toolchain settings, letting you easily switch between different toolchain options and seamlessly open projects on\u00a0machines\u00a0that have different toolchain\/BSP installation directories.<\/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\/11683"}],"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=11683"}],"version-history":[{"count":4,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/11683\/revisions"}],"predecessor-version":[{"id":11696,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/11683\/revisions\/11696"}],"wp:attachment":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/media?parent=11683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/categories?post=11683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/tags?post=11683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}