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.
工具与软件:
您好!
我有如下代码:
#ifdef 调试
char loginfo_buffer[128];
#endif
但我现在要使用 CCS 中的调试配置来打开和关闭它。 调试配置是否向代码添加了任何标志、或者如何使代码知道是否在调试配置中。
此致、
CAN
您好 CAN、
在 CCS 中、有两种默认配置:Debug 和 Release。
对于调试配置、您可以将调试符号添加到"Predefined Symbols"选项卡。 这样做将使您的调试配置包含 loginfo_buffer[128]的代码和包含#ifdef debug 的代码。 对于 Release 配置、您不必添加调试符号、并且 Release 编译将不会包含用于调试的代码。