Merge pull request #880 from dhylands/irq-align

teensy: Enable 8-byte stack alignment for IRQ Handlers.
This commit is contained in:
Damien George 2014-09-29 12:22:53 +01:00
commit 6e2051377f
1 changed files with 6 additions and 2 deletions

View File

@ -253,9 +253,13 @@ char *strdup(const char *str) {
#endif
int main(void) {
pinMode(LED_BUILTIN, OUTPUT);
delay(1000);
// TODO: Put this in a more common initialization function.
// Turn on STKALIGN which keeps the stack 8-byte aligned for interrupts
// (per EABI)
#define SCB_CCR_STKALIGN (1 << 9)
SCB_CCR |= SCB_CCR_STKALIGN;
pinMode(LED_BUILTIN, OUTPUT);
led_init();
// int first_soft_reset = true;