• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Microcontroller Tips

Microcontroller engineering resources, new microcontroller products and electronics engineering news

  • Products
    • 8-bit
    • 16-bit
    • 32-bit
    • 64-bit
  • Applications
    • 5G
    • Automotive
    • Connectivity
    • Consumer Electronics
    • EV Engineering
    • Industrial
    • IoT
    • Medical
    • Security
    • Telecommunications
    • Wearables
    • Wireless
  • Learn
    • eBooks / Tech Tips
    • EE Training Days
    • FAQs
    • Learning Center
    • Tech Toolboxes
    • Webinars/Digital Events
  • Resources
    • Design Guide Library
    • DesignFast
    • LEAP Awards
    • Podcasts
    • White Papers
  • Videos
    • EE Videos & Interviews
    • Teardown Videos
  • EE Forums
    • EDABoard.com
    • Electro-Tech-Online.com
  • Engineering Training Days
  • Advertise
  • Subscribe

What is an embedded bootloader?

July 13, 2017 By Scott Thornton 3 Comments

Anyone who has turned on a computer might be familiar with the boot-up sequence as computer flashes lines of text on screen before the Windows logo appears. What you are seeing is a bootloader in action, loading essential software to get the minimum running on the processor chip before higher-level software can run. Embedded bootloaders work much the same way, but since embedded processors cover a much larger range of applications (from dishwashers to automotive infotainment centers and more), what embedded bootloaders do varies based upon the architecture and the application. Bootloaders for embedded systems are also more often restricted to a smaller size versus computers.

Figure 1. Example of boot code that flows past the screen when a processor is first booted up. Embedded bootloader code is usually only seen during development with a host computer, since a target (embedded) processor rarely has a dedicated display that people can see. (Source: Public

The bootloader is the first code to run after power up or reset, and runs before any other software starts on a processor, including an operating system (OS), if an OS exists. For some embedded processors, bootloaders are part of a Board Support Package (BSP), which is used to start up and run the first silicon chips of an embedded MCU, processor, or System on a Chip (SoC). A bootloader (sometimes called a boot manager) is unique to the architecture of the embedded processor it runs on and includes some application specific aspects. A bootloader is necessary for starting processors at the lowest level before starting an operating system (e.g., a computer) or presenting a command line (e.g., an MCU). A bootloader can be sophisticated with lots of commands or simple with few commands; it can be fairly automatic and self-contained or be programmed to wait for a choice to be made, put in as a command, from a human. Commands can be set up to perform a number of modifications to the MCU environment if desired, or the bootloader might have few choices available and perform a self-contained start up for a set appliance or end-product.

The bootloader is stored in an area of protected memory (although this area of memory is not always fool-proof and can be overwritten by a stack overflow, for example). An onboard bootloader resides in memory in an MCU in an area of ROM or flash memory that is protected from getting written over. A bootloader performs various hardware checks, initializes the processor and peripherals, and does other tasks like partitioning or configuring registers. Besides getting a system on its feet, bootloaders are also used to update MCU firmware later on. Bootloaders must be able to communicate with the outside world in order to get updates, so most bootloaders are able to communicate with some form of interface, be it I2C, SPI, USART, USB, or some other protocol. Bootloaders also need to be able to map the memory of the specific architecture and read, write, and partition memory. If EEPROM is present, a bootloader must be able to at least read the EEPROM, as this is where the next bit of code might come from. Other bootloaders might need to be able to load the next level of code from an SD card (as in the Raspberry Pi). Bootloaders can also perform checks on the higher-level code to make sure it’s not corrupted before loading it. Lastly, one of the main tasks of bootloaders includes security. Embedded security starts with the silicon, an example of which is ARM, who installs a separate “Zone of Trust” area, branded the ARM® TrustZone®. Since a bootloader is intimate with the process of power cycle and reset recovery and is also a necessary part of firmware updating, the bootloader would reside in the secure, root of trust area. The bootloader would be accessible only by other software that has authorized access to that TrustZone, since ARM wants to segregate its critical operations from software and memory whose safety is not known.

ARM’s TrustZone separates the bootloader and firmware updates from unauthenticated software that may need to run. This protects the device from hacking at the lowest level, during firmware updates, for example. (Source: ARM Holdings)

Tools exist to help in writing a bootloader, one of which is the open source “Das U-Boot,” often shortened to “U-boot,” that supports several architectures (PowerPC, ARM, MIPS, x86, and more). Other bootloaders are Barebox, Libreboot, SeaBIOS, coreboot.

 

You may also like:

  • public & private key use
    Building security into IoT and IIoT end devices

Filed Under: Embedded, Featured, microcontroller, Tools Tagged With: armholdings, basics, FAQ

Reader Interactions

Comments

  1. Helen Adams says

    June 4, 2018 at 10:59 pm

    This was done to me 10 months ago on my Gateway computer. Remote Control take over to a High Sierra Mac and I still can’t get mail or get them off my accounts! No one including Apple will help!

    Reply
  2. Jennifer says

    December 18, 2020 at 6:05 am

    Could we write a custom program into SPL/MLO section? Consider that we wont use u-boot or linux kernel and guarentee that our memory consumption in less than 128KB.

    If we wont use linux kernel then u-boot is really necessary?I mean , I want to prepare SPL/MLO as custom program loader is it possible to load the custom program to DDR memory and continue to execute it?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Featured Contributions

Five challenges for developing next-generation ADAS and autonomous vehicles

Securing IoT devices against quantum computing risks

RISC-V implementation strategies for certification of safety-critical systems

What’s new with Matter: how Matter 1.4 is reshaping interoperability and energy management

Edge AI: Revolutionizing real-time data processing and automation

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“bills
“microcontroller
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

RSS Current EDABoard.com discussions

  • CST Studio – How to increase frequency step size (e.g. to 100 MHz)?
  • What is the difference between MIMO antenna elements arragned radially across the pentagon shaped substrate versus rectangle shaed substrate?
  • General purpose CMOS Op Amp and PMOS & NMOS from LTSpice library
  • Simple Active Bandpass Filter Oscillates
  • TMP117 > Can not read temperature on LCD

RSS Current Electro-Tech-Online.com Discussions

  • Cpu coin acceptor and zero delay arcade board.
  • Capacitive Touch On The Profile
  • JBL charge 4 dead motherboard?
  • Guitar electronics project
  • can a AT89C51 be used as a rom?

DesignFast

Design Fast Logo
Component Selection Made Simple.

Try it Today
design fast globle

Footer

Microcontroller Tips

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips

Microcontroller Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy