I am running into a build problem using the IAR IDE. The problem seems to be with the inability to differentiate between:
C:\ChibiOS_2.6.4\ext\lwip\src\include\ipv4\lwip\icmp.h
C:\ChibiOS_2.6.4\ext\lwip\src\include\ipv6\lwip\icmp.h
The ipv4.c and and ipv6.c both include:
#include "lwip/icmp.h"
... I think the preprocessor is grabbing C:\ChibiOS_2.6.4\ext\lwip\src\include\ipv4\lwip\icmp.h for both cases.
I am ending up with errors such as:
Error[Pe020]: identifier "ICMP6_ECHO" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\core\ipv6\icmp6.c 61
Error[Pe393]: pointer to incomplete class type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\core\ipv6\inet6.c 90
Error[Pe055]: too many arguments in invocation of macro "ip_init" C:\ChibiOS_2.6.4\ext\lwip\src\core\ipv6\ip6.c 63
How can I get around this problem?
lwip IAR Build
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: lwip IAR Build
Not sure, may be only one of those directories must be specified in the search path.
Giovanni
Giovanni
Re: lwip IAR Build
Okay, I took the ipv6 stuff out of the project and now am stuck with the following errors, for example:
Error[Li005]: no definition for "sys_mbox_valid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_mbox_post" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_arch_sem_wait" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_sem_signal" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_trypost" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_arch_mbox_fetch" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_lib.o]
Error[Li005]: no definition for "sys_sem_free" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_sem_set_invalid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_sem_valid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_arch_mbox_tryfetch" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_free" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_set_invalid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_new" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_sem_new" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_thread_new" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_init" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\init.o]
These are condtionally defined in sys.h when NO_SYS is true in lwipopts.h - NO_SYS is zero as downloaded. If I change NO_SYS to a one, I get a boat load of other errors in api_lib.c, api_msg.c, lwipthread.c, sockets.c. But maybe that is progress.
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 71
Error[Pe513]: a value of type "int" cannot be assigned to an entity of type "struct netconn *" C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 73
Error[Pe020]: identifier "do_newconn" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 75
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 81
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 83
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 105
Error[Pe020]: identifier "do_delconn" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 112
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 137
Error[Pe020]: identifier "do_getaddr" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 144
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 168
Error[Pe020]: identifier "do_bind" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 173
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 194
Error[Pe020]: identifier "do_connect" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 199
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 219
Error[Pe020]: identifier "do_disconnect" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 224
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 244
Error[Pe020]: identifier "do_listen" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 252
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 289
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 348
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 354
Error[Pe020]: identifier "do_recv" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 383
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 464
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 522
Error[Pe020]: identifier "do_recv" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 526
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 569
Error[Pe020]: identifier "do_send" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 575
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 601
Error[Pe020]: identifier "do_write" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 618
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 665
Error[Pe020]: identifier "do_close" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 670
Error[Pe020]: identifier "NETCONN_SHUT_RDWR" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 692
Error[Pe020]: identifier "NETCONN_SHUT_RD" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 704
Error[Pe020]: identifier "NETCONN_SHUT_WR" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 704
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 88
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 119
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 165
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 195
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 230
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 251
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 376
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 381
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 439
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 456
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 660
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 663
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 692
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 693
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 716
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 717
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 1083
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 1089
Error[Pe020]: identifier "tcpip_input" is undefined C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 249
Error[Pe020]: identifier "tcpip_callback_fn" is undefined C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 270
Error[Pe018]: expected a ")" C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 270
Error[Pe020]: identifier "tcpip_callback_fn" is undefined C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 273
Error[Pe018]: expected a ")" C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 273
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\sockets.c 1181
Error[Pe020]: identifier "SYS_ARCH_TIMEOUT" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\sockets.c 1213
Error[Li005]: no definition for "sys_mbox_valid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_mbox_post" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_arch_sem_wait" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_sem_signal" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_trypost" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_arch_mbox_fetch" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_lib.o]
Error[Li005]: no definition for "sys_sem_free" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_sem_set_invalid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_sem_valid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_arch_mbox_tryfetch" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_free" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_set_invalid" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_mbox_new" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_sem_new" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\api_msg.o]
Error[Li005]: no definition for "sys_thread_new" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\tcpip.o]
Error[Li005]: no definition for "sys_init" [referenced from C:\ChibiOS_2.6.4\projects\ethernet_lwip_iar\iar\Debug\Obj\init.o]
These are condtionally defined in sys.h when NO_SYS is true in lwipopts.h - NO_SYS is zero as downloaded. If I change NO_SYS to a one, I get a boat load of other errors in api_lib.c, api_msg.c, lwipthread.c, sockets.c. But maybe that is progress.
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 71
Error[Pe513]: a value of type "int" cannot be assigned to an entity of type "struct netconn *" C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 73
Error[Pe020]: identifier "do_newconn" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 75
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 81
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 83
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 105
Error[Pe020]: identifier "do_delconn" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 112
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 137
Error[Pe020]: identifier "do_getaddr" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 144
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 168
Error[Pe020]: identifier "do_bind" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 173
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 194
Error[Pe020]: identifier "do_connect" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 199
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 219
Error[Pe020]: identifier "do_disconnect" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 224
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 244
Error[Pe020]: identifier "do_listen" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 252
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 289
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 348
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 354
Error[Pe020]: identifier "do_recv" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 383
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 464
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 522
Error[Pe020]: identifier "do_recv" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 526
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 569
Error[Pe020]: identifier "do_send" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 575
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 601
Error[Pe020]: identifier "do_write" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 618
Error[Pe070]: incomplete type is not allowed C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 665
Error[Pe020]: identifier "do_close" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 670
Error[Pe020]: identifier "NETCONN_SHUT_RDWR" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 692
Error[Pe020]: identifier "NETCONN_SHUT_RD" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 704
Error[Pe020]: identifier "NETCONN_SHUT_WR" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\api_lib.c 704
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 88
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 119
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 165
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 195
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 230
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 251
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 376
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 381
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 439
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 456
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 660
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 663
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 692
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 693
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 716
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 717
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 1083
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\api_msg.c 1089
Error[Pe020]: identifier "tcpip_input" is undefined C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 249
Error[Pe020]: identifier "tcpip_callback_fn" is undefined C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 270
Error[Pe018]: expected a ")" C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 270
Error[Pe020]: identifier "tcpip_callback_fn" is undefined C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 273
Error[Pe018]: expected a ")" C:\ChibiOS_2.6.4\os\various\lwip_bindings\lwipthread.c 273
Error[Pe029]: expected an expression C:\ChibiOS_2.6.4\ext\lwip\src\api\sockets.c 1181
Error[Pe020]: identifier "SYS_ARCH_TIMEOUT" is undefined C:\ChibiOS_2.6.4\ext\lwip\src\api\sockets.c 1213
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: lwip IAR Build
You have to include the system module.
I suggest you give a look under ./os/various/lwip_bindings especially the .mk file.
Giovanni
I suggest you give a look under ./os/various/lwip_bindings especially the .mk file.
Giovanni