Check out the new projects site for A-i-S

Thursday, April 28, 2011

PandaBoard/BeagleBoard: How I make my development life easier (my set up)

I thought it might be useful to describe how I have set up development environment at a high level. This is my take on how to make it as easy as possible to develop code on the BeagleBoard and Pandaboard.

In essence I have a desktop PC next to the PandaBoard which I develop on. At the same time I have the PandaBoard connected to:
  • a 19" monitor via a DVI/HDMI cable;
  • 8GB SD Card;
  • a usb hub;
  • wired ethernet to my home network;
  • 1 TB Hard Drive via USB;
  • keyboard;
  • mouse; and
  • power.

Both the Desktop and PandaBoard are running Ubuntu operating systems.

The approach I have taken is to use remote connections from my Desktop PC to the PandaBoard and develop mostly at my Desktop PC. I avoid using VNC and instead use ssh and sftp.

My workflow is to have at least two ssh terminals open on my desktop which allows me to run commands as if I was typing into a terminal on the PandaBoard itself.  I also have a file browser window open (Nautlius) which is the filesystem of the PandaBoard.

How to set up ssh is covered in:

Once ssh is set up, you can access the filesystem of the Pandaboard/BeagleBoard via sftp (secure ftp) without any further effort on the host side.

The command I run at the terminal on my desktop PC is:

nautilus sftp://dingo@

This asks the system to start Nautilus and automatically log into a sftp session using the following details:

Username on the host PandaBoard/BeagleBoarrd: dingo
IP address of the host PandaBoard/BeagleBoard:
Port Number of the ssh service: 3434
Location to open in the filesytem: /media/restore/pandaboard/

Once I execute this command I get the following window:

From here I usually use Geany as my IDE to open code files. I then execute 'make' in the already open terminal windows to natively compile the code on the PandaBoard/BeagleBoard. I usually execute 'htop' in the other terminal window to monitor the processes running and load etc.

Once I have an executable to test, I execute it in the terminal and if it spawns a window (X11), that window will spawn on my Desktop PC whilst being run on the PandaBoard/BeagleBoard.

This results in me being able to code, build, search, execute and test all on my Desktop right alongside my normal Desktop applications like web browsers etc whilst building code in a native environment.

I have found this approach to be faster than VNC or interfacing with the PandaBoard via a monitor and keyboard/mouse directly.


Iso9660 said...

I'm developing on a Beagleboard and I also develop on Ubuntu.
In my case I code the most on my desktop pc with codeblocks which features code completion. After coding and testing I recompile at the Beagleboard with codeblocks. Also I use it to touch some code in Beagleboard. I think this is a great IDE.
I use Ubuntu 11.04 in both Beagle and my Pc and I installed OpenBox in Beagle to allow it to run in graphical mode with almost 300Mb of free RAM.

Hesham said...

Hi ALl, I think this is great help from all of you to have this blog.
I got my Pandaboard while ago and having a hard time getting started with cross compiler on my Ubuntu 11.04.
can you please, direct me to how to setup my first example project on my Ubuntu?
I need to know how to install GNUARM or the easiest Arm cross compiler on my Ubuntu to build for ARM, or as you mentioned is it better to build natively? but then I have to have the board connected all the time... thanks a lot

Grinan Barrett said...

just wanted to say that I appreciate all the information you have posted on your site, you have definitely helped me with my beagleboard troubles!

Karel Gardas said...

I'm wondering why you don't use NFS to mount your Desktop PC/Ubuntu directory to panda? You will compile on panda on NFS dir, run from there too and still be able to freely edit files on Desktop PC...

Dingo_aus said...

Yes, that is a good suggestion. I started with a NFS drive.

The reason I moved to a USB harddrive is because the NFS required me to leave my main Desktop PC on.

I have the main PC and the PandaBoard in the same space I sleep and my Main PC is noisy.

Hence the local USB drive on the PandaBoard so I could leave it compiling overnight etc.

If you can leave an NFS share up, then I suggest you use it, it does give more flexibility.

tisanjosh said...

I think this is excellent help from all of you to have this site.
I got my Pandaboard while ago and having difficulties getting began with corner compiler on my Ie8 11.04.
can you please, immediate me to how to create my first example venture on my Ubuntu?
I need to know how to set up GNUARM or the best Arm corner compiler on my Ie8 to develop for ARM, or as you described is it better to develop natively? but then I have to have the panel attached all time. Asic Chip Design