From 845840ec08566a3aa9c04167b1a18a56255afa4f Mon Sep 17 00:00:00 2001 From: Jeff McBride Date: Mon, 7 Feb 2022 16:41:53 -0800 Subject: [PATCH] [architecture] include noinline in modm_fastcode attribute --- src/modm/architecture/utils.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modm/architecture/utils.hpp b/src/modm/architecture/utils.hpp index 3a60c1292a..832afbe77c 100644 --- a/src/modm/architecture/utils.hpp +++ b/src/modm/architecture/utils.hpp @@ -54,6 +54,9 @@ */ #define modm_always_inline + /// Specifies that a function should never be inlined + #define modm_noinline + /// Attached to a variable or a function this means that it is meant to be possibly unused. #define modm_unused @@ -125,6 +128,7 @@ #define MODM_ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) #define modm_always_inline inline __attribute__((always_inline)) + #define modm_noinline __attribute__((noinline)) #define modm_unused __attribute__((unused)) #define modm_aligned(n) __attribute__((aligned(n))) #define modm_packed __attribute__((packed)) @@ -155,7 +159,7 @@ # define modm_fastdata # define modm_faststack #else - # define modm_fastcode modm_section(".fastcode") + # define modm_fastcode modm_section(".fastcode") modm_noinline # define modm_ramcode modm_fastcode # define modm_fastdata modm_section(".fastdata") # define modm_faststack modm_section(".faststack")