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.

[参考译文] 如何在 ti-cgt-arm_20.2.LTS 中支持__attribute__(always_inline、nodebug)

Guru**** 2587365 points


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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1032797/how-to-support-__attribute__-always_inline-nodebug-in-ti-cgt-arm_20-2-2-lts

你好、冠军、
  我的客户尝试在 ti-cgt-arm_20.2.LTS 中构建以下代码。

静态 uint32 os_GetMode (void)__attribute__(always_inline、nodebug);

__attribute__((always_inline、nodebug))静态 UINT32 OS_GetMode (void)

 寄存器 uint32 os_val = 0U;

 

 _asm volatile (

   "%[结果]、CPSR\n 夫人  "

   "和%[结果]、%[结果]、#0x1F\n        "

   :[结果]"=r"(os_val)::"memory"、"cc"

 );

 返回 os_val;

 他们收到以下错误:

E:\Hugel\01_MyWork\Test\FVR40\MSS\BSW\src\OS\gen\OS.h"、第151行:警告#1173-D:未知属性"nodebug"

E:\Hugel\01_MyWork\Test\FVR40\MSS\BSW\src\OS\gen\OS.h"、第152行:警告#1173-D:未知属性"nodebug"

E:\Hugel\01_MyWork\Test\FVR40\MSS\BSW\src\OS\gen\OS.h"、第159行:错误#18:预期为")"

您知道 我们是否可以在此 CGT 版本中支持"__attribute__( always_inline、nodebug);"吗?

谢谢、
Adam

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

    要查看 TI ARM 编译器支持的函数属性列表、 请在 TI ARM 编译器手册中搜索 标题 为"函数属性"的子章节。  您将看到支持 nodebug。

    GCC 样式 asm 语句,如...

    [引用 userid="94020" url="~/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1032797/how-to-support-__attribute__-always_inline-nodebug-in-ti-cgt-arm_20-2-2-lts "]

    _asm volatile (

       "%[结果]、CPSR\n 夫人  "

       "和%[结果]、%[结果]、#0x1F\n        "

       :[结果]"=r"(os_val)::"memory"、"cc"

     );

    [/报价]

    (笑声) 也不受支持。

    考虑使用 的 TI ArmRegisteredClang 编译器。  它支持 nodebug 属性和 GCC 样式 asm 语句。

    谢谢、此致、

    乔治

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

    尊敬的乔治:  
       感谢您的回复。 我现在很清楚。

    此致、
    Adam