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.

[参考译文] CCSTUDIO:带 Clang 编译器的.noinit 段

Guru**** 2473270 points
Other Parts Discussed in Thread: CCSTUDIO

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1466070/ccstudio-noinit-section-with-clang-compiler

器件型号:CCSTUDIO

工具与软件:

我需要一些能够在复位后继续运行的变量。
当使用 CCS 与 GNU 编译器一同使用时、我能够通过以下方式实现这一点:
__attribute__((section(".noinit"))) int 变量;
但在最近的一个项目中、我需要使用 Clang 编译器。 默认情况下似乎没有.noinit 段。
如何在 CCStudio 中使用 Clang 编译器时添加一个可正常运行的.noinit 段?