1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/msp430_common: use __stack for ISR stacks

This commit is contained in:
Kaspar Schleiser 2020-07-29 12:00:30 +02:00
parent 7fb8306553
commit 5a00e2e36c
2 changed files with 2 additions and 8 deletions

View File

@ -49,11 +49,6 @@ extern "C" {
*/
extern volatile int __irq_is_in;
/**
* @brief Memory used as stack for the interrupt context
*/
extern char __isr_stack[ISR_STACKSIZE];
/**
* @brief Save the current thread context from inside an ISR
*/
@ -102,8 +97,9 @@ static inline void __attribute__((always_inline)) __restore_context(void)
*/
static inline void __attribute__((always_inline)) __enter_isr(void)
{
extern char __stack; /* defined by linker script to end of RAM */
__save_context();
__asm__("mov.w %0,r1" : : "i"(__isr_stack + ISR_STACKSIZE));
__asm__("mov.w %0,r1" : : "i"(&__stack));
__irq_is_in = 1;
}

View File

@ -23,5 +23,3 @@
#include "cpu.h"
volatile int __irq_is_in = 0;
char __isr_stack[ISR_STACKSIZE];