{"id":256,"date":"2012-10-10T16:23:37","date_gmt":"2012-10-10T16:23:37","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=256"},"modified":"2015-05-28T10:10:46","modified_gmt":"2015-05-28T10:10:46","slug":"programming-the-rpi-in-linux-using-eclipse","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/compilers-and-ides\/eclipse-linux\/programming-the-rpi-in-linux-using-eclipse","title":{"rendered":"Linux Eclipse Programming of the RPi"},"content":{"rendered":"<p>\n<strong><em><span style=\"color:#FF0000;\">We no longer use this approach and this page may be out of date &#8211; it is left here for archive puropses. &nbsp;We now use NetBeans&nbsp;for C\/C++ development on the RPi, see <\/span><u><a href=\"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/compilers-and-ides\/netbeans-windows\/installing-netbeans-for-c-remote-development-on-a-raspberry-pi\"><span style=\"color:#FF0000;\">here<\/span><\/a><\/u><span style=\"color:#FF0000;\">.<\/span><\/em><\/strong>\n<\/p>\n<p>\nProgramming in C in the Raspberry Pi works great but tools such as geany are&nbsp;often sluggish to use due to RPi hardware limitations (the sluggishness of the geany editor dives us mad!). Programming on a more powerful PC solves this problem and allows more advanced IDE&#39;s to be used such as eclipse. &nbsp;The catch is that the Raspberry Pi is an arm based architecture&nbsp;whilst PC&#39;s are Intel based. &nbsp;The options then:\n<\/p>\n<p style=\"margin-left: 40px;\">\n1. Install Raspbian or an another arm based linux distribution on your PC using a virtual machine.\n<\/p>\n<p style=\"margin-left: 80px;\">\nThe Pro&#39;s:\n<\/p>\n<p style=\"margin-left: 120px;\">\nYour PC installation can use the exact same tools as the Raspberry Pi so there are no <span style=\"font-size: 10px;\">compatibility&nbsp;<\/span>issues at all when compiling.\n<\/p>\n<p style=\"margin-left: 80px;\">\nThe Con&#39;s\n<\/p>\n<p style=\"margin-left: 120px;\">\nYou can only install programs such as IDE&#39;s ported&nbsp;to run on the ARM architecture.\n<\/p>\n<p style=\"margin-left: 40px;\">\n2. Install a debian based Intel based OS on your PC (also in a virtual machine if preferred to using as your native OS)&nbsp;and use a cross compiling toolchain to convert between the Intel and ARM architectures.\n<\/p>\n<p style=\"font-size: 10px; margin-left: 80px;\">\nThe Pro&#39;s:\n<\/p>\n<p style=\"font-size: 10px; margin-left: 120px;\">\nInstall any IDE and tools without the limitation of only being able to run tools ported for the ARM architecture.\n<\/p>\n<p style=\"font-size: 10px; margin-left: 80px;\">\nThe Con&#39;s\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&lt;p margin-left:=&quot;&quot; 120px;&quot;=&quot;&quot;&gt; You need a cross compile toolchain and you&#39;ll may&nbsp;have to deal with library differences between the two architectures. &nbsp;Cross compilation of simple applications which only require the use of the standard C\/C++ libraries included with the cross compiling toolchain is relatively straightforward. Cross compilation of more complicated applications that require external libraries however (e.g. GTK+), &nbsp;is typically complicated to setup. &nbsp;This may be solvable by setting your your compiler to use the files of the Raspberry Pi when compiling or by using other solutions, but basically there&#39;s hoops to jump through&#8230;\n<\/p>\n<h4>\nUsing QMEU To Virtualise&nbsp;Raspbian Without Needing A Cross Compiler<br \/>\n<\/h4>\n<p>\n<a href=\"http:\/\/raspberrypi.stackexchange.com\/questions\/165\/emulation-on-a-linux-pc\" target=\"_blank\">http:\/\/raspberrypi.stackexchange.com\/questions\/165\/emulation-on-a-linux-pc<\/a>\n<\/p>\n<h4>\nUsing A Linux PC or Linux VM On Windows With A Cross Compiler<br \/>\n<\/h4>\n<p>\n<a href=\"http:\/\/hertaville.com\/2012\/09\/28\/development-environment-raspberry-pi-cross-compiler\/\" target=\"_blank\">http:\/\/hertaville.com\/2012\/09\/28\/development-environment-raspberry-pi-cross-compiler\/<\/a>\n<\/p>\n<h4>\nDeveloping In Windows<br \/>\n<\/h4>\n<p>\nSee our guide <a href=\"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/compilers-and-ides\/eclipse\/programming-the-rpi-in-windows-using-eclipse\">here<\/a>.\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We no longer use this approach and this page may be out of date &#8211; it is left here for archive puropses. &nbsp;We now use NetBeans&nbsp;for C\/C++ development on the RPi, see here. Programming in C in the Raspberry Pi works great but tools such as geany are&nbsp;often sluggish to use due to RPi hardware [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[],"class_list":["post-256","post","type-post","status-publish","format-standard","hentry","category-eclipse-linux"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=256"}],"version-history":[{"count":12,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/256\/revisions"}],"predecessor-version":[{"id":1958,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/256\/revisions\/1958"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}