在线时间28 小时
UID3427315
注册时间2017-9-28
NXP金币0
该用户从未签到
注册会员

- 积分
- 108
- 最后登录
- 2019-3-4
|
user_config.h 已经定义为1了:#define MQX_USE_LWLOGS 1
void task_lwlog(uint32_t initial_data)
{
uint32_t led[5]={0x11,0x22,0x33,0x44,0x55};
LWLOG_ENTRY_STRUCT entry;
_lwlog_create_component(); //创建日志组件
_lwlog_create(1,10,1);
_lwlog_write(1,led[0],led[1],led[2],led[3],led[4],0);
while(1)
{
_lwevent_wait_for(&lwevent_group, event_lwlog, FALSE, NULL);
_lwlog_read(1,LOG_READ_OLDEST,&entry);
printf("%x,%x,%x,%x,%x",entry.DATA[0],entry.DATA[1],entry.DATA[2],entry.DATA[3],entry.DATA[4]);
_lwevent_clear(&lwevent_group,event_di);
}
}
编译后:
E:\MQX软件学习\mqx4.1.1.0\mqx\examples\wdwkzq2\task_lwlog.c(7): error: #20: identifier "LWLOG_ENTRY_STRUCT" is undefined
LWLOG_ENTRY_STRUCT entry;
E:\MQX软件学习\mqx4.1.1.0\mqx\examples\wdwkzq2\task_lwlog.c(8): warning: #223-D: function "_lwlog_create_component" declared implicitly
_lwlog_create_component(); //创建日志组件
E:\MQX软件学习\mqx4.1.1.0\mqx\examples\wdwkzq2\task_lwlog.c(9): warning: #223-D: function "_lwlog_create" declared implicitly
_lwlog_create(boottime1,10,1);
E:\MQX软件学习\mqx4.1.1.0\mqx\examples\wdwkzq2\task_lwlog.c(10): warning: #223-D: function "_lwlog_write" declared implicitly
_lwlog_write(boottime1,led[0],led[1],led[2],led[3],led[4],0);
E:\MQX软件学习\mqx4.1.1.0\mqx\examples\wdwkzq2\task_lwlog.c(15): warning: #223-D: function "_lwlog_read" declared implicitly
_lwlog_read(boottime1,LOG_READ_OLDEST,&entry);
E:\MQX软件学习\mqx4.1.1.0\mqx\examples\wdwkzq2\task_lwlog.c(15): error: #20: identifier "LOG_READ_OLDEST" is undefined
_lwlog_read(boottime1,LOG_READ_OLDEST,&entry);
..\..\..\task_lwlog.c: 4 warnings, 2 errors
".\Int Flash Debug\hello.axf" - 2 Error(s), 5 Warning(s).
Target not created.
Build Time Elapsed: 00:00:24
感觉应该还有别的什么要配置?求教各位大佬。
最佳答案
包含头文件 lwlog.h, 因为LWLOG_ENTRY_STRUCT 是定义在lwlog.h中的
|
|