请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
使用 J721E RTOS SDK 附带的 C7x 编译器、我获得以下输出、以编译一些代码:
>>>> Optimizer terminated abnormally >>>> in function complexDivideRealConst() >>>> in file "benchmark_float.c" This is caused by a defect in the TI C/C++ Optimizer. TI Customer Support may be able to suggest a workaround to avoid this. Upgrading to the newest version of the compiler may fix this problem. Contact TI in the E2E support forums at http://e2e.ti.com under "Development Tools", "TI C/C++ Compiler". See the link titled "Submitting an issue". We need to see this ENTIRE error message and a complete, reproducible test case including ALL of the command-line options. Include the .pp file created by option --preproc_with_comment >> Compilation failure
SDK 中包含的此编译器版本为"ti-cgt-c7000_3.0.STS"。
我成功获得了一个最小的复制盒、如下所示:
#include <c7x.h> #include <stdint.h> #define NUM_BATCHES 512 #define NUM_POINTS 512 static __SE_TEMPLATE_v1 divideSE; static __SA_TEMPLATE_v1 divideSA; // Ok for out to equal either dividend (destructive) void complexDivideRealConst(float *dividend, uint32_t divisor, float *out) { __SE0_OPEN((void *)dividend, divideSE); __SA0_OPEN(divideSA); for(int i = 0; i < NUM_BATCHES * NUM_POINTS * 2 / 16; i++) *__SA0ADV(float16, out) = __SE0ADV(float16) / divisor; __SE0_CLOSE(); __SA0_CLOSE(); }
这会在以下编译命令行时显示问题:
/opt/ti-cgt-c7000_3.0.0.STS/bin/cl7x -c --c99 -O3 --issue_remarks --emit_warnings_as_errors -pden --abi=eabi --silicon_version=7100 --silicon_errata_i2117 -I/opt/ti-cgt-c7000_3.0.0.STS/include -D=C71="C71" -D=C7100 -D=__C7X_UNSTABLE_API -ppc --preproc_with_compile benchmark_float.c -fe benchmark_float.o
我将尝试按照请求附加预处理输出(在此处初始帖子似乎无法这样做)。