diff options
Diffstat (limited to 'ports')
-rw-r--r-- | ports/MSP430/chcore.c | 8 | ||||
-rw-r--r-- | ports/MSP430/chcore.h | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/ports/MSP430/chcore.c b/ports/MSP430/chcore.c index b87953ef0..b2ff849d6 100644 --- a/ports/MSP430/chcore.c +++ b/ports/MSP430/chcore.c @@ -50,8 +50,7 @@ __attribute__((naked)) void chSysSwitchI(Thread *otp, Thread *ntp) {
register struct intctx *sp asm("r1");
- asm volatile ("push r2 \n\t" \
- "push r11 \n\t" \
+ asm volatile ("push r11 \n\t" \
"push r10 \n\t" \
"push r9 \n\t" \
"push r8 \n\t" \
@@ -69,7 +68,7 @@ void chSysSwitchI(Thread *otp, Thread *ntp) { "pop r9 \n\t" \
"pop r10 \n\t" \
"pop r11 \n\t" \
- "reti" : : "r" (sp));
+ "ret" : : "r" (sp));
}
/**
@@ -80,7 +79,8 @@ void chSysPuts(char *msg) { void threadstart(void) {
- asm volatile ("mov r11, r15 \n\t" \
+ asm volatile ("eint \n\t" \
+ "mov r11, r15 \n\t" \
"call r10 \n\t" \
"call #chThdExit");
}
diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h index fc689f806..ea239c688 100644 --- a/ports/MSP430/chcore.h +++ b/ports/MSP430/chcore.h @@ -51,7 +51,7 @@ struct intctx { regmsp r9;
regmsp r10;
regmsp r11;
- regmsp sr;
+// regmsp sr;
regmsp pc;
};
@@ -65,7 +65,6 @@ typedef struct { sizeof(struct intctx)); \
tp->p_ctx.sp->r10 = pf; \
tp->p_ctx.sp->r11 = arg; \
- tp->p_ctx.sp->sr = (regmsp)GIE; \
tp->p_ctx.sp->pc = threadstart; \
}
|