Cold Start

You're bringing up a new board variant that uses a stripped-down startup. The minimal reset handler jumps straight to main() with no C runtime initialization (no .data copy, no .bss zeroing). The previous engineer added an early_init() function to handle this, but the board prints garbage values instead of the expected self-test output.

The firmware performs a boot self-test by printing four values:

  • MAGIC: an initialized constant defined in main.c
  • VERSION: an initialized version code defined in main.c
  • COUNT: a zero-initialized boot counter
  • ERRORS: a zero-initialized error flags field

Each value prints on its own line as NAME:<decimal value>, in the order MAGIC, VERSION, COUNT, ERRORS. When the C runtime is set up correctly, the initialized values match their definitions and the zero-initialized fields read back as zero.

The startup.c file (read-only) is a minimal vector table that does nothing but call main(). Your early_init() must properly set up the C runtime before any globals are used. Find and fix all the bugs.

Loading the interactive arena.