how to: develop c/c++ on the beagleboard directly

It took me several days to get started with the beagleboard so I'm
posting here my findings. Hope it will be useful to somebody.

What I want is to use the beagleboard as a main board on my robot. And
I want to directly develop on the beagleboard not build an image using
open embedded. If you follow this guide, at the end you should be able
to connect via ssh to the beagleboard and remotely edit files, then
use a remote shell to compile and run them.

I received that question. I post it here together with my answers for
future references

Q1:
I want to build a little blimp robot using the board and be able to
program directly on it [...] you were saying that you could program on
the beagle board without keyboard and screen...do you mean you have
the board connected to an other computer and you edit some file and
make them run on the board?

A1:
The board is connected to a LAN and I am developing from the a Linux
desktop connected to the same LAN. So the 2 computers can communicate.
In Linux, you can create a remote connection, which kind of behaves as
a folder, except that the files in that folders are located to another
machine (you can use various protocols..., I use SFTP).

So from that remote folder I can open the files and edit them just
like with regular files, except that it does not work with all
editors. It works with Kate and Gedit, for sure, but I think it does
not work with KDevelop (KDE's awesome IDE), and I don't know if it
works with Eclipse. And I have no idea about windows apps...

So, I can edit those remote files from my desktop. Then I open a
remote shell to the beagleboard, from which I can compile and run my
code. Of course it's only suitable for text programs... Apps with a
GUI won't work!

Q2:
in my case, i would like to be able to debug and see the state of
variable..(like in visual c++)...do you think this could be possible?

A2:
I debug with gdb on the remote shell. meaning that you'll have to
learn how to use it from a text interface. I have heard that there is
something called gdb server, I have no idea how it works, but my guess
is that it would allow you to run the server on the beagleboard, a
client on your desktop and do GUI based debugging. However I have
absolutely no idea, but might be worth investigating

Q3:
or using an image with a C/C++ IDE with a screen would be better?

A3:
Probably easier. In my case it's not easy: connecting a mouse, a
keyboad, a screen, to the robot is a pain because the board is buried
inside.

Brice

With gdbserver you can use a copy of your rootfs, this time with debugging symbols on your host to debug a rootfs without debugging symbols on your target. That means you debug applications on devices with small flash and low amoounts of ram.

regards,

Koen

Couldn’t one mount the rootfs using sshfs or nfs rather than mount a copy?

You could, but the gdbserver trick is for when your rootfs is too full to install debugging symbols (e.g. 16MB of flash), or has too few RAM to load the debuging symbols into RAM.

regards,

Koen