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.

[参考译文] TMS320F280039C:C2000Ware 问题、包括.cpp 文件中的"driverlib.h"和"f28003x_device.h"

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

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1472235/tms320f280039c-c2000ware-issue-including-both-driverlib-h-and-f28003x_device-h-in-cpp-file

器件型号:TMS320F280039C
Thread 中讨论的其他器件:C2000WARE

工具与软件:

我有一个包含以下内容的空.cpp 文件:

#include "f28003x_device.h"

#include "driverlib.h"

这将编译正常。

(附带问题:

如何获得这样的 Web 窗体以停止在任何地方插入空白行。

就像这样。 这里不需要间隙。

现在、我必须突出显示各个部分以将它们组合在一起、而不是只消除空白行。

有些线彼此靠近。

现代 UI 是荒谬的。

更多空白、

更多、没有

甚至更多。。。

滚动过程很有趣。

更多空格!)

--------------------------------------------------------

但是、如果线反转:

#include "driverlib.h"

#include "f28003x_device.h"

 

此时会显示以下错误:  

"C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f28003x\headers\include\f28003x_lin.h"

第236行:错误#41:需要一个标识符

"C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f28003x\headers\include\f28003x_lin.h"

第236行:错误#80:需要一个类型说明符

"C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f28003x\headers\include\f28003x_lin.h"

第236行:错误#66:需要一个";"

点击该错误会将我带到 f28003x_lib.h、第236行:  

BP_16空闲:1;// 2个 SCI 接收器处于空闲状态(SCI 兼容模式)

 

基本上、它会在"idle"上跳闸。 在以下文件中找到"idle":

C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f28003x\common\include\f28003x_globalprototypes.h  

--第92行空闲(空闲);

C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f28003x\headers\include\f28003x_lin.h

-- 236 BP_16 IDLE:1;// 2个 SCI 接收器处于 IDLE 状态(SCI 兼容模式)

C:\ti\c2000\C2000Ware_4_01_00_00\driverlib\f28003x\driverlib\cpu.h

-- 146 #ifndef idle
- 147 #define IDLE __ asm (" IDLE")
- 150 #define IDLE_asm __ asm (" idle");

C:\ti\c2000\C2000Ware_4_01_00_00\driverlib\f28003x\driverlib\sysctl.h

1402闲置;
1440闲置;
1477空闲;

这是个问题、因为如果代码库更大、许多头文件都包含其他头文件。 因此、不容易确定头文件包含的顺序。 似乎需要在 TI 头文件中修复某些问题? 或者、是禁止一起使用这两个头文件集吗? 也就是说、用户必须选择仅使用库还是仅使用 device_support?