Learning path

Full curriculum

Full curriculum

Unit content

Bare-metal reset and runtime startup

A bare-metal program does not begin because an operating system launches it. After reset, the processor obtains architecture-defined initial state and begins at a reset handler.

Startup code establishes the execution environment expected by the compiled program. Typical responsibilities include setting the initial stack, copying initialized writable data from nonvolatile memory into RAM, and clearing zero-initialized storage.

Conceptually:

reset
  ↓
initialize machine state
  ↓
initialize runtime memory sections
  ↓
optional hardware/runtime setup
  ↓
application entry point

An interrupt vector table often lives at a defined address as part of the firmware image and provides entry points for reset and interrupt handlers.

If startup assumptions and the linker layout disagree, ordinary program objects can begin with incorrect contents or the processor can start at the wrong address.

Bare-metal startup is therefore the bridge between processor reset semantics and the higher-level execution environment expected by compiled firmware.