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.

[参考译文] TMS320F28388D:错误#121返回值拼写错误与"ERAD.h"中的函数类型不匹配

Guru**** 2601915 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1125401/tms320f28388d-error-121-return-value-tyoe-does-not-match-function-type-in-erad-h

器件型号:TMS320F28388D

您好!  

尝试重建项目时出现以下错误:"error #121 return value tyoe does not match function type"(错误#121返回值拼写错误与函数类型不匹配)。

该项目在我的旧计算机上工作、因此它应该是 Code Composer Studio 配置的问题。

以下 Thread 描述了 erad.h 中完全相同功能的相同问题、并修复了我使用的较新 C2000 Ware 4.0的此问题。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1046923/tms320f28388d-the-return-value-of-erad_getownership-in-erad-h

所以我猜固定版本会给我带来问题。

我使用的是 C2000 Ware 4.0版

我为新计算机从 CCS 11改为 CCS12。

我使用的是编译器版本 TI v21.6.0.LTS。

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

    我能够解决这个问题。

    我已经在返回状态中添加了以下两个红色大括号、现在程序重新起作用。

    return ((ERAD_Owner)((HWREGH (ERAD_GLOBAL_BASE + ERAD_O_GLBL_Owner)&
    ERAD_GLBL_owner_owner_M)>> ERAD_GLBL_owner_owner_S)