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.

[参考译文] PROCESSOR-SDK-J721E:CAN 驱动程序的代码编译错误

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1303169/processor-sdk-j721e-code-compilation-error-for-can-driver

器件型号:PROCESSOR-SDK-J721E

团队、您好!

MCAL 封装: MCUSW_09_00_00_10_CONFIG + SDK-RTOS-j721e-EVM-09_00_00_02

从提到的软件包编译 CAN 驱动程序时报告以下错误消息:

{code}C Platform_Types:/work/workspace/ACP-8.8.9_TDA4VMCR5_36927/tests/Compile:Can_Com:112/output/generated/include\toke.h 119:6:错误:在预处理器子表达式
#if 中、令牌不是有效的二进制运算符(true == false)
^~~~
C:/work/workspace/ACP-8.8.9_TDA4VMCR5_36927/Tresos/plugins/McalExt_TS_T31D46M1I0R0/MCAL_Delivery/mcal hw_include/tistdtypes.h:97:23:注意:已从宏"true"展开
#define true ((bool) 1)
~~~~~~ ^
in file included from C:/work/workspace/ACP-8.8.9_TDA4VMCR5_36927/Tresos/plugins/McalExt_TS_T31D46M1I0R0/MCAL_Delivery/mcal/Can/mcan_hw/V1/mcan.c:57
:in file included from C:/work/workspace/ACP-8.8.9_TDA4VMCR5_36927/Tresos/plugins/McalExt_TS_T31D46M1I0R0/MCAL_Delivery/mcal hw_include/LLD_mcan.h
Std_Types:45:in files included
from C:/work/workspace/ACP-8.8.9_TDA4VMCR5_36927/Tresos/plugins/Base_TS_TxDxM5I2R0/include ptr.h:29
:in file included from C:/work/workspace/ACP-8.8.9_TDA4VMCR5_36927/Tresos/plugins/Compiler_TS_TxDxM1I0R0/include Compiler.h:49:C:/work/workspace/ACP-8.8.9_TDA4VMCR5_36927/Tresos/plugins/Base_TS_TxDxM5I2R0/include Compiler_Common:169:


2:error:null_ptr already defined #error NULL_ptr already defined code ^ 2 error 生成错误。 

根据 AUTOSAR_SWS_PlatformTypes.pdf、true 和 false 应在 LLD.h 中定义为 Platform_Types 中的 SWS_Platform_00056、但在 tistdtypes.h 和 LLD_types.h 中定义。  

根据 AUTOSAR_SWS_CompilerAbstract.pdf、NULL_PTR 应在 SWS_Compiler_00051在 Compiler_Cfg 中定义。

您能就这个问题提供反馈吗?

Br、

舒伯姆

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

    您好!

    我相信真和假 也在 Platform_Types 中定义。 我没有得到你在这里,你能帮助我更好地理解吗?

    此致

    M·塔伦

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

    尊敬的 Tarun:
    在 MCAL 软件包中、MCAL 软件包 MCUSW_09_00_00_10_CONFIG + SDK-RTOS-j721e-evm-09_00_00_02、NULL、NULL_ptr、true 和 false 宏在 lld_types.h 中定义、并且 tistdtypes.h 会导致编译错误(例如错误:null_ptr 已定义)、因为该定义在 Autosar Compiler_Common 文件的 EB Base 插件中可用。
    因此该定义应始终来自 Autosar 的 Base 插件。

    Br、
    舒伯姆

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

    Shubham、您好!

    我得到了你所要求的。 让我来和开发团队讨论并回复您。

    注意:年末休假/休假可能会造成延迟

    此致

    M·塔伦

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

    Shubham、您好!

    问题是否仍然未解决?

    此致

    M·塔伦