teensy: Enable 8-byte stack alignment for IRQ Handlers.
This commit is contained in:
parent
f90b59e610
commit
ada691e704
@ -253,9 +253,13 @@ char *strdup(const char *str) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
pinMode(LED_BUILTIN, OUTPUT);
|
// TODO: Put this in a more common initialization function.
|
||||||
delay(1000);
|
// 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();
|
led_init();
|
||||||
|
|
||||||
// int first_soft_reset = true;
|
// int first_soft_reset = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user