It’s pretty obvious: instead of developing on the target host (here the Igep board), you develop on your regular machine (I use a MacBook Pro). So the gain in performance and usability is great.

The developed project is then built on the target host (Igep board), and debugged on the regular machine (MBP).

Prerequisites:

First of all, you need to install Netbeans 6.9.1, if that has not already been done. I explicitly mention this version because I first tried with Netbeans 7.0 without success: I had an error when launching the compiled program on the remote host.

Then, on the Igep board, you need to install the Linaro 10.11 distribution (if I remember correctly, it’s Ubuntu Natty).

You’ll also need samba to share the project folder between the remote and local hosts, and samba-common-bin.

Configure samba:

I use my home on the remote target to host the project files. So you need to modify the /etc/samba/smb.conf file and uncomment the part where one gives permissions to browse folders/directories:

You have to save the /etc/samba/smb.conf and then restart samba so that it will use the new configuration.

sudo service smb reload

To test the file sharing configuration on Mac, right click on the Finder, select “Go to server” and type: smb://<IP@>, where IP@ the IP address of the remote target (the Igep board). You should see a folder named linaro or homes, depending on which configuration you chose to enable.

Configure Netbeans:

In order to develop remotely, you need the remote target to compile the project for you. To do that, you need to define a new developement host in Netbeans.

Go to Netbeans/Preferences, then select the c/c++ tab and click on Edit, next to Developement Host. This is where we will define the parameters of the Igep board. So click on Add and fill in the hostname textfield with the IP address or hostname of your board. Select Next.

Netbeans will ask you for your login. Beware, this is the login on the remote target! So use linaro, and password is also linaro. Here I use the password authentication scheme. You may try it with SSH authentication.

The next screen is a summary of what you just did, plus a couple of combobox to select the tolls collection and the way Netbeans will synchronize its sources with the remote target.

For now I only use the File System Sharing. I tried with Smart Secure Copy without success (this option uses ssh copy/paste utility to sync sources). With the file system sharing option, all sources live in the remote target.

Click on finish to validate the new development host configuration. Now you have to link the remote file system with your regular machine (MBP). Select your new developement host in the development host manager and then select Path Mapper. Now, when sharing a directory between Ubuntu and Mac using Samba, it behaves almost like a .dmg file: you’ll see an ejectable directory placed in your finder. Those actually live inside your /Volumes/ directory on your regular machine (MBP).

So the local path should be…. /Volumes/linaro and the remote path… ? Well, it should be /home/linaro of course.

Netbeans should detect all compilation tools automagically on the remote target, but I had to fill in the c++ compiler (/usr/bin/g++-4.5).

Now we should be ready to compile and debug remotely our first project.

In Netbeans, create a new sample project, like HelloWorld. Durign the project creation process, Netbeans will ask where do you want to put the sources of the project. This is where the Path Mapping is used: Instead of creating the project on your local machine like you do every time, you will store it under /Volumes/linaro/ so that the actual sources are stored on the remote target.

If all goes well, you should be able to Compile and Run the project and have this kind of build output: