The push of xPSR when the kernel is cooperative is not needed and even dangerous.
The ARM EABI states that the stack at functions entry should be aligned to a 64bit
boundary.
Since the space reserved for xPSR was never popped out, the stack was misaligned!
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4612
38d2e660-2303-0410-9eaa-
f027e97ec537
CPU_PUSH_WORD(stack, IRQ_PRIO_DISABLED); \
} while (0)
- #else /* !CONFIG_KERN_PREEMPT */
- #define CPU_PUSH_CALL_FRAME(sp, func) \
- do { \
- CPU_PUSH_WORD((sp), 0x01000000); /* xPSR */ \
- CPU_PUSH_WORD((sp), (cpu_stack_t)(func)); /* pc */ \
- } while (0);
#endif /* CONFIG_KERN_PREEMPT */
#elif CPU_AVR