Skip to content

Build toolchains for embedded development, bare metal, FreeRTOS, Linux, Zephyr RTOS, etc.

License

Notifications You must be signed in to change notification settings

prelipcean/embedded-dev-containers

Repository files navigation

embedded-dev-containers

Containerized development and CI environments for embedded systems, RTOSes, robotics, and C/C++ testing.


🚀 What is This?

This repository provides Docker containers — pre-configured, isolated development environments — for embedded systems programming. Instead of spending hours installing compilers, libraries, and tools on your machine, you can simply run a container that has everything ready.

Why Use Containers for Embedded Development?

Challenge Without Containers With Containers
Setup time Hours to days Minutes
"Works on my machine" Common problem Eliminated
Multiple toolchain versions Conflicts Isolated per container
CI/CD pipelines Complex setup Same image locally and in CI
Team onboarding Long documentation docker run and go

Prerequisites

Before using these containers, you need:

  1. Docker Desktop (Windows/macOS) or Docker Engine (Linux)

  2. Basic terminal/command-line knowledge

    • Windows: PowerShell or Command Prompt
    • macOS/Linux: Terminal
  3. Git (optional, for cloning source code)

Quick Example

# Build and run the U-Boot development container
cd uboot/
docker build -t uboot-dev -f Dockerfile .
docker run -it --rm uboot-dev

# You're now inside a Linux environment with ARM cross-compilers ready!
aarch64-linux-gnu-gcc --version

📚 Glossary (Key Terms)

Term Definition
Docker Platform for running applications in isolated containers
Container Lightweight, standalone package with code, runtime, and tools
Image Read-only template used to create containers
Dockerfile Text file with instructions to build a Docker image
Cross-compiler Compiler that runs on one architecture but produces code for another (e.g., compile on x86 PC for ARM board)
Toolchain Set of tools (compiler, linker, debugger) for building software
U-Boot Universal Boot Loader — starts the OS on embedded boards
Device Driver Code that allows the OS to communicate with hardware
Kernel Module Code that can be loaded into the Linux kernel at runtime
Device Tree Data structure describing hardware to the Linux kernel
ARCH Target CPU architecture (e.g., arm, arm64, riscv)
CROSS_COMPILE Prefix for cross-compiler tools (e.g., arm-linux-gnueabihf-)

Scope

This repo collects Docker/Dev Container images for:

  • Firmware and OS build stacks (Yocto, Buildroot, U-Boot)
  • RTOSes (Zephyr, FreeRTOS)
  • Bare-metal toolchains (ARM, RISC-V, etc.)
  • Embedded and host Rust toolchains
  • ROS 2 and robotics frameworks
  • C/C++ unit testing and analysis (Unity, GoogleTest, Catch2, GCOV, etc.)
  • Hardware Debugging & Logic Analysis (OpenOCD, Sigrok, GDB, etc.)
  • Virtual Hardware & Simulation (QEMU, Renode, Wokwi, etc.)
  • Android AOSP build environments

High-level layout

  • common/ Shared base images and helper scripts
  • yocto/ Yocto build images
  • buildroot/ Buildroot images
  • uboot/ U-Boot build images
  • zephyr/ Zephyr SDK / west-based images
  • freertos/ FreeRTOS build images
  • baremetal/ Bare-metal toolchain images
  • rust/ Rust host + embedded images
  • debug-tools/ Hardware interface tools (OpenOCD, J-Link, Sigrok/PulseView for Logic Analysis)
  • simulation/ Virtual hardware (QEMU, Renode, Verilator)
  • linux_dd/ Linux embedded board development (e.g. BeagleBone Black Wireless, VS Code Server based)
  • android/ Android AOSP build images
  • ros2/ ROS 2 distributions
  • robotics/ Other robotics stacks and SDKs
  • testing/ C/C++ test and embedded CI images
  • docs/ Documentation and usage guides

Detailed Additions

Debug & Logic Analysis (debug-tools/)

Bridging the gap between the container and physical silicon.

  • On-Chip Debugging: Support for OpenOCD, pyOCD, and Segger J-Link GDB servers.
  • Logic Analysis: Includes sigrok-cli and PulseView (via X11 forwarding) for capturing and decoding digital signals (I2C, SPI, UART) using low-cost analyzers.
  • Terminal: Serial monitors like minicom and picocom.

Simulation & Emulation (simulation/)

Enabling "Hardware-less" development and automated CI testing.

  • Processor Emulation: QEMU for executing ARM, RISC-V, and PPC binaries on the host.
  • System Simulation: Renode for complex multi-node simulation, including peripherals and wireless connectivity.
  • HDL Simulation: Verilator for FPGA/ASIC design verification.

See docs/overview.md for a more detailed description and planned image matrix.


Supported Architectures (baremetal/)

Tailored images for silicon-specific development without a heavy OS:

  • ARM: arm-none-eabi-gcc for STM32, NRF52, SAM, and more.
  • RISC-V: riscv64-unknown-elf (supporting both 32 and 64-bit) for ESP32-C series, SiFive, and GD32.
  • AVR (ATmega): avr-gcc and avrdude for Arduino-style hardware and industrial ATmega/ATtiny chips.
  • PIC: Support for Microchip's 8-bit and 16-bit lines using XC8/XC16.
  • 8051: SDCC (Small Device C Compiler) for classic 8-bit microcontrollers.

A Note on USB Passthrough

To use the tools in debug-tools/, you must pass the host USB device to the container. On Linux, this is typically handled via:

--device /dev/bus/usb:/dev/bus/usb

On Windows/macOS, usbipd-win or similar bridges are required.


🚦 Getting Started (Which Image Should I Use?)

I want to... Use this image Folder
Build a bootloader for my board uboot-dev uboot/
Write a Linux device driver linux-dd linux_dd/
Build a custom Linux distro yocto-dev yocto/
Work with Zephyr RTOS zephyr-dev zephyr/
Program bare-metal (no OS) baremetal-arm baremetal/
Debug with JTAG/SWD debug-tools debug-tools/

Start Here (New to Embedded?)

  1. Learn Docker basics — Read docs/docker-introduction.md
  2. Read docs/overview.md for the big picture
  3. Pick a stack from the table above
  4. Follow the README in that folder
  5. Build the Docker image
  6. Start developing!

📖 Documentation

Document Description
docs/docker-introduction.md Start here! Complete Docker tutorial
docs/overview.md Project overview and stack status
docs/usage/uboot.md U-Boot bootloader development guide
docs/usage/linux_dd.md Linux device driver development guide
linux_dd/examples/beaglebone-black-workflow.md BeagleBone Black step-by-step workflow
docs/ci.md CI/CD integration guide

🤝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add/update documentation for beginners
  4. Submit a pull request

📜 License

See LICENSE for details.

About

Build toolchains for embedded development, bare metal, FreeRTOS, Linux, Zephyr RTOS, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors