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.

[参考译文] C2000WARE:"f28nnx_device.h"器件头文件应使用#ifndef _asm_header__来保护 EALLOW 和其他汇编指令的定义

Guru**** 2535750 points
Other Parts Discussed in Thread: C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1548547/c2000ware-f28nnnx_device-h-device-header-files-should-guard-definition-of-eallow-and-other-assembly-instructions-with-ifndef-__asm_header__

器件型号:C2000WARE


工具/软件:

我有一个.asm 文件、用于访问 ADC 寄存器、因此我在 cdecl 块的.asm 文件中包含文件“f28p65x_device.h"标“标头。 但是、在执行此操作时、我会收到以下警告:

“C:\Users\PSULLI~1\AppData\Local\Temp\{FF755292-B021-4CC8-B47A-228F61160492}“、警告! 第 126 行:[E0004]无法使用.define 重新定义现有操作码'EALLOW'。 汇编器忽略.define。
        .define “__EALLOW()",“,EALLOW、EALLOW
 
“C:\Users\PSULLI~1\AppData\Local\Temp\{FF755292-B021-4CC8-B47A-228F61160492}“、警告! 第 127 行:[E0004]无法使用.define 重新定义现有操作码'EDIS'。 汇编器忽略.define。
        .define “__EDIS()",“,EDIS、EDIS

EALLOW 已经是汇编文件中的汇编助记符、不能像在器件标头中那样重新定义。 我认为该定义应由_asm_header__加以保护、以避免出现以下警告:

#ifndef __ASM_HEADER__

#ifndef  EALLOW
#ifndef _TMS320C28XX_CLA_
#define  EALLOW __eallow()
#else
#define  EALLOW __meallow()
#endif // _TMS320C28XX_CLA_
#endif // EALLOW

#endif

是否有其他方法可以访问.asm 文件中的外设寄存器?  

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

    您好、  

    感谢您报告这一点。 将把它作为错误进行文件、并在即将发布的 C2000Ware 版本中修复。

    此致

    Siddharth