The starting point, which this article starts from, is with an assumption that you installed Eclipse CDT package; CDT stands for C/C++ Development Tooling.
EclipseCDT package comes with Remote System Explorer by default; if it is not the case, you can install it, which I am not going to cover here.
When you start Eclipse, you may see "Welcome" page. You can bravely close it and you will see the empty IDE screen like this:
Now we will switch the Perspective to "Remote System Explorer" perspective. Go to "Window" -> "Open Perspective" -> "Other..."
It will bring up a popup window like this:
Select "Remote System Explorer", then you will see "RemoteSystems" tab on somewhere, which happens to me on left side in my case.
You can see there is "Local" already. The main reason of using "Remote System Explorer" is to access remote system. I was wondering why it bothers with Local files for a second, but I think it is for cases like I want to copy a file from local file system to remote file systems.
Now we want to add a new connection. Right click on the "Remote Systems", select "New" and "Connection...".
It seems that Remote System Explorer supports many ways to access remote file system. It is up to you how to access your Raspberry Pi but I believe most of people use SSH for Raspberry Pi.
It will bring up a new popup windows like above. I believe you can type in IP address of your Raspberry Pi but I haven't tried. I installed "Avahi" on all of my Raspberry Pi and I installed iTunes on my Windows. Once I had setup like that, I didn't need to remember IP numbers of my Raspberry Pis, although this doesn't mean that I didn't need to have static IP addresses. In this setup, host name must be followed by ".local" so that's why the screenshot has ".local" at the end of the host name.
Here you can click "Next" and figure out what you can do more but I couldn't figure out what it was asking me. lol. So I recommend you to click "Finish" here.
Once the remote system is registered, you will see the host like screenshot above. When you start unfolding the small arrow besides "Sftp Files", it will ask log-in information. The default user ID and password for Raspberry Pi is "pi" and "raspberry".
If you checked "Save password" like the screenshot above, it will ask you whether you want to create a master password.
I didn't want to create a master password, so I clicked "No"
As you can see the screenshot above, now you can access files via SSH network protocol. In the screenshot, I already had a simple Cpp file but you can create a new folder/file and start typing in. Somebody said that "Save" took long time. I guess the guy was dealing with large Cpp files via limited network bandwidth. But if you have RaspberryPi in your local network, it wouldn't matter.
According to the manual, you are supposed to "Create Remote Project". But I don't see what good it can bring me. You will be able to see the remote file system in the regular "Project Explorer" tab, but since any of source files will not be recognized as Cpp files, I cannot take any benefit from Project Explorer. Instead you will need to use SSH-"Terminal".
You can open the terminal by right clicking a folder in "Remote System Explorer" and select "Launch Terminal". "Launch Shell" will bring up little different user interface but I didn't like it so I will ignore it; I with I can simply remote it from my context menu. hmmm...
"Launch Terminal" will bring up a new window tab called "Terminals"; it happens to be lower window pane in my case. Depending on which folder you clicked, it will automatically "cd" to the folder, which is nice. It also shows ANSI colors, which is very important. More importantly I can type-in any Linux command in the small window; I can even execute VIM in the small window. lol.
I thought that this step is important because C/C++ is the most dominant programming language, although I am planning to cover other languages such as Java or Python. Especially in Linux world, many programs are written in C/C++. When I was learning C/C++ in old good time, I wrote programs with VIM via network terminal. But these days, it is almost impossible to write C/C++ programs without a good IDE. To do C/C++ programming in RaspberryPi, it is important to setup Eclipse. I didn't want anybody to stuck at the very first step so I wanted to make it super easy.
Thanks. Helped me a lot
ReplyDelete