This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具与软件:
您好!
我需要在开发操作系统模块时保存和恢复上下文。 我想知道如何保存 FPU 通用寄存器和状态寄存器。 我在 TRM 中找不到相关说明。
谢谢!
Zihao
Zihao,
我将指派合适的专家来解答这一问题。
谢谢!
SIRA
尊敬的 Zihao:
在 FreeRTOS 端口中、每个任务都有一个附加值存储在堆栈上、用于指示任务是否使用 FPU。 如果此值为 true、则 还会 保存 FPU 寄存器(M0 - M31)并从任务堆栈恢复(没有 FPU 特定的状态寄存器)。 您可以参考 ulTaskHasFPUContext 在 FreeRTOS 端口文件中、以实现相同的代码。
如果您有任何其他问题、请告诉我。
此致、
Arnav