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:F280039C 向 driverlib 项目添加 bitfield 支持

Guru**** 2546020 points
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1222766/c2000ware-f280039c-adding-bitfield-support-to-a-driverlib-project

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

您好!

根据 C2000ware 4.03中的 F28003x_FRM_EX_UG.pdf 文件(第2.3章)、我尝试将位域功能添加到 driverlib 应用程序代码中。

我的工程基于 C:\ti\c2000\C2000Ware_4_03_00_00\driverlib\f28003x\examples\HRPWM\HRPWM_ex3_prd_updown_so、我还将使用 SysConfig。

我已添加了该文档所需的所有路径和文件、但 LIN 头文件出现编译错误。 请参见下方的  

您能告诉我需要做些什么才能使它正常工作吗?或者我犯了什么错误?

非常感谢您的帮助、


阿诺德

生成文件:"../analog.c"
调用:C2000编译器
"c:/ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000 /ti/c2000/C2000Ware_4_03_00_00 /ti/c2000/C2000Ware_4_03_00_00/libraries/calibration/hrpwm/f28003x/include -v28 -ml -mt -cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcrc -Ooff --include_path="C:/Users/ahugron/OneDrive /ti/ccs1230/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f28003x/headers/include - include_path="C:/Users/ahugron/OneDrive /ti/c2000/C2000Ware_4_03_00_00/driverlib/f28003x/driverlib /Users/ahugron/OneDrive

>>编译失败
subdir_rules.mk:9:目标"analog.obj"的配方失败
"C:\ti\c2000\C2000Ware_4_03_00_00\device_support\f28003x\headers\f28003x_lin.h"、第236行:错误#41:需要一个标识符
"C:\ti\c2000\C2000Ware_4_03_00_00\device_support\f28003x\heads\include\f28003x_lin.h"、第236行:错误#80:需要一个类型指定符
"C:\ti\c2000\C2000Ware_4_03_00_00\device_support\f28003x\heads\include\f28003x_lin.h"、第236行:错误#170:此处不允许使用函数类型
"C:\ti\c2000\c2000Ware_4_03_00_00\device_support\f28003x\headers\f28003x_lin.h"、第236行:警告#109-D:长度为1的有符号位字段
编译"../analog.c"时检测到3个错误。
gmake:***[analog.obj]错误1.

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

    您好!  

    它是抱怨关键字"idle".  如果在单个 CCS 项目中组合了 driverlib 和 bitfield 标头、则应使用"dual_headers"作为预定义的应项目。  您可以在 CCS 项目中将其添加为预定义符号。

    添加该函数是为了避免枚举/结构/宏之间发生这种冲突、这些枚举/结构/宏在 bitfield 和 driverlib 头文件中具有完全相同的名称

    此致

    Siddharth