|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
请大家帮帮忙!!!
下面是移编译LWIP时出错!!!
LWIP/api_lib.c代码:
netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u16_t proto,
void (*callback)(struct netconn *, enum netconn_evt, u16_t len))
{
struct netconn *conn;
struct api_msg *msg;
conn = memp_malloc(MEMP_NETCONN);
if (conn == NULL) {
return NULL;
}
conn->err = ERR_OK;
conn->type = t;
conn->pcb.tcp = NULL;
if ((conn->mbox = sys_mbox_new()) == SYS_MBOX_NULL) //提示:SYS_MBOX_NULL有问题?
{
memp_free(MEMP_NETCONN, conn);
return NULL;
}
conn->recvmbox = SYS_MBOX_NULL;
conn->acceptmbox = SYS_MBOX_NULL;
conn->sem = SYS_SEM_NULL; 提示:SYS_SEM_NULL有问题?
conn->state = NETCONN_NONE;
conn->socket = 0;
conn->callback = callback;
conn->recv_avail = 0;
if((msg = memp_malloc(MEMP_API_MSG)) == NULL) {
memp_free(MEMP_NETCONN, conn);
return NULL;
}
msg->type = API_MSG_NEWCONN;
msg->msg.msg.bc.port = proto; /* misusing the port field */
msg->msg.conn = conn;
api_msg_post(msg);
sys_mbox_fetch(conn->mbox, NULL);
memp_free(MEMP_API_MSG, msg);
if ( conn->err != ERR_OK ) {
memp_free(MEMP_NETCONN, conn);
return NULL;
}
return conn;
}
编译器是用的ADS1.2。
这是编译出错的提示:
Error : C2456E: undeclared name, inventing 'extern int SYS_MBOX_NULL'
api_lib.c line 213
Error : C2456E: undeclared name, inventing 'extern int SYS_SEM_NULL'
api_lib.c line 219
Error : C2456E: undeclared name, inventing 'extern int SYS_ARCH_TIMEOUT'
api_lib.c line 282
Error : C2456E: undeclared name, inventing 'extern int SYS_MBOX_NULL'
api_msg.c line 51
Error : C2456E: undeclared name, inventing 'extern int SYS_SEM_NULL'
api_msg.c line 146
Error : C2456E: undeclared name, inventing 'extern int ENOMEM'
sockets.c line 78
Error : C2456E: undeclared name, inventing 'extern int ENOBUFS'
sockets.c line 79
Error : C2456E: undeclared name, inventing 'extern int ECONNABORTED'
sockets.c line 80
Error : C2456E: undeclared name, inventing 'extern int ECONNRESET'
sockets.c line 81
Error : C2456E: undeclared name, inventing 'extern int ESHUTDOWN'
sockets.c line 82
Error : C2456E: undeclared name, inventing 'extern int ENOTCONN'
sockets.c line 83
Error : C2456E: undeclared name, inventing 'extern int EINVAL'
sockets.c line 84
Error : C2456E: undeclared name, inventing 'extern int EIO'
sockets.c line 85
Error : C2456E: undeclared name, inventing 'extern int EHOSTUNREACH'
sockets.c line 86
Error : C2456E: undeclared name, inventing 'extern int EADDRINUSE'
sockets.c line 87
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 78
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 79
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 80
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 81
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 82
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 83
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 84
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 85
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 86
Error : (Serious) C2432E: non-constant initialiser
sockets.c line 87
Error : C2456E: undeclared name, inventing 'extern int EWOULDBLOCK'
sockets.c line 372
Error : C2456E: undeclared name, inventing 'extern int EFAULT'
sockets.c line 980
Error : C2456E: undeclared name, inventing 'extern int ENOPROTOOPT'
sockets.c line 1015
Error : C2456E: undeclared name, inventing 'extern int ENOSYS'
sockets.c line 1358
|
|