diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h index 7de756b31..d6a7945d7 100644 --- a/os/nil/include/nil.h +++ b/os/nil/include/nil.h @@ -407,7 +407,8 @@ typedef struct { * @brief Entry of user threads table */ #define THD_TABLE_ENTRY(wap, name, funcp, arg) \ - {wap, (wap) + sizeof (wap), name, funcp, arg}, + {wap, ((stkalign_t *)(wap)) + (sizeof (wap) / sizeof(stkalign_t)), \ + name, funcp, arg}, /** * @brief End of user threads table. @@ -441,7 +442,7 @@ typedef struct { * @api */ #define THD_WORKING_AREA_SIZE(n) \ - THD_ALIGN_STACK_SIZE(sizeof(thread_t) + PORT_WA_SIZE(n)) + THD_ALIGN_STACK_SIZE(PORT_WA_SIZE(n)) /** * @brief Static working area allocation. diff --git a/os/nil/ports/e200/nilcore.h b/os/nil/ports/e200/nilcore.h index 279ea392e..1189bd835 100644 --- a/os/nil/ports/e200/nilcore.h +++ b/os/nil/ports/e200/nilcore.h @@ -92,7 +92,7 @@ * area size. */ #if !defined(PORT_INT_REQUIRED_STACK) || defined(__DOXYGEN__) -#define PORT_INT_REQUIRED_STACK 32 +#define PORT_INT_REQUIRED_STACK 256 #endif /**