Skip to content

A collection of tiny embedded-linux projects for the BeagleBone Black

License

Notifications You must be signed in to change notification settings

dehre/beaglebone-stuff

Repository files navigation

BeagleBone Stuff

A collection of tiny embedded-linux projects for the BeagleBone Black (BBB).

Details about the BBB and the OS

Processor: AM3358 ARM Cortex-A8

OS: Debian 10.3 Buster IoT (without graphical desktop)

Kernel release: 4.19.94-ti-r42

GCC version: 8.3.0

Link to the official docs here

Setup

I recommend reading cross-compilation-setup/README.md first.
It explains how I set up my computer (Mac M1) to cross compile programs for the board and upload them there.

Building

The project uses a global CMake file with different targets.
Dependencies are managed through Conan.
The file profile_crossbuild tells the latter which platform we're generating binary files for.

To build:

mkdir build
cd build

conan install .. --build=missing --profile=../profile_crossbuild

cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Build
cmake --build .

The executables will be placed in build/bin.

For debugging purposes, you may want to build the projects for the local VM too.
To avoid future headaches, adjust your Conan profile to use the CXX11 ABI by default before proceeding.
Then, to build:

mkdir build
cd build

conan install .. --build=missing

cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Build -DBUILD_LOCAL=1
cmake --build .

Exception: the project onboard-leds is built using a regular Makefile, so cd into the directory and simply call make.

Exception: the project writing-lkm uses Kbuild; check its README for details.

The projects

Here are the projects, in the order they've been developed:

  • onboard-leds: play with the onboard LEDs (turn on, turn off, flash)

  • gpio: a cli utility that allows changing direction, pull-up/down resistor, and value of gpio pins

  • using-lkm: use the pre-built LKM to read a temperature sensor (I2C)

  • i2c: use system calls to read a temperature sensor (I2C)

  • ifttt: use the IFTTT web service, and set up a cron daemon

  • mqtt: publish data to Adafruit's MQTT broker (or to a local Mosquitto broker)

  • watchdog: use the watchdog timer to reboot the board after 30 seconds of inactivity

  • writing-lkm: write a tiny loadable kernel module

Others:

  • dotenv: a tiny static library used to parse the .env file

ASIDE: The dogs...

The nice cartoon sketch is offered by Pixabay users under their generous free license.

About

A collection of tiny embedded-linux projects for the BeagleBone Black

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published