Other Parts Discussed in Thread: C2000WARE, SYSCONFIG
主题中讨论的其他器件:C2000WARE、 SysConfig
首先、我是一个老大-我的职业生涯比你年龄大。 我被用于命令行。 您的 GUI 配置混乱。 我在这方面损失了2个完整的日子。
我所能做的是:获取 Hello World、以便从两个 CPU (在不同的时间)打印到控制台。 我有扩展坞和开发板。
我要做的是设置 GPIO 引脚。
我一直在努力做的是:
- 从 hello.c 开始
- 将 GPIO .c 和.h 文件放入项目中(通过 project->add files)
- 清理编译。
我似乎通过 project->add 文件包含了这些文件,因为我可以在目录中看到它们所在的位置&&可以修改它们(请参阅"#warning")
我必须逐条记录包含哪些*。h 文件。 这就是#warnings 的来源。
我的问题是:
- 并不完全清楚文件的实际位置、即编译器认为它们是什么与它们实际的位置
- 我没有得到干净的编译。 我得到:
>>编译失败
subdir_rules.mk:9:目标'GPIO_ex1_setup.obj'的配方失败
"...\device.h"、第46行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/device.h
"...\cpu.h"、第54行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/cpu.h
"...\cpu.h"、第515行:错误#20:标识符"size_t"未定义
"...\GPIA.h"、第344行:错误#20:标识符"size_t"未定义
"...\device.h"、第52行:致命错误#35:#ERROR 指令:"必须在项目属性中定义 CPU1或 CPU2。 否则、头文件中的偏移量将不准确。"
在"../GPIO_ex1_setup.c"的编译中检测到2个错误和1个灾难性错误。
(忽略 CPU1/CPU2消息-我知道如何解决-大鱼炸)
首先、我遇到了.h 文件不喜欢"uint8_t"的问题-我能够找到 stdint.h 文件的位置/位置(使用"stdint.h"、而不是 如果你看,我能够添加警告,告诉我.h 文件确实在使用中。
但是-(这让我感到很震惊) size_t 不起作用。 WTF??? 这 一行来自 cpu.h: cpu_handle cpu_init (void *pMemory、const size_t numBytes);
我尝试附加 PDF、但您的 BRAINDAMAGED 表格不允许我这样做。 如果不允许您附加图像文件,那么它的作用是什么!!!!
'(是的、我很沮丧)
我需要什么
- 向工程中添加文件的教程(这意味着除猜测之外、其他文件有效的教程)(我看了看、找不到一个)
- 我需要创建一个控制 GPIO 的项目
- 我认为这是一个能够创建我的应用的"大家好的世界"-如果我无法从 GPIO 代码段创建项目、我就无法执行主任务。
- size_t 条形码的原因。 (40多年来,我有超过100万个 C LOC)-我*从未*看到过这一点)
如果我无法获得一些帮助、下一步是将整个目录结构剥离到裸片文件中。
此外-目录 C:\C2000Ware\C2000Ware_3_04_00_00\driverlib\f2838x\examples\C28x\GPIO\ccs 具有三个*。projectspec 文件。 如何使用它们? 我尝试了几种方法、但无法使其正常工作。
我将继续把我的头绑在墙上、但将非常感谢帮助。 我喜欢 TI 支持。
hello_gpio.c 是基本功能-甚至没有尝试调用 GPIO 函数(已合理地记录这些函数)
#include
/**
* hello.c
*
int main (空)
{
printf ("Hello World!\n");
返回0;
}
完整的错误报告为:
****项目 hello_gpio 的配置调试构建****
"C:\\clients\Xona\\compiler\\ccs\\utils\\bin\\gmake"-k -j 8 all -O
编译文件:"../GPIO_ex1_setup.c"
调用:C2000编译器
"c:/clients/Xona/compiler/ti-cgt-c2000_20.2.2.LTS/bin/cl2000 /clients/Xona/project/test_1/hello_gpio/Debug/syscfg -v28 -ml -mt --cla_support=cla2 -float_support=fpu64 -idiv_support=idiv0 -tmu_support=tmu0 -include_path="C:/clients/Xona/project/test_1/hello_gpio -include_path="C:/clients/Xona/compiler/ti-cgt-c2000_20.2.2.LTS/include -idive"-printf_support=idive---tmu0-include_display_subsection-exabi_subs=raine_display-exabi_subsepd_subsection-subsection-ex-expinflat_gui_subs=-ex-ex_priot_gui_en_gui_en_ex-ex-inue_display_subsep-ex_priot_gui_gui_gui_gui_off-ex_panag_subsep-inueld_subs=
>>编译失败
subdir_rules.mk:9:目标'GPIO_ex1_setup.obj'的配方失败
"...\device.h"、第46行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/device.h
"...\cpu.h"、第54行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/cpu.h
"...\cpu.h"、第515行:错误#20:标识符"size_t"未定义
"...\GPIA.h"、第344行:错误#20:标识符"size_t"未定义
"...\device.h"、第52行:致命错误#35:#ERROR 指令:"必须在项目属性中定义 CPU1或 CPU2。 否则、头文件中的偏移量将不准确。"
在"../GPIO_ex1_setup.c"的编译中检测到2个错误和1个灾难性错误。
编译已终止。
gmake:***[GPIO_ex1_setup.obj]错误1.
编译文件:"../GPIO_ex2_toggle.c"
调用:C2000编译器
"c:/clients/Xona/compiler/ti-cgt-c2000_20.2.2.LTS/bin/cl2000 /clients/Xona/project/test_1/hello_gpio/Debug/syscfg "-v28 -ml -mt --cla_support=cla2 -float_support=fpu64 -idiv_support=idiv0 -tmu_support=tmu0 -include_path="C:/clients/Xona/project/test_1/hello_gpio -include_path="C:/clients/Xona/compiler/ti-cgt-c2000_20.2.2.LTS/include -idive"-printf_support=idive-mu_support=tmu0-include_exabi_subs=rainat_subs=-ex_priendit_subs=-abi_subs=gpf-ex-ex-abi_subs=inflag_subs=-ex-ab_ex-ex-ab_subsection_subsection_ex-ex-ex-ab2_prive_display_subs=gpf-ex-ab_subsep_ab_ab_subsection_ex-ex-ex-ex
>>编译失败
subdir_rules.mk:9:目标'GPIO_ex2_toggle.obj'的配方失败
"...\cpu.h"、第54行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/cpu.h
"...\cpu.h"、第515行:错误#20:标识符"size_t"未定义
"...\GPIA.h"、第344行:错误#20:标识符"size_t"未定义
"...\device.h"、第46行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/device.h
"...\device.h"、第52行:致命错误#35:#ERROR 指令:"必须在项目属性中定义 CPU1或 CPU2。 否则、头文件中的偏移量将不准确。"
在编译"./GPIO_ex2_toggle.c"时检测到2个错误和1个灾难性错误。
编译已终止。
gmake:***[GPIO_ex2_toggle.obj]错误1.
编译文件:"../GPIO_ex3_interrupt.c"
调用:C2000编译器
"c:/clients/Xona/compiler/ti-cgt-c2000_20.2.2.LTS/bin/cl2000 /clients/Xona/project/test_1/hello_gpio/Debug/syscfg -v28 -ml -mt --cla_support=cla2 -float_support=fpu64 -idiv_support=idiv0 -tmu_support=tmu0 -include_path="C:/clients/Xona/project/test_1/hello_gpio -include_path="C:/clients/Xona/compiler/ti-cgt-c2000_20.2.2.LTS/include -idive"-printf_support=idive-tmu_support=tmu0 -include_display_subsection-exabi_subs=rupt_ine_influ_exabi_subsection-ex-inat_subs=-ex-intrab_subsection_ination_sepat_influation_reamag_inat_inat_inat_ex-ex-ex-inat_inat_ex-ex-inu_subsection_ex-ex-inu_inu_inu_inu_
>>编译失败
subdir_rules.mk:9:目标'GPIO_ex3_interrupt.obj'的配方失败
"...\cpu.h"、第54行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/cpu.h
"...\cpu.h"、第515行:错误#20:标识符"size_t"未定义
"...\GPIA.h"、第344行:错误#20:标识符"size_t"未定义
"...\device.h"、第46行:警告#1181-D:#warning 指令:"c:/clients/Xona/project/test_1/hello_gpio/device.h
"...\device.h"、第52行:致命错误#35:#ERROR 指令:"必须在项目属性中定义 CPU1或 CPU2。 否则、头文件中的偏移量将不准确。"
在"../GPIO_ex3_interrupt.c"的编译中检测到2个错误和1个灾难性错误。
编译已终止。
gmake:***[GPIO_ex3_interrupt.obj]错误1.
gmake:目标"全部"不会由于错误而重新生成。
****构建完成****