bbb-asm-demo
FreeExtremely tiny baremetal application for BeagleBone Black
FreeFree tier
About bbb-asm-demo
bbb-asm-demo is an extremely tiny baremetal application for the BeagleBone Black, written entirely in assembly language without any toolchain-provided headers, libraries, or startfiles. It demonstrates low-level programming on the AM335x processor and produces multiple output formats (ELF, binary, MLO, raw disk image) suitable for JTAG, peripheral boot (UART, Ethernet, USB), memory boot (μSD, eMMC, SPI, NAND), and direct writing to μSD or eMMC. The project includes detailed boot instructions for raw MMC boot and FAT-partitioned cards, as well as Ethernet/USB boot via BOOTP/TFTP.
Key Features
Written entirely in assembly, no toolchain-provided headers or libraries
Produces multiple output formats: demo.elf, demo.bin, demo.MLO, demo.img
Supports JTAG, peripheral boot (UART, Ethernet, USB), and memory boot (μSD, eMMC, SPI, NAND)
Detailed instructions for raw MMC boot and FAT-partitioned cards
Ethernet/USB boot via BOOTP and TFTP
Can be compiled with any arm-gcc toolchain via CROSS_COMPILE variable
Extremely small footprint
Pros & Cons
Pros
- Minimal and educational – shows pure assembly baremetal development
- Supports multiple boot modes and output formats
- No dependencies on C runtime or vendor libraries
- Well-documented boot procedures for μSD, eMMC, Ethernet, USB
Cons
- Limited to BeagleBone Black hardware (AM335x)
- Only assembly language, not suitable for higher-level development
- Last release was in 2017; may not support newer kernel versions
- No active maintenance or community support evident
Best For
Educational example of baremetal programming on BeagleBone BlackTemplate for custom low-level bootloaders or firmwareDemonstration of AM335x initialization and boot ROM interactionLearning ARM assembly and hardware register manipulation without OS
FAQ
What hardware is required?
A BeagleBone Black board is required, as the application is specifically designed for the AM335x processor.
Can I use a different ARM toolchain?
Yes, any arm-gcc toolchain should work. The default expects arm-linux-gnueabihf, but you can override via the Makefile or CROSS_COMPILE variable.
What output files are produced?
The build produces demo.elf (JTAG), demo.bin (peripheral boot and XIP), demo.MLO (memory boot), and demo.img (direct μSD/eMMC write).
How do I boot from a microSD card?
You can either write demo.img directly to the card (destroys existing data) or place a raw MMC header and MLO file at specific sectors, or use a FAT partition with the MLO file.