{"id":138,"date":"2014-11-14T17:10:00","date_gmt":"2014-11-14T17:10:00","guid":{"rendered":"http:\/\/visualgdb.com\/w\/?p=138"},"modified":"2014-11-14T17:10:00","modified_gmt":"2014-11-14T17:10:00","slug":"cubieboard-crosscompiler","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/cubieboard\/crosscompiler\/","title":{"rendered":"Using a Cross-compiler for Cubieboard"},"content":{"rendered":"\n<p>This tutorial shows how to build Linux applications for Cubieboard using a cross-compiler. Cross-compiling is faster than a normal build, however requires some additional maintenance steps.<\/p>\n<p>Before we begin, ensure that <a href=\"\/download\">VisualGDB 4.3<\/a> or later is installed and try creating a direct project by following the <a href=\"http:\/\/visualgdb.com\/tutorials\/cubieboard\/crosscompiler\/..\/\">Cubieboard tutorial<\/a>.<\/p>\n<ol>\n<li>Open Visual Studio. Start the VisualGDB Linux Project Wizard: <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/01-wizard.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/01-wizard.png\" alt=\"01-wizard\" width=\"700\" height=\"394\" \/><\/a><\/li>\n<li>Select &#8220;Create a new project&#8221;:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/02-newapp.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/02-newapp.png\" alt=\"02-newapp\" width=\"696\" height=\"628\" \/><\/a><\/li>\n<li>On the next page select &#8220;Build the project locally with a cross-compiler&#8221;. Then select the connection corresponding to your board in the &#8220;Deployment Computer&#8221; field and select &#8220;Cubieboard&#8221; toolchain. If you don&#8217;t have the toolchain yet, VisualGDB will download and install it automatically:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/03-gettoolchain.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/03-gettoolchain.png\" alt=\"03-gettoolchain\" width=\"696\" height=\"628\" \/><\/a><\/li>\n<li>Once the toolchain is installed, press Finish. VisualGDB will test the toolchain and setup IntelliSense:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/04-test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/04-test.png\" alt=\"04-test\" width=\"696\" height=\"631\" \/><\/a><\/li>\n<li>Build your project by pressing Ctrl-Shift-B:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/05-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/05-build.png\" alt=\"05-build\" width=\"699\" height=\"644\" \/><\/a>You will notice that the build happens much faster compared to building on the board.<\/li>\n<li>Set a breakpoint inside your main() function and start debugging by pressing F5:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/06-debug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/06-debug.png\" alt=\"06-debug\" width=\"699\" height=\"644\" \/><\/a>The debugging experience will be similar to normal Visual Studio debugging.<\/li>\n<li>Right-click on the project and select &#8220;VisualGDB Project Properties&#8221;. Then go to the Makefile Settings page:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/07-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/crosscompiler\/07-settings.png\" alt=\"07-settings\" width=\"700\" height=\"563\" \/><\/a>Each time you install new libraries on the device, you will need to re-synchronize the sysroot with your toolchain by pressing the corresponding button in the settings dialog. You can use other pages of the settings dialog to configure various aspects of building and debugging.<\/li>\n<\/ol>\n<p><\/root><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to build Linux applications for Cubieboard using a cross-compiler. Cross-compiling is faster than a normal build,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[72,35,33],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/138"}],"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=138"}],"version-history":[{"count":0,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/138\/revisions"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}