共3条
1/1 1 跳转至页
问
在编译周立功光盘附带的例子(Ucosii 2.52 for lpc2100\EX1_ARM)时,居然出了104个错误,我是把整个文件夹从光盘拷到硬盘,没做任何改动就编译,下面是所有的错误。周立功那本手册写得比较简单,不知道这个例子是做什么的。
Could not find or load the file 襉s_cpu_a.s?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_cpu_c.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Error : (Serious) C2857E: #include file "..\..\ARM\os_cpu.h" wouldn't open Includes.h line 40 Error : C2285E: expected ';' or ',' - inserted ';' before 'OS_FLAGS' os_cfg.h line 114 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'OS_FLAGS' os_cfg.h line 114 Error : (Serious) C2857E: #include file "..\..\source\ucos_ii.h" wouldn't open Includes.h line 42 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 63 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'color' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'color' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 63 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 63 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 64 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'bgnd_color' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'bgnd_color' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 64 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 64 Error : C2285E: expected ')' or ',' - inserted ')' before 'y' pc.h line 65 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 65 Error : (Fatal) C2285E: C3047U: Too many errors pc.h line 65 Could not find or load the file 襉s_core.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_flag.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_mbox.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_mem.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_mutex.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_q.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_sem.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_task.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_time.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Error : (Serious) C2857E: #include file "..\..\ARM\os_cpu.h" wouldn't open Includes.h line 40 Error : C2285E: expected ';' or ',' - inserted ';' before 'OS_FLAGS' os_cfg.h line 114 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'OS_FLAGS' os_cfg.h line 114 Error : (Serious) C2857E: #include file "..\..\source\ucos_ii.h" wouldn't open Includes.h line 42 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 63 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'color' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'color' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 63 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 63 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 64 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'bgnd_color' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'bgnd_color' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 64 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 64 Error : C2285E: expected ')' or ',' - inserted ')' before 'y' pc.h line 65 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 65 Error : (Fatal) C2285E: C3047U: Too many errors pc.h line 65 Error : (Serious) C2857E: #include file "..\..\ARM\os_cpu.h" wouldn't open Includes.h line 40 Error : C2285E: expected ';' or ',' - inserted ';' before 'OS_FLAGS' os_cfg.h line 114 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'OS_FLAGS' os_cfg.h line 114 Error : (Serious) C2857E: #include file "..\..\source\ucos_ii.h" wouldn't open Includes.h line 42 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 63 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'color' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'color' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 63 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 63 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 64 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'bgnd_color' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'bgnd_color' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 64 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 64 Error : C2285E: expected ')' or ',' - inserted ')' before 'y' pc.h line 65 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 65 Error : (Fatal) C2285E: C3047U: Too many errors pc.h line 65
答 1: 例子中没有uCOS的源码,首先要添加源码(2.52版本)这个例子是uCOS作者的经典移植示例。 答 2: 请问具体应该怎么做(或者要读什么)才能让例子跑起来?请问具体应该怎么做(或者要读什么)才能让例子跑起来?
多谢
Camel2005
Could not find or load the file 襉s_cpu_a.s?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_cpu_c.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Error : (Serious) C2857E: #include file "..\..\ARM\os_cpu.h" wouldn't open Includes.h line 40 Error : C2285E: expected ';' or ',' - inserted ';' before 'OS_FLAGS' os_cfg.h line 114 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'OS_FLAGS' os_cfg.h line 114 Error : (Serious) C2857E: #include file "..\..\source\ucos_ii.h" wouldn't open Includes.h line 42 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 63 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'color' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'color' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 63 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 63 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 64 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'bgnd_color' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'bgnd_color' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 64 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 64 Error : C2285E: expected ')' or ',' - inserted ')' before 'y' pc.h line 65 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 65 Error : (Fatal) C2285E: C3047U: Too many errors pc.h line 65 Could not find or load the file 襉s_core.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_flag.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_mbox.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_mem.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_mutex.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_q.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_sem.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_task.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Could not find or load the file 襉s_time.c?for target 褼ebugInFLASH?for project 褽X1_ARM.mcp? Error : (Serious) C2857E: #include file "..\..\ARM\os_cpu.h" wouldn't open Includes.h line 40 Error : C2285E: expected ';' or ',' - inserted ';' before 'OS_FLAGS' os_cfg.h line 114 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'OS_FLAGS' os_cfg.h line 114 Error : (Serious) C2857E: #include file "..\..\source\ucos_ii.h" wouldn't open Includes.h line 42 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 63 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'color' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'color' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 63 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 63 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 64 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'bgnd_color' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'bgnd_color' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 64 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 64 Error : C2285E: expected ')' or ',' - inserted ')' before 'y' pc.h line 65 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 65 Error : (Fatal) C2285E: C3047U: Too many errors pc.h line 65 Error : (Serious) C2857E: #include file "..\..\ARM\os_cpu.h" wouldn't open Includes.h line 40 Error : C2285E: expected ';' or ',' - inserted ';' before 'OS_FLAGS' os_cfg.h line 114 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'OS_FLAGS' os_cfg.h line 114 Error : (Serious) C2857E: #include file "..\..\source\ucos_ii.h" wouldn't open Includes.h line 42 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 63 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'y' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'c' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before 'color' pc.h line 63 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'color' pc.h line 63 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 63 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 63 Error : C2285E: expected ')' or ',' - inserted ')' before 'x' pc.h line 64 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'x' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'INT8U' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before 'bgnd_color' pc.h line 64 Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'bgnd_color' pc.h line 64 Error : C2285E: expected ';' or ',' - inserted ';' before ')' pc.h line 64 Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')' pc.h line 64 Error : C2285E: expected ')' or ',' - inserted ')' before 'y' pc.h line 65 Error : C2470E: function prototype formal 'INT8U' needs type or class - 'int' assumed pc.h line 65 Error : (Fatal) C2285E: C3047U: Too many errors pc.h line 65
答 1: 例子中没有uCOS的源码,首先要添加源码(2.52版本)这个例子是uCOS作者的经典移植示例。 答 2: 请问具体应该怎么做(或者要读什么)才能让例子跑起来?请问具体应该怎么做(或者要读什么)才能让例子跑起来?
多谢
Camel2005
共3条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
vscode+cmake搭建雅特力AT32L021开发环境被打赏30分 | |
【换取逻辑分析仪】自制底板并驱动ArduinoNanoRP2040ConnectLCD扩展板被打赏47分 | |
【分享评测,赢取加热台】RISC-V GCC 内嵌汇编使用被打赏38分 | |
【换取逻辑分析仪】-基于ADI单片机MAX78000的简易MP3音乐播放器被打赏48分 | |
我想要一部加热台+树莓派PICO驱动AHT10被打赏38分 | |
【换取逻辑分析仪】-硬件SPI驱动OLED屏幕被打赏36分 | |
换逻辑分析仪+上下拉与多路选择器被打赏29分 | |
Let'sdo第3期任务合集被打赏50分 | |
换逻辑分析仪+Verilog三态门被打赏27分 | |
换逻辑分析仪+Verilog多输出门被打赏24分 |