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.

[参考译文] TMS320F28P550SJ:CLA 任务内部的函数调用会使 CLA 任务不运行

Guru**** 2549890 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1570211/tms320f28p550sj-function-calls-inside-a-cla-task-makes-the-cla-task-not-running

器件型号:TMS320F28P550SJ


工具/软件:

您好、

在 F28P550 中开发的代码上、有一个 CLA 任务正在调用函数调用、但这个任务在触发时不会执行。  

当 CLA 任务没有函数调用时,它会按预期执行,但通过添加 foo() 不会执行该任务。  

以下是问题的 peudocode:  

uint16 task3Counter;
__attribute__((interrupt)) void Cla1Task3 ( void )
{
task3Counter ++;
}

此版本完美运行。  

uint16 task3Counter;

uint16 foo(uint16 argUI16)

{

    return argUI16 ++;

}



__attribute__((interrupt))  void Cla1Task3 ( void )
{
task3Counter = foo(task3Counter);

}

这不奏效。

我对问题的看法是、缺少标志或错误(正如我预期存在使用函数调用的功能)、但不知何故我找不到问题。 bellow 我共享 编译器 和链接器标志。

编译器的标志为:

-v28 -mt -cla_support=cla0 --float_support=cla0 --float_support=fpu32 --tmu_support=tmu1 --vcu_support=vcrc -O3 --include_path=“C:/Workspace/git/ESC /Workspace/git/ESC/thirdparties/ti/F28P55x/device/driverlib --include_path=“C:/Workspace/git/ESC/thirdparties/ti/F28P55x/device_support/common/include /TI/ccs2020/ccs/tools/compiler/ti-cgt-c2000_22.6.2.LTS/include /“--include_path=“c:/Workspace/git/ESC/thirdparties/ti/F28P55x/device_support/headers/include /“--include_path=vcrc

链接器标志为:  

-z -m“proj.map"--heap_size=0x100“--heap_size=0x100 --stack_size=0x200 --warn_sections -i“C:/TI/ccs2020/ccs/tools/compiler/ti-cgt-c2000_22.6.2.LTS/lib -i“C:/TI/ccs2020/ccs/tools/compiler/ti-cgt-c2000_22.6.2.LTS/include --reread_libs --diag_swrap=off --display_error_number --link_info=“proj_linkInfo.xml"--rom_model“--rom_model

提前感谢您的支持。

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

    尊敬的 Pedro:

    由于 CLA 代码中的函数调用有时会导致问题、因为它将暂存区用作“堆栈“、空间通常更有限。 在错误的情况下、您能否 通过在映射文件中搜索 foo 函数来检查它在内存中的分配位置? 您是否还可以在此处发送映射文件+链接器 cmd 文件以便我查看?

    此致、

    Delaney