Attribute Macro mips_rt::entry

source ·
#[entry]
Expand description

Attribute to declare the entry point of the program

The specified function will be called by the reset handler after RAM has been initialized.

The type of the specified function must be [unsafe] fn() -> ! (never ending function)

Properties

The entry point will be called by the reset handler. The program can’t reference to the entry point, much less invoke it.

Examples

  • Simple entry point
#[entry]
fn main() -> ! {
    loop {
        /* .. */
    }
}