Firmware is the first software that runs when power is applied to an embedded system. It helps initialize hardware and boot the operating system or application.
Execution Flow Stages:

Stage 1: Platform Setup
- Step 1: Initialize the hardware platform (e.g., set control registers, configure memory map).
- Step 2: Detect the processor type and platform (usually using coprocessor 15, register 0).
- Step 3: Run basic diagnostics to check hardware status.
- Step 4: Enable debugging tools:
- Set breakpoints
- View/edit memory
- Examine registers
- Disassemble instructions
- Step 5: Provide a Command Line Interface (CLI) for configuration via terminal (serial or network).
Stage 2: Hardware Abstraction
- HAL (Hardware Abstraction Layer):
- Provides a uniform API to interact with hardware.
- Hides hardware differences between platforms.
- Device Drivers:
- HAL uses drivers to manage peripherals like timers, serial ports, etc.
Stage 3: Load Bootable Image
- Loads the OS/Application image from:
- Flash ROM (direct or using Flash File System – FFS)
- Hard drives, network (with proper drivers & file system support)
- Image Formats:
- Binary (raw, no headers)
- ELF (Executable and Linking Format) – common in ARM systems
Stage 4: Relinquish Control
- Transfers control to the OS or application by:
- Updating vector table
- Setting PC (Program Counter) to the OS entry point
- Some firmware (like HAL/MIL) may remain active after handing over.
Firmware vs. Bootloader
Firmware | Bootloader |
---|---|
Low-level permanent software | Small program to load OS/app |
Resides in ROM, runs at power-on | Temporarily active until OS loads |
May include bootloader | Part of the firmware in many cases |
Handles diagnostics, debugging, CLI | Focused on loading executable image |
Red Hat RedBoot
RedBoot = Red Hat Embedded Debug and Bootloader
🔸 An open-source firmware tool
🔸 Designed to work on various CPUs
🔸 Supports debugging + bootloading
Features of RedBoot:
Feature | Explanation |
---|---|
Debug Support | Works with GNU Debugger (GDB) via Serial (X-Modem) or Ethernet (TCP). |
Flash ROM Management | Read, write, erase flash ROM. Supports compressed & uncompressed images. |
OS Boot Support | Can boot Embedded Linux, Red Hat eCos, or other OS images. |
Communication | Serial and Ethernet-based setup & updates |
Based on HAL | RedBoot uses a HAL layer to abstract hardware and support multiple platforms. |