aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cortex-m-rt/macros/src/lib.rs14
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