72 April 2014
Angstrom file system. Instead of just dragging the
walk TheDog ARM file to the BeagleBone root directory,
let’s use Eclipse to create a folder on the BeagleBone and
copy the file from the
ThinkPad to the newly created
folder.
In Screenshot 12, I’ve
navigated to the BeagleBone
file system from within the
Eclipse cross compilation
session and created a folder
called boneProjectBBB in the
BeagleBone’s root directory.
To copy the walk TheDog from the ThinkPad to the
BeagleBone, I dragged it from the ThinkPad folder and
dropped it into the BeagleBone folder as shown in
Screenshot 13.
Screenshot 14 is a capture of the BeagleBone
terminal session I kicked off from the ThinkPad’s Eclipse
cross compilation session. As you can see, everything
didn’t go as planned. Following the listing of the contents
of the boneProjectBBB, I attempted to run the
walk TheDog application with no joy.
A closer look at the file permissions (and error
message) shows that the walk TheDog file cannot be
executed by any user. Not to worry. All we have to do is
activate execution privileges for the binary file via the
chmod command. The results are obvious to the most
casual observer.
KP Duty
Baking things in the kitchen isn’t much different than
taking the dog for a walk. The most notable difference is
that the Pi requires a different version/flavor of the GNU
C++ compiler. It also differs in the way we assemble the
Eclipse project environment. As you can see in Screenshot
15, for the Pi we have chosen the Cross-Compile Project
instead of the Hello World C++ Project. The Linux GCC
toolchain components we used to support the
BeagleBone are not supported by the Cross-Compile
Project configuration.
Setting up the Pi Eclipse environment was a bit less
work than the BeagleBone implementation. Instead of
entering the command prefix for each compiler, linker,
and assembler, the command prefix for the Pi only
needed to be entered once.
The path entry you see in Screenshot 16 worked like
magic. Once entered, I proceeded to the paths window to
enter the include and library paths. To my surprise, the
entries were already populated. I captured the C++
include directory paths in Screenshot 17.
At this point, everything we’ve done to cross compile
with the BeagleBone is done again with the Pi. Our Pi
source file — which is displayed in Screenshot 18 — looks
a lot like our BeagleBone source file. The Pi remote
session area of the Eclipse session can be seen in
Screenshot 19. The file movement and folder creation
; Screenshot 13. It's Linux but it works just like Windows. After I created the
boneProjectBB folder, I simply dragged the walk TheDog file from the ThinkPad
local workspace folder to the BeagleBone boneProjectBB folder.
; Screenshot 14. Thus far, we have done most everything
through the Eclipse session running on the ThinkPad. It
should be no surprise that we can easily interact with the
BeagleBone from it.
; Screenshot 15. Note that the Linux GCC toolchain we
used with the BeagleBone Black is not supported by the
Raspberry Pi's Cross-Compile Project configuration.