-
Notifications
You must be signed in to change notification settings - Fork 3
Cross compiling to the BBB
Tom Lonergan edited this page Apr 13, 2023
·
1 revision
-
Verify the GLIBC version on the BBB, using
sudo /lib/arm-linux-gnueabihf/libc.so.6
This is currentlyDebian GLIBC 2.28
, however make sure to check -
Download the crosscompiler toolchain from here. Make sure the GLIBC version matches that found in step 1
-
On your machine, delete your current build folder (if it exists), create a new build folder and run
cmake .. -DCROSS=OFF -DPEDANTIC=OFF -DFORMAT=OFF -DCMAKE_CXX_COMPILER=/path/to/armv7-eabihf--glibc--bleeding-edge-2018.11-1/bin/arm-linux-g++
Replacing /path/to/ with the absolute path to the compiler (i.e. not ~/Downloads but /home/tomlonergan/Downloads/)
-
Build as normal, using
make -j <target>
-
Copy onto the BBB (eg using
scp
, or by mounting the BBB to the filesystem) and check it runs