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.
工具与软件:
尊敬的专家:
CCS12.8.1.
编译器 TI v22.6.0.LTS
我在 CPU1.c 文件中有一个浮点变量声明如下:
#pragma DATA_SECTION (t、"ramls1_RAMCMD");
float32_t;
其中、ramls1_RAMCMD 在 CMD 中设置为 RAMLS1、在 MEMCFG 中被声明为"CPU/CLA 共享数据存储器"。
当尝试编译以下 CLA 代码时:
extern float32_t;
__interrupt void Cla1Task3 ( void )
{
t = 1.0f;
}
我收到以下错误:
"C:\Users\alon.g\AppData\Local\Temp\{0EC771BC-7449-406D-8A90-D7FD69504070}"、错误! 在419行:[E0003] 16位寄存器地址无效。
MMOV32 @t、MR0;[CPU_FPU]|89|
"C:\Users\alon.g\AppData\Local\Temp\{0EC771BC-7449-406D-8A90-D7FD69504070}"、错误! 第419行:[E0003]非法寄存器寻址操作数
MMOV32 @t、MR0;[CPU_FPU]|89|
"C:\Users\alon.g\AppData\Local\Temp\{0EC771BC-7449-406D-8A90-D7FD69504070}"、错误! 第419行:[E0004]非法操作数组合
MMOV32 @t、MR0;[CPU_FPU]|89|
源代码中的错误-汇编器已中止
当 t 定义为 uint16_t 或 uint32_t 时、不会发生此类错误。
以下代码(其中 t 在.cla 文件中本地定义)也会编译正常:
浮点 t;
__interrupt void Cla1Task3 ( void )
{
T=1.0f;
}
如果我在 CPU1.c 文件中按如下方式定义两个变量:
#pragma DATA_SECTION (x、"ramls1_RAMCMD");
#pragma DATA_SECTION (t、"ramls1_RAMCMD");
浮点 t;
浮点 x;
然后以下.CLA 代码编译正常:
extern float x;
__interrupt void Cla1Task3 ( void )
{
x = 1.0f;
}
映射文件显示:
全局数据符号:按数据页排序
地址数据页名称
--- ------- ---
00000400 10 (00000400)___STACK
00008800 220 (00008800) V
00008802 220 (00008800) t
00008804 220 (00008800) x
不仅有一个错误,错误代码并不指向所谓有问题的源代码行。
谢谢!
-Alon。
我无法重现以下行为...
[报价用户 id="637192" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1486037/tms320f28p650dk-cla-code-compilation-failure-on-float-variable-residing-in-lsram-shared-cpu1-cla-memory "]当尝试编译以下 CLA 代码时:
extern float32_t;
__interrupt void Cla1Task3 ( void )
{
t = 1.0f;
}
我收到以下错误:
"C:\Users\alon.g\AppData\Local\Temp\{0EC771BC-7449-406D-8A90-D7FD69504070}"、错误! 在419行:[E0003] 16位寄存器地址无效。
MMOV32 @t、MR0;[CPU_FPU]|89|
"C:\Users\alon.g\AppData\Local\Temp\{0EC771BC-7449-406D-8A90-D7FD69504070}"、错误! 第419行:[E0003]非法寄存器寻址操作数
MMOV32 @t、MR0;[CPU_FPU]|89|
"C:\Users\alon.g\AppData\Local\Temp\{0EC771BC-7449-406D-8A90-D7FD69504070}"、错误! 第419行:[E0004]非法操作数组合
MMOV32 @t、MR0;[CPU_FPU]|89|
源代码中的错误-汇编器已中止
我认为这就是所有的源代码。 我想 float32_t 正弦值 悬空 . 请将所有构建选项完全显示为 cl2000 看到了。 请复制粘贴文本、不要使用屏幕截图。
谢谢。此致、
-George.
感谢您提供构建选项。 我可以重现相同的行为。 我提交了 EXT_EP-12238 以对其进行调查。 我们欢迎您通过这个链接来了解。
作为权变措施、请重命名变量 t 其他东西上、比如 温度 .
谢谢。此致、
-George.