Skip to content

Using the Mac crosscompiler for the BBB

Franz Miltz edited this page Aug 7, 2021 · 1 revision

Mac Crosscompiler for the BBB

Using the crosscompiler

  1. Run the install-mac-cc.sh script located in the utils/ directory:
$ ./utils/install-mac-cc.sh
  1. If all goes well, now you can simply pass CROSS=1 while using the makefile and the resulting binary should be able to be executed on the beaglebone! You might need to run make clean before compiling for the beaglebone.
$ make CROSS=1

Running the binary on the beaglebone

The above steps will compile a binary on your mac designed to be run on the beaglebone, but this binary still needs to be copied over to the beaglebone. The easiest way to do this is to use the scp command.

First, make sure your beaglebone is plugged in and an ssh connection can be established. Now, on your mac, you can simply run the following command to copy the binary over:

$ scp hyped [email protected]:<DIRECTORY YOU WANT TO COPY TO>

The hyped binary will now be on the beaglebone in the directory you specified while running the scp command, and on the beaglebone you can run it the usual way:

$ ./hyped

That's all folks!

More details

Check out the links here.

Clone this wiki locally