diff options
author | 2018-09-06 01:35:12 +0200 | |
---|---|---|
committer | 2018-09-06 01:35:12 +0200 | |
commit | 31713aba3f4a4aacd55d12b8a3435334ae61986a (patch) | |
tree | eaf897d43263606e24b6cca9f5f6620498648dc6 /cortex-m-rt/macros/src/lib.rs | |
parent | 943edfa8715cb9c5783211011d8242edda1fb6ab (diff) | |
download | cortex-m-31713aba3f4a4aacd55d12b8a3435334ae61986a.tar.gz cortex-m-31713aba3f4a4aacd55d12b8a3435334ae61986a.tar.zst cortex-m-31713aba3f4a4aacd55d12b8a3435334ae61986a.zip |
make the reachability requirement more **prominent**
since we can't statically check that it holds
Diffstat (limited to 'cortex-m-rt/macros/src/lib.rs')
-rw-r--r-- | cortex-m-rt/macros/src/lib.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cortex-m-rt/macros/src/lib.rs b/cortex-m-rt/macros/src/lib.rs index 2619a44..bd34b04 100644 --- a/cortex-m-rt/macros/src/lib.rs +++ b/cortex-m-rt/macros/src/lib.rs @@ -15,8 +15,9 @@ use proc_macro::TokenStream; /// Attribute to declare the entry point of the program /// -/// **NOTE** This macro must be invoked once and must be invoked from an accessible module, ideally -/// from the root of the crate. +/// **IMPORTANT**: This attribute must be used once in the dependency graph and must be used on a +/// reachable item (i.e. there must be no private modules between the item and the root of the +/// crate). If the item is in the root of the crate you'll be fine. /// /// The specified function will be called by the reset handler *after* RAM has been initialized. In /// the case of the `thumbv7em-none-eabihf` target the FPU will also be enabled before the function @@ -136,8 +137,9 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream { /// Attribute to declare an exception handler /// -/// **NOTE** This macro must be invoked from an accessible module, ideally from the root of the -/// crate. +/// **IMPORTANT**: This attribute must be used on reachable items (i.e. there must be no private +/// modules between the item and the root of the crate). If the item is in the root of the crate +/// you'll be fine. /// /// # Syntax /// @@ -429,6 +431,10 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream { /// Attribute to mark which function will be called at the beginning of the reset handler. /// +/// **IMPORTANT**: This attribute must be used once in the dependency graph and must be used on a +/// reachable item (i.e. there must be no private modules between the item and the root of the +/// crate). If the item is in the root of the crate you'll be fine. +/// /// The function must have the signature of `unsafe fn()`. /// /// The function passed will be called before static variables are initialized. Any access of static |