共2条
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
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
电流检测模块MAX4080S被打赏10分 | |
【我踩过的那些坑】calloc和malloc错误使用导致跑飞问题排查被打赏50分 | |
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】杜绑线问题被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 | |
【我踩过的那些坑】电感选型错误导致的处理器连接不上被打赏50分 | |
【我踩过的那些坑】工作那些年踩过的记忆深刻的坑被打赏10分 |