{"id":2534,"date":"2017-02-02T20:36:19","date_gmt":"2017-02-03T04:36:19","guid":{"rendered":"https:\/\/visualgdb.com\/w\/?p=2534"},"modified":"2017-02-02T20:36:19","modified_gmt":"2017-02-03T04:36:19","slug":"using-visualgdb-with-yocto-toolchains","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/linux\/yocto\/","title":{"rendered":"Using VisualGDB with Yocto toolchains"},"content":{"rendered":"<p>This tutorial shows how to use VisualGDB with cross-toolchains built via the <a href=\"https:\/\/www.yoctoproject.org\/\">Yocto project<\/a>. The Yocto cross-toolchains typically run on an x86 or x64 Linux machine and compile code for an embedded ARM boards. Unlike the regular cross-toolchains that have the settings embedded into them, Yocto toolchains require special environment setup files in order to work correctly. This tutorial shows how to use VisualGDB with a Yocto-based toolchain that uses an environment setup file.<\/p>\n<p>Before you begin, install VisualGDB 5.2r8 or later.<\/p>\n<ol>\n<li>Start Visual Studio and open the VisualGDB Linux Project Wizard:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/01-prj.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2535\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/01-prj.png\" alt=\"01-prj\" width=\"909\" height=\"585\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/01-prj.png 909w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/01-prj-300x193.png 300w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/li>\n<li>Select Create a new project -&gt; Application -&gt; Use MSBuild:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/02-msbuild.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2536\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/02-msbuild.png\" alt=\"02-msbuild\" width=\"832\" height=\"662\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/02-msbuild.png 832w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/02-msbuild-300x239.png 300w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/a>The yocto toolchains will also work with GNU Make and CMake build systems.<\/li>\n<li>On the next page choose the computer where you have the Yocto-based toolchain installed and then select &#8220;Specify a Yocto environment file&#8221; in the &#8220;Remote toolchain&#8221; field:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/03-getyocto.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2537\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/03-getyocto.png\" alt=\"03-getyocto\" width=\"832\" height=\"662\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/03-getyocto.png 832w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/03-getyocto-300x239.png 300w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/a><\/li>\n<li>Locate and select the environment setup file from your toolchain:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/04-poky.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2538\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/04-poky.png\" alt=\"04-poky\" width=\"486\" height=\"294\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/04-poky.png 486w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/04-poky-300x181.png 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/a><\/li>\n<li>Select &#8220;Deploy the project to another Linux computer&#8221; and specify the target board below:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/05-deploy.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2539\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/05-deploy.png\" alt=\"05-deploy\" width=\"832\" height=\"662\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/05-deploy.png 832w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/05-deploy-300x239.png 300w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/a><\/li>\n<li>Proceed with the default settings on the next page and click &#8220;Finish&#8221; to create a project:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/06-sources.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2540\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/06-sources.png\" alt=\"06-sources\" width=\"832\" height=\"662\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/06-sources.png 832w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/06-sources-300x239.png 300w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/a><\/li>\n<li>VisualGDB will generate a basic project for you. Build it via Ctrl-Shift-B:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/07-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2541\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/07-build.png\" alt=\"07-build\" width=\"1019\" height=\"700\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/07-build.png 1019w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/07-build-300x206.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/07-build-130x90.png 130w\" sizes=\"(max-width: 1019px) 100vw, 1019px\" \/><\/a><\/li>\n<li>You can press F5 to automatically deploy the application to the target board and start debugging it:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/08-debug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2542\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/08-debug.png\" alt=\"08-debug\" width=\"1019\" height=\"700\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/08-debug.png 1019w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/08-debug-300x206.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/08-debug-130x90.png 130w\" sizes=\"(max-width: 1019px) 100vw, 1019px\" \/><\/a><\/li>\n<li>Open the VisualGDB Project Properties and check the environment variables on the MSBuild settings page. Note that the Yocto environment setup file is listed as an environment variable with the &#8220;&lt;&#8221; prefix. You can use the same syntax everywhere across VisualGDB Project Properties to configure VisualGDB to source environment scripts before running your commands: <a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/09-envvar.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2543\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/09-envvar.png\" alt=\"09-envvar\" width=\"1019\" height=\"700\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/09-envvar.png 1019w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/09-envvar-300x206.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2017\/02\/09-envvar-130x90.png 130w\" sizes=\"(max-width: 1019px) 100vw, 1019px\" \/><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to use VisualGDB with cross-toolchains built via the Yocto project. The Yocto cross-toolchains typically run on<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[72,33],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/2534"}],"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=2534"}],"version-history":[{"count":1,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/2534\/revisions"}],"predecessor-version":[{"id":2544,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/2534\/revisions\/2544"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=2534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=2534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=2534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}