diff --git a/firmware/asm/thread.h b/firmware/asm/thread.h index fb7065e6fd..831de9ae8d 100644 --- a/firmware/asm/thread.h +++ b/firmware/asm/thread.h @@ -50,8 +50,12 @@ struct regs #ifndef MINSIGSTKSZ #define MINSIGSTKSZ 16384 #endif - /* MINSIGSTKSZ for the OS to deliver the signal + 0x6000 for us */ + /* MINSIGSTKSZ for the OS to deliver the signal, plus more for us */ +#if defined(SIMULATOR) || defined(__aarch64__) #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x6000) /* Bytes */ +#else + #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x3000) /* Bytes */ +#endif #elif defined(HAVE_WIN32_FIBER_THREADS) #define DEFAULT_STACK_SIZE 0x1000 /* Bytes */ #endif