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.

[参考译文] TMS570LS1227:由符合 HalCoGen 代码 MISRA -2004生成的代码

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/607366/tms570ls1227-code-generated-by-halcogen-code-misra--2004-compliant

器件型号:TMS570LS1227
主题中讨论的其他器件:HALCOGEN

降级器、

HalCoGen 生成的代码有大量#pragma xxxx()、例如

#pragma CODE_STATE ()
#pragma 中断()
#pragma weak ()

这些代码不符合 MISRA-2004标准。 我尝试删除这些#pragma xxx()。 运行正常。

我的问题是删除这些#pragma xxx()是否有风险?

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

    Gavin、您好!

    MISRA-2004规则3.4规定:"应记录并解释#pragma 指令的所有用法"。 使用#pragma 不违反 MSIRA 规则。

    这些指令是 ISR 所必需的。

    此致、