From 7b2861276b575b661540d51b2b002c94bcd57ead Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Wed, 17 Mar 2021 13:04:10 -0700 Subject: [PATCH] linker: add __isr tag This allows interrupt service routine to be declared with the __isr tag so they can be placed in the correct linker section. The first would be putting them into the pinned section. Signed-off-by: Daniel Leung --- include/linker/section_tags.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linker/section_tags.h b/include/linker/section_tags.h index eaace84f519..39549c82428 100644 --- a/include/linker/section_tags.h +++ b/include/linker/section_tags.h @@ -80,6 +80,12 @@ #define __pinned_noinit __noinit #endif /* CONFIG_LINKER_USE_PINNED_SECTION */ +#if defined(CONFIG_LINKER_USE_PINNED_SECTION) +#define __isr __pinned_func +#else +#define __isr +#endif + #endif /* !_ASMLANGUAGE */ #endif /* ZEPHYR_INCLUDE_LINKER_SECTION_TAGS_H_ */