diff --git a/libraries/rtos/rtx/TARGET_ARM7/cmsis_os.h b/libraries/rtos/rtx/TARGET_ARM7/cmsis_os.h index ae92bfd548..314a5788c1 100644 --- a/libraries/rtos/rtx/TARGET_ARM7/cmsis_os.h +++ b/libraries/rtos/rtx/TARGET_ARM7/cmsis_os.h @@ -243,7 +243,7 @@ typedef struct os_thread_def { os_pthread pthread; ///< start address of thread function osPriority tpriority; ///< initial thread priority uint32_t stacksize; ///< stack size requirements in bytes - unsigned char *stack_pointer; ///< pointer to the stack memory block + uint32_t *stack_pointer; ///< pointer to the stack memory block struct OS_TCB tcb; } osThreadDef_t; @@ -337,7 +337,7 @@ int32_t osKernelRunning(void); extern osThreadDef_t os_thread_def_##name #else // define the object #define osThreadDef(name, priority, stacksz) \ -unsigned char os_thread_def_stack_##name [stacksz] __attribute__((aligned (4))); \ +uint32_t os_thread_def_stack_##name [stacksz / sizeof(uint32_t)]; \ osThreadDef_t os_thread_def_##name = \ { (name), (priority), (stacksz), (os_thread_def_stack_##name)} #endif