xous-core/examples/log/src/start.rs
Sean Cross 5ce653882e log: add log example
Note: does not currently log

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 20:32:44 +08:00

20 lines
483 B
Rust

/// Rust entry point (_start_rust)
///
/// Zeros bss section, initializes data section and calls main. This function
/// never returns.
#[link_section = ".init.rust"]
#[export_name = "_start"]
pub unsafe extern "C" fn start_rust() -> ! {
extern "Rust" {
// This symbol will be provided by the kernel
fn main();
}
main();
panic!("exited main");
}
#[export_name = "abort"]
pub extern "C" fn abort() -> ! {
panic!("aborted");
}