{"id":71,"date":"2014-11-14T16:52:47","date_gmt":"2014-11-14T16:52:47","guid":{"rendered":"http:\/\/visualgdb.com\/w\/?p=71"},"modified":"2014-11-14T16:52:47","modified_gmt":"2014-11-14T16:52:47","slug":"cubieboard","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/cubieboard\/","title":{"rendered":"Developing a Cubieboard App with Visual Studio"},"content":{"rendered":"\n<p>This tutorial demonstrates how to build and debug a simple <a href=\"http:\/\/cubieboard.org\/\">Cubieboard<\/a> application using Visual Studio. Cubieboard devices are shipped with an Android image in the internal FLASH memory. Alternatively, you can download a Linux image from <a href=\"http:\/\/cubieboard.org\/download\/\">cubieboard.org<\/a> and program either the internal memory or an SD card.<\/p>\n<p>For steps on creating a basic Android app, follow the <a href=\"\/tutorials\/android\/\">Android tutorial<\/a>.&nbsp;<br \/>\n\t\t\t\tHere we will show how to make a basic app for the Linux image.<br \/>\n\t\t\t\tWe will use the Cubieboard2 in this tutorial, however the steps<br \/>\n\t\t\t\tbelow are valid for all boards of the same family given that a<br \/>\n\t\t\t\tcorrect SD card image is used.<\/p>\n<ol>\n<li>Download a Cubieboard Linux image for SD cards (don&#8217;t confuse it with images for the internal memory), download <a href=\"http:\/\/winflashtool.sysprogs.com\/\">WinFLASHTool<\/a> and use it to write the image to the SD card:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/01-flashtool.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/01-flashtool.png\" alt=\"01-flashtool\" width=\"640\" height=\"480\" \/><\/a><\/li>\n<li>Insert the SD card into the board, connect the network cable and the power cable:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/02-cubie.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/02-cubie.jpg\" alt=\"02-cubie\" width=\"700\" height=\"327\" \/><\/a><\/li>\n<li>Start Visual Studio. Create a new Linux project with VisualGDB Project Wizard:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/03-newprj.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/03-newprj.png\" alt=\"03-newprj\" width=\"700\" height=\"394\" \/><\/a><\/li>\n<li>Proceed with the default settings on the first page of the wizard:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/04-app.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/04-app.png\" alt=\"04-app\" width=\"696\" height=\"628\" \/><\/a><\/li>\n<li>On the second page select &#8220;Create a new SSH connection&#8221;, then enter the host name, user name and the password for your Cubieboard. The default settings are listed below:<br \/>\n<table style=\"width: 100%\" class=\"neat_table\">\n<tr>\n<td>Host name<\/td>\n<td>cubieboard2<\/td>\n<\/tr>\n<tr>\n<td>User name<\/td>\n<td>linaro<\/td>\n<\/tr>\n<tr>\n<td>Password<\/td>\n<td>linaro<\/td>\n<\/tr>\n<\/table>\n<p><a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/05-conn.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/05-conn.png\" alt=\"05-conn\" width=\"694\" height=\"627\" \/><\/a><\/li>\n<li>The simplest way to proceed would be to build the code directly on Cubieboard. This is slower than using a cross-toolchain, but requires fewer setup. Proceed with the default toolchain:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/06-toolchain.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/06-toolchain.png\" alt=\"06-toolchain\" width=\"696\" height=\"628\" \/><\/a><\/li>\n<li>When you press &#8220;Next&#8221;, VisualGDB will detect that the image is missing the gdb debugger and will install it automatically:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/07-getgdb.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/07-getgdb.png\" alt=\"07-getgdb\" width=\"700\" height=\"516\" \/><\/a>If you encounter 404 errors during the package downloading, ensure that your \/etc\/apt\/sources.list contains the following lines:\n<pre>deb http:\/\/old-releases.ubuntu.com\/ubuntu\/ quantal main universe\r\ndeb-src http:\/\/old-releases.ubuntu.com\/ubuntu\/ quantal main universe<\/pre>\n<\/li>\n<li>By default VisualGDB will keep the source files on your Windows machine and will transfer them to Cubieboard for building. Keep this setting for now:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/08-copycode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/08-copycode.png\" alt=\"08-copycode\" width=\"696\" height=\"628\" \/><\/a><\/li>\n<li>Once you press Finish, your project will be generated. Press Ctrl-Shift-B to build it:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/09-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/09-build.png\" alt=\"09-build\" width=\"699\" height=\"645\" \/><\/a><\/li>\n<li>Press F10 to step into your program. You can now use the normal Visual Studio debugging techniques to debug your program. <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/10-debug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/cubieboard\/10-debug.png\" alt=\"10-debug\" width=\"699\" height=\"643\" \/><\/a><\/li>\n<\/ol>\n<p>Once you get direct building\/debugging to work, you can switch to using a <a href=\"http:\/\/visualgdb.com\/tutorials\/cubieboard\/crosscompiler\/\">cross-compiler<\/a> for better performance.<\/p>\n<p><\/root><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial demonstrates how to build and debug a simple Cubieboard application using Visual Studio. Cubieboard devices are shipped with<\/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":[35,33],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/71"}],"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=71"}],"version-history":[{"count":0,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}