【发布时间】:2020-05-17 00:39:09
【问题描述】:
我将 CubeMX STM32 配置为使用 FreeRTOS 堆栈溢出监控。 现在我想测试它是否真的有效。 我尝试了一些简单的东西,比如在其中一个线程中执行下面的函数
`// C program to demonstrate stack overflow
// by creating a non-terminating recursive
// function.
void fun(int x)
{
if (x == 1)
return;
x = 6;
fun(x);
}
int x = 5;
fun(x);
但我得到了 HardFault。
您知道在 FreeRTOS 上模拟堆栈溢出的方法吗?
【问题讨论】:
标签: c embedded stack-overflow freertos