-
Notifications
You must be signed in to change notification settings - Fork 1
Using the BBB on Linux
Franz Miltz edited this page Apr 12, 2022
·
3 revisions
This guide aims to give a rough but complete overview over the steps required to compile and run software on any Beaglebone Black (BBB) using a Linux x86-64 computer. Similar steps may apply to other platforms, in particular WSL.
The following are required:
- BBB
- USB A to micro USB cable
- micro SD card
- a Linux x86-64 device ("the laptop"), connected to the internet, with a USB A port
- Download a Debian image for the BBB, e.g. from here. Note that we intend to flash the image onto the BBB so make sure you download an appropriate image!
- Flash the image onto the BBB, e.g. by following these instructions.
- Make sure you can SSH into the BBB.
- On the BBB, verify the GLIBC version, e.g. by running
For the
$ sudo /lib/arm-linux-gnueabihf/libc.so.6
AM3358 Debian 10.3 2020-04-06 4GB eMMC IoT Flasher
image this isDebian GLIBC 2.28
. - Obtain a toolchain to cross-compile to the BBB, e.g. by downloading it from here. Make sure the GLIBC version matches what you found on the BBB in step 4.
- On the laptop, compile the desired binary using the newly obtained compiler. This could look as follows:
Note that when using the
cd hyped-2022 mkdir build cd build cmake .. -DCROSS=OFF -DPEDANTIC=OFF -DFORMAT=OFF -DCMAKE_CXX_COMPILER=/home/miltfra/hyped/hyped-2022/armv7-eabihf--glibc--bleeding-edge-2018.11-1/bin/arm-linux-g++ make debugger -j
-DCMAKE_CXX_COMPILER
flag one has to specify an absolute path to the compiler, not a relative one. Where the toolchain resides in your file system does not matter. - Try and copy the binary onto the BBB to see whether you can run it at all.
- Now you may configure the BBB to meet your requirements (SPI, CAN, ...), e.g. by using the 2021 Wiki.
While cross-compilation is preferred, compiling the software directly on the BBB is possible.
- Follow steps 1-3 above.
- Configure an internet connection on the BBB, e.g. by following this guide.
- Update and upgrade all packages on the BBB.
- Install CMake.
- Clone the hyped repository and build the binary. Flags to consider are
-DCROSS=ON
,-DPEDANTIC=OFF
,-DFORMAT=OFF
, and possibly others. You may have to play around with this. - Have a cup of tea. This will take some time.
- Run the binary as you normally would. If you run into compiler or linker errors it's likely because some includes are missing. Common offenders are the
atomic
andstring
headers. - Similar to step 8 above, you may have to configure the BBB to do exactly what you want it to.
- Home
- How to add and edit pages on the wiki
- Glossary
- Admin
- Projects & Subsystems
- Motor Controllers
- Navigation
- Quality Assurance
- Sensors
- State Machine
- Telemetry
- Technical Guides
- BeagleBone Black (BBB)
- Configuration
- Contributing
- Testing
- Install VM on Mac
- Makefiles
- Reinstall MacOS Mojave
- Travis Troubleshooting
- Knowledge Base