[beagleboard] Re: Coding with C/C++ directly on Beaglebone, via IDE?

That's a pretty awful way of doing things because it uses the BB's
native compiler which generates code about 10x slower than does v4.6 of
the Gnu C ARM cross compiler. At least that's the case with the
application I'm developing which does a LOT of floating point math.
Plus, on a reasonably fast PC, the compile of a few thousand lines of
code is over before you can lift your finger off the "enter" key.

Here's my setup. Ubuntu Linux 12.04 with Gnome.

I have a BASH alias that calls a script called "startwork". That script
opens 2 more terminal windows in the directory I'll be working in and
opens 2 Nautilus file manager windows, also in the working directory.

Terminal window 1 is where I start gvim from. Window 2 is ssh'd into
the BB. That's

$ ssh root@maggie

I've named my BB maggie and entered her IP in the /etc/hosts table so I
don't have to type the IP number every time.

Window 3 is my "make" window and where I do other general purpose stuff.

In my make file are the following lines after the line that compiles the
code:

  chmod +x $@
  rm -rf /tmp/code
  mkdir /tmp/code
  mv $@ /tmp/code
  scp jgd@neonjohn:/tmp/code/* root@maggie:.
  rm -rf /tmp/code
  @echo ""
  @echo "finished $@"
  @echo ""

This additional stuff changes the mode of the cross-compiled executable
to "execute", copies it to a temp directory because scp doesn't like
relative addresses too much, scps the file over to the BB, removes the
temp file and announces completion.

Scp or secure copy is like rcp only secure. In fact, in Ubuntu the
command "rcp" is just a link to scp.

So I have my work files open in as many instances of gvim as I need, I
have one terminal window remote logged into the BB and I have a
make/compile window.

I write some code, save it (without exiting the editor), move the mouse
over to the compile window and up-arrow to recall "make", make and copy
the binary over to the BB and am ready to test the code, all in about 5
seconds, most of that time being spent on scp setting up the secure
connection.

This is especially nice if you're a vi fanatic like I am or you have
another favorite editor. It sure kicks butt against an IDE.

John