macro_rules! arm_exception_vector_table { [$table:ident, $handler:path] => { ... }; }
Available on ARM only.
Expand description
Define an exception vector table that forwards all exceptions to the designated handler.
The first argument is the name of the vector table, which will be exported as an
unmangled symbol and exposed to Rust code as an immutable static of type
VectorTable
.
The second argument is the name of the handler function, which should have
signature func(Kind)
.
§Example
ⓘ
arm_exception_vector_table!(exception_table, handle_exception);
fn handle_exception(kind: Kind) {
panic!("Exception {:?}", kind);
}
fn main() {
VectorBaseAddressRegister::set(unsafe { &exception_table });
}