16

I'm from a Microsoft Windows development background, I'm happy with the IntelliSense and code navigation features, is it possible for me to install an IDE, such as Eclipse, [I'm assuming it's probably best for me to make the jump and dual-boot Linux] and do the development on my fast desktop and deploy to the Pi?

Dog Ears
  • 2,027
  • 6
  • 19
  • 28
  • 2
    You might be able to run eclipse on the RasPi, but eclipse is a resource hog and would likely be unusable. Instead of dual booting you may want to look at virtualization technology like virtualbox instead. – Steve Robillard Jun 22 '12 at 09:32

3 Answers3

14

Yes, you can develop elsewhere before deploying to the Pi.

However because the Pi is a different Architecture if you compile with your native compiler, your code wont be executable on the Pi.

This can be solved by using a cross-compiler. Essentially this is a second GCC compiler on your system which uses the ARM toolchain for compiling.

More information can be found in this question:

How do I build a GCC 4.7 toolchain for cross-compiling?

Jivings
  • 22,538
  • 11
  • 90
  • 139
  • I can then somehow use Eclipse (or something else?) to use that compiler? – Dog Ears Jun 22 '12 at 09:30
  • @DogEars I'm not a C programmer, but you should be able to change the project compiler in Eclipse to point at whatever you want. In this case it will be the directory you have set as the Prefix directory. – Jivings Jun 22 '12 at 09:33
  • I don't use eclipse, but it seems to me that you could create a make file that changed the C compiler and then even deploys your program to the RPI automatically, if you so choose to. – user606723 Jun 22 '12 at 15:12
  • @user606723 Yes, you have to set the CROSS_COMPILE variable when invoking make I believe. – Jivings Jun 22 '12 at 23:24
3

I used netbeans instead of eclipse as an IDE to both Develop and debug C/C++ Programs on my Raspberry Pi. I have listed down how I did it on this blog post: http://precisemath.wordpress.com/2014/04/13/c-dev-pi-2/

3

Yes, you can compile Raspberry Pi software from Windows with cross-compiler and use Eclipse as IDE. You can even remotely debug your software running on the Raspberry Pi from Windows, view variables by hovering mouse cursor over them, etc.

Here are the instructions how to prepare the cross-compiler and set up Eclipse as IDE for Raspberry Pi: http://www.gurucoding.com/en/raspberry_pi_eclipse/index.php