diff options
-rw-r--r-- | core/cortex-m/vecttable.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/cortex-m/vecttable.c b/core/cortex-m/vecttable.c index 0f11d03d10..a79b42d16a 100644 --- a/core/cortex-m/vecttable.c +++ b/core/cortex-m/vecttable.c @@ -92,7 +92,11 @@ void svc_helper_handler() */ #define IRQ_UNUSED_OFFSET 8 -#define table(x) func vectors[] __attribute__((section(".text.vecttable,\"a\" @"))) = { x [IRQ_UNUSED_OFFSET] = null }; +#define table(x) \ + const func vectors[] __attribute__((section(".text.vecttable"))) = { \ + x \ + [IRQ_UNUSED_OFFSET] = null \ + }; #define vec(name) name ## _handler, #define irq(num) [num < CONFIG_IRQ_COUNT ? num + IRQ_OFFSET : IRQ_UNUSED_OFFSET] = vec(irq_ ## num) |