Module Documentation Index » Application Module

Application Module

app/ is the firmware composition root. It is small on purpose — the bulk of the code lives in src/, and app/ is what wires the right pieces together for the right firmware build.

The module owns:

Startup sequence

app/main.cpp performs a fixed startup, in this order:

  1. initialize stdio,
  2. obtain the singleton AppRuntime,
  3. run AppRuntime::prepare(),
  4. enable the watchdog,
  5. spawn tasks from AppRuntime::tasks(),
  6. apply optional core affinity,
  7. start the FreeRTOS scheduler.

Startup is fail-fast. Any failure in prepare or in task creation ends in the terminal halt path — there is no "limp along with half the runtime" mode, because that is exactly the kind of state that is hard to debug remotely.

Profile model

The firmware topology is compile-time data, in app/firmware_profile.hpp. The current profile keeps:

  • radio1 enabled with the NPR runtime,
  • radio2 available as a compile-time flag, with no runtime implementation yet,
  • feature gates for USB, W5500, and PPPoS integration.

Compile-time selection is deliberate. It makes the firmware image auditable — what is in the binary is exactly what the profile says should be in the binary — and it keeps cold paths from quietly shipping into a build that does not need them.