Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在freertosv9.0.0 tskTCB结构体中添加 uxSizeofStack字段后,获取任务剩余堆栈为0 #42

Open
zalelife opened this issue Jan 30, 2021 · 2 comments

Comments

@zalelife
Copy link

ARM_CM4F,xTaskCreatStatic创建任务。当改动tskTCB后,不改动FreeRTOS.h文件中 StaticTask_t结构体,获取任务剩余堆栈一直为0,相应改动 StaticTask_t结构体后获取任务剩余堆栈正常。

@wdfk-prog
Copy link

我在FREERTOS V10.2.1中遇到同样的问题

	#if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
		void			*pxDummy8;
	#else
		UBaseType_t		pxDummy8;
	#endif

做出如下修改可用;否则线程都不跑了

@Mexico-zyy-lost
Copy link

做了这个修改后,
#if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )

  StackType_t		*pxEndOfStack;		/*< Points to the highest valid address for the stack. */

#else
UBaseType_t uxSizeOfStack;
#endif
FREERTOS V10.3.1也是报错:configASSERT( xSize == sizeof( TCB_t ) );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants