nros_platform/board/print.rs
1//! [`BoardPrint`] — Phase 212.N.1.
2//!
3//! Per-board stdout contract. Mirrors the legacy
4//! `nros-board-common::board_init::BoardPrint`.
5//!
6//! Implementing boards wrap one of:
7//! - `cortex_m_semihosting::hprintln!` (QEMU Cortex-M / MPS2-AN385)
8//! - Vendor printf bridge (orin-spe `tcu_print_msg`)
9//! - Serial UART writer
10//! - `libc::write(STDOUT_FILENO, …)` (POSIX)
11//! - `printk` (Zephyr / NuttX / FreeRTOS-with-stdio)
12//!
13//! The signature takes `core::fmt::Arguments` so the generic
14//! `BoardEntry::run` body can pass `format_args!(...)` through
15//! without forcing an allocation or fixed-size buffer at the trait
16//! level — each board picks its staging strategy.
17
18/// Per-board stdout contract.
19pub trait BoardPrint {
20 /// Emit `args` followed by a newline.
21 fn println(args: core::fmt::Arguments<'_>);
22}