cpu/msp430_common: use __stack for ISR stacks
This commit is contained in:
parent
7fb8306553
commit
5a00e2e36c
@ -49,11 +49,6 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
extern volatile int __irq_is_in;
|
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
|
* @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)
|
static inline void __attribute__((always_inline)) __enter_isr(void)
|
||||||
{
|
{
|
||||||
|
extern char __stack; /* defined by linker script to end of RAM */
|
||||||
__save_context();
|
__save_context();
|
||||||
__asm__("mov.w %0,r1" : : "i"(__isr_stack + ISR_STACKSIZE));
|
__asm__("mov.w %0,r1" : : "i"(&__stack));
|
||||||
__irq_is_in = 1;
|
__irq_is_in = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,5 +23,3 @@
|
|||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
||||||
volatile int __irq_is_in = 0;
|
volatile int __irq_is_in = 0;
|
||||||
|
|
||||||
char __isr_stack[ISR_STACKSIZE];
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user