Problems with Xilinx SDK and LwIP

D

DaMunky89

Guest
Alright, so I'm trying to compile the example projects from xapp1026,
following the instructions included in xapp1026.pdf:
www.xilinx.com/support/documentation/application.../xapp1026.pdf

I'm using the Xilinx SDK, and successfully managed to import the
Hardware Platform Specifications and four xapp1026 example projects.
My current setup is as follows:

OS: Windows 7 x64
SDK Release Version: 12.3 Build SDK_MS3.70d

When I try to "build all", I get the following error:

**** Build of configuration Debug for project sock_apps ****

make all
Building file: ../dispatch.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -mxl-soft-mul -MMD -MP -
MF"dispatch.d" -MT"dispatch.d" -o"dispatch.o" "../dispatch.c"
.../dispatch.c:19:23: error: lwip/inet.h: No such file or directory
.../dispatch.c:20:26: error: lwip/ip_addr.h: No such file or directory
.../dispatch.c: In function ‘print_headers’:
.../dispatch.c:27: warning: implicit declaration of function
‘xil_printf’
.../dispatch.c:32: warning: implicit declaration of function
‘print_echo_app_header’
.../dispatch.c:35: warning: implicit declaration of function
‘print_rxperf_app_header’
.../dispatch.c:38: warning: implicit declaration of function
‘print_txperf_app_header’
.../dispatch.c:41: warning: implicit declaration of function
‘print_tftp_app_header’
.../dispatch.c:44: warning: implicit declaration of function
‘print_web_app_header’
.../dispatch.c: In function ‘launch_app_threads’:
.../dispatch.c:60: warning: implicit declaration of function
‘sys_thread_new’
.../dispatch.c:62: error: ‘DEFAULT_THREAD_PRIO’ undeclared (first use
in this function)
.../dispatch.c:62: error: (Each undeclared identifier is reported only
once
.../dispatch.c:62: error: for each function it appears in.)
make: *** [dispatch.o] Error 1

It looks like it's complaining that I haven't added lwip to the
include path. The xapp1026 instructions don't mention anything about
this, so I thought some kind of Xilinx distribution of lwip was
already included, but I guess not. Therefore, my question overall is,
how do I go about adding lwip to my Xilinx SDK in such a way that I
can get these projects to build? If that isn't the solution to these
errors, what is?
 
On 03/03/2011 01:01, DaMunky89 wrote:
Alright, so I'm trying to compile the example projects from xapp1026,
following the instructions included in xapp1026.pdf:
www.xilinx.com/support/documentation/application.../xapp1026.pdf

I'm using the Xilinx SDK, and successfully managed to import the
Hardware Platform Specifications and four xapp1026 example projects.
My current setup is as follows:

OS: Windows 7 x64
SDK Release Version: 12.3 Build SDK_MS3.70d

When I try to "build all", I get the following error:

**** Build of configuration Debug for project sock_apps ****

make all
Building file: ../dispatch.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -mxl-soft-mul -MMD -MP -
MF"dispatch.d" -MT"dispatch.d" -o"dispatch.o" "../dispatch.c"
../dispatch.c:19:23: error: lwip/inet.h: No such file or directory
../dispatch.c:20:26: error: lwip/ip_addr.h: No such file or directory
../dispatch.c: In function ‘print_headers’:
../dispatch.c:27: warning: implicit declaration of function
‘xil_printf’
../dispatch.c:32: warning: implicit declaration of function
‘print_echo_app_header’
../dispatch.c:35: warning: implicit declaration of function
‘print_rxperf_app_header’
../dispatch.c:38: warning: implicit declaration of function
‘print_txperf_app_header’
../dispatch.c:41: warning: implicit declaration of function
‘print_tftp_app_header’
../dispatch.c:44: warning: implicit declaration of function
‘print_web_app_header’
../dispatch.c: In function ‘launch_app_threads’:
../dispatch.c:60: warning: implicit declaration of function
‘sys_thread_new’
../dispatch.c:62: error: ‘DEFAULT_THREAD_PRIO’ undeclared (first use
in this function)
../dispatch.c:62: error: (Each undeclared identifier is reported only
once
../dispatch.c:62: error: for each function it appears in.)
make: *** [dispatch.o] Error 1

It looks like it's complaining that I haven't added lwip to the
include path. The xapp1026 instructions don't mention anything about
this, so I thought some kind of Xilinx distribution of lwip was
already included, but I guess not. Therefore, my question overall is,
how do I go about adding lwip to my Xilinx SDK in such a way that I
can get these projects to build? If that isn't the solution to these
errors, what is?
It sounds like you didn't include lwip library in your BSP. It is not
included by default.

You can add it by expanding your BSP in Project Explorer and double
click *.mss file. After that click Modify this BSP's Settings and then
include lwip130. You should also modify lwip's settings to suite your needs.

~Aleš
 
On Mar 3, 2:38 am, Aleš Svetek <ales.sve...@gmDELail.com> wrote:
On 03/03/2011 01:01, DaMunky89 wrote:



Alright, so I'm trying to compile the example projects from xapp1026,
following the instructions included in xapp1026.pdf:
www.xilinx.com/support/documentation/application.../xapp1026.pdf

I'm using the Xilinx SDK, and successfully managed to import the
Hardware Platform Specifications and four xapp1026 example projects.
My current setup is as follows:

OS: Windows 7 x64
SDK Release Version: 12.3 Build SDK_MS3.70d

When I try to "build all", I get the following error:

**** Build of configuration Debug for project sock_apps ****

make all
Building file: ../dispatch.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -mxl-soft-mul -MMD -MP -
MF"dispatch.d" -MT"dispatch.d" -o"dispatch.o" "../dispatch.c"
../dispatch.c:19:23: error: lwip/inet.h: No such file or directory
../dispatch.c:20:26: error: lwip/ip_addr.h: No such file or directory
../dispatch.c: In function print_headers :
../dispatch.c:27: warning: implicit declaration of function
xil_printf
../dispatch.c:32: warning: implicit declaration of function
print_echo_app_header
../dispatch.c:35: warning: implicit declaration of function
print_rxperf_app_header
../dispatch.c:38: warning: implicit declaration of function
print_txperf_app_header
../dispatch.c:41: warning: implicit declaration of function
print_tftp_app_header
../dispatch.c:44: warning: implicit declaration of function
print_web_app_header
../dispatch.c: In function launch_app_threads :
../dispatch.c:60: warning: implicit declaration of function
sys_thread_new
../dispatch.c:62: error: DEFAULT_THREAD_PRIO undeclared (first use
in this function)
../dispatch.c:62: error: (Each undeclared identifier is reported only
once
../dispatch.c:62: error: for each function it appears in.)
make: *** [dispatch.o] Error 1

It looks like it's complaining that I haven't added lwip to the
include path. The xapp1026 instructions don't mention anything about
this, so I thought some kind of Xilinx distribution of lwip was
already included, but I guess not. Therefore, my question overall is,
how do I go about adding lwip to my Xilinx SDK in such a way that I
can get these projects to build? If that isn't the solution to these
errors, what is?

It sounds like you didn't include lwip library in your BSP. It is not
included by default.

You can add it by expanding your BSP in Project Explorer and double
click *.mss file. After that click Modify this BSP's Settings and then
include lwip130. You should also modify lwip's settings to suite your needs.

~Ale
Isn't the BSP configured as part of the hardware specification in the
EDK? Xilinx provides a pre-written hardware specification exclusively
for use with the xapp1026 exercises. I don't see why they would have
neglected to include the completely necessary lwip packages in that..
is there perhaps somewhere else I have to add these, as well?
 
On Mar 8, 5:58 pm, DaMunky89 <shwankymu...@gmail.com> wrote:
On Mar 3, 2:38 am, Aleš Svetek <ales.sve...@gmDELail.com> wrote:









On 03/03/2011 01:01, DaMunky89 wrote:

Alright, so I'm trying to compile the example projects from xapp1026,
following the instructions included in xapp1026.pdf:
www.xilinx.com/support/documentation/application.../xapp1026.pdf

I'm using the Xilinx SDK, and successfully managed to import the
Hardware Platform Specifications and four xapp1026 example projects.
My current setup is as follows:

OS: Windows 7 x64
SDK Release Version: 12.3 Build SDK_MS3.70d

When I try to "build all", I get the following error:

**** Build of configuration Debug for project sock_apps ****

make all
Building file: ../dispatch.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -mxl-soft-mul -MMD -MP -
MF"dispatch.d" -MT"dispatch.d" -o"dispatch.o" "../dispatch.c"
../dispatch.c:19:23: error: lwip/inet.h: No such file or directory
../dispatch.c:20:26: error: lwip/ip_addr.h: No such file or directory
../dispatch.c: In function print_headers :
../dispatch.c:27: warning: implicit declaration of function
xil_printf
../dispatch.c:32: warning: implicit declaration of function
print_echo_app_header
../dispatch.c:35: warning: implicit declaration of function
print_rxperf_app_header
../dispatch.c:38: warning: implicit declaration of function
print_txperf_app_header
../dispatch.c:41: warning: implicit declaration of function
print_tftp_app_header
../dispatch.c:44: warning: implicit declaration of function
print_web_app_header
../dispatch.c: In function launch_app_threads :
../dispatch.c:60: warning: implicit declaration of function
sys_thread_new
../dispatch.c:62: error: DEFAULT_THREAD_PRIO undeclared (first use
in this function)
../dispatch.c:62: error: (Each undeclared identifier is reported only
once
../dispatch.c:62: error: for each function it appears in.)
make: *** [dispatch.o] Error 1

It looks like it's complaining that I haven't added lwip to the
include path. The xapp1026 instructions don't mention anything about
this, so I thought some kind of Xilinx distribution of lwip was
already included, but I guess not. Therefore, my question overall is,
how do I go about adding lwip to my Xilinx SDK in such a way that I
can get these projects to build? If that isn't the solution to these
errors, what is?

It sounds like you didn't include lwip library in your BSP. It is not
included by default.

You can add it by expanding your BSP in Project Explorer and double
click *.mss file. After that click Modify this BSP's Settings and then
include lwip130. You should also modify lwip's settings to suite your needs.

~Ale

Isn't the BSP configured as part of the hardware specification in the
EDK? Xilinx provides a pre-written hardware specification exclusively
for use with the xapp1026 exercises. I don't see why they would have
neglected to include the completely necessary lwip packages in that..
is there perhaps somewhere else I have to add these, as well?
I agree that the flow is kind of confusing, since "BSP" means
different things to HW & SW. Xilinx has been trying to decouple the
HW dev from the SW dev in more recent versions of EDK, reflected by
XPS and SDK. The BSP in the HW case refers what is physically
available on the target platform.

The BSP you configure in the SDK is the software setup for the
platform -- OS / stand-alone, file system, other libraries (including
lwIP), etc. All you need to do to get your application access to the
lwIP library is to click the appropriate check box in the SW BSP in
the SDK (as long as your hardware is configured correctly i.e. a
timer for the TCP callbacks has been included).

M
 
On 10/03/2011 03:45, MBodnar wrote:
On Mar 8, 5:58 pm, DaMunky89<shwankymu...@gmail.com> wrote:
On Mar 3, 2:38 am, Aleš Svetek<ales.sve...@gmDELail.com> wrote:









On 03/03/2011 01:01, DaMunky89 wrote:

Alright, so I'm trying to compile the example projects from xapp1026,
following the instructions included in xapp1026.pdf:
www.xilinx.com/support/documentation/application.../xapp1026.pdf

I'm using the Xilinx SDK, and successfully managed to import the
Hardware Platform Specifications and four xapp1026 example projects.
My current setup is as follows:

OS: Windows 7 x64
SDK Release Version: 12.3 Build SDK_MS3.70d

When I try to "build all", I get the following error:

**** Build of configuration Debug for project sock_apps ****

make all
Building file: ../dispatch.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -mxl-soft-mul -MMD -MP -
MF"dispatch.d" -MT"dispatch.d" -o"dispatch.o" "../dispatch.c"
../dispatch.c:19:23: error: lwip/inet.h: No such file or directory
../dispatch.c:20:26: error: lwip/ip_addr.h: No such file or directory
../dispatch.c: In function print_headers :
../dispatch.c:27: warning: implicit declaration of function
xil_printf
../dispatch.c:32: warning: implicit declaration of function
print_echo_app_header
../dispatch.c:35: warning: implicit declaration of function
print_rxperf_app_header
../dispatch.c:38: warning: implicit declaration of function
print_txperf_app_header
../dispatch.c:41: warning: implicit declaration of function
print_tftp_app_header
../dispatch.c:44: warning: implicit declaration of function
print_web_app_header
../dispatch.c: In function launch_app_threads :
../dispatch.c:60: warning: implicit declaration of function
sys_thread_new
../dispatch.c:62: error: DEFAULT_THREAD_PRIO undeclared (first use
in this function)
../dispatch.c:62: error: (Each undeclared identifier is reported only
once
../dispatch.c:62: error: for each function it appears in.)
make: *** [dispatch.o] Error 1

It looks like it's complaining that I haven't added lwip to the
include path. The xapp1026 instructions don't mention anything about
this, so I thought some kind of Xilinx distribution of lwip was
already included, but I guess not. Therefore, my question overall is,
how do I go about adding lwip to my Xilinx SDK in such a way that I
can get these projects to build? If that isn't the solution to these
errors, what is?

It sounds like you didn't include lwip library in your BSP. It is not
included by default.

You can add it by expanding your BSP in Project Explorer and double
click *.mss file. After that click Modify this BSP's Settings and then
include lwip130. You should also modify lwip's settings to suite your needs.

~Ale

Isn't the BSP configured as part of the hardware specification in the
EDK? Xilinx provides a pre-written hardware specification exclusively
for use with the xapp1026 exercises. I don't see why they would have
neglected to include the completely necessary lwip packages in that..
is there perhaps somewhere else I have to add these, as well?

I agree that the flow is kind of confusing, since "BSP" means
different things to HW& SW. Xilinx has been trying to decouple the
HW dev from the SW dev in more recent versions of EDK, reflected by
XPS and SDK. The BSP in the HW case refers what is physically
available on the target platform.

The BSP you configure in the SDK is the software setup for the
platform -- OS / stand-alone, file system, other libraries (including
lwIP), etc. All you need to do to get your application access to the
lwIP library is to click the appropriate check box in the SW BSP in
the SDK (as long as your hardware is configured correctly i.e. a
timer for the TCP callbacks has been included).

M
Michael is completely correct regarding the BSP above.

However, the compilation problem that you have been seeing is related to
the imported application projects, which are not configured correctly if
you just import the projects into SDK. Somehow the inferred options are
not picked up by the import.

What you should do to get the compilation working is to manually specify
include folder in compiler settings and also specify libraries and their
search path in linker settings.

More specifically, right click on the project, select "C/C++ build
settings", then on the left side select "C/C++ build" -> "Settings".
Under compiler settings select "Directories" and add the include path
from the BSP (or platform, as is it called in this XAPP).

Then go to linker settings below and select "Libraries". At Libraries
(-l) field add "lwip4" and "xilkernel" and at Library search path point
to lib folder from the BSP (or platform, as is it called in this XAPP).

I always configure my project manually so I didn't stumble upon this
problem before, but I just tried the import approach and managed to
compile the project with the additional steps as described above.

HTH,
~ Ales
 
On Mar 10, 2:16 am, Aleš Svetek <ales.sve...@gmDELail.com> wrote:
On 10/03/2011 03:45, MBodnar wrote:



On Mar 8, 5:58 pm, DaMunky89<shwankymu...@gmail.com>  wrote:
On Mar 3, 2:38 am, Ale Svetek<ales.sve...@gmDELail.com>  wrote:

On 03/03/2011 01:01, DaMunky89 wrote:

Alright, so I'm trying to compile the example projects from xapp1026,
following the instructions included in xapp1026.pdf:
www.xilinx.com/support/documentation/application.../xapp1026.pdf

I'm using the Xilinx SDK, and successfully managed to import the
Hardware Platform Specifications and four xapp1026 example projects.
My current setup is as follows:

OS: Windows 7 x64
SDK Release Version: 12.3 Build SDK_MS3.70d

When I try to "build all", I get the following error:

**** Build of configuration Debug for project sock_apps ****

make all
Building file: ../dispatch.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -mxl-soft-mul -MMD -MP -
MF"dispatch.d" -MT"dispatch.d" -o"dispatch.o" "../dispatch.c"
../dispatch.c:19:23: error: lwip/inet.h: No such file or directory
../dispatch.c:20:26: error: lwip/ip_addr.h: No such file or directory
../dispatch.c: In function print_headers :
../dispatch.c:27: warning: implicit declaration of function
xil_printf
../dispatch.c:32: warning: implicit declaration of function
print_echo_app_header
../dispatch.c:35: warning: implicit declaration of function
print_rxperf_app_header
../dispatch.c:38: warning: implicit declaration of function
print_txperf_app_header
../dispatch.c:41: warning: implicit declaration of function
print_tftp_app_header
../dispatch.c:44: warning: implicit declaration of function
print_web_app_header
../dispatch.c: In function launch_app_threads :
../dispatch.c:60: warning: implicit declaration of function
sys_thread_new
../dispatch.c:62: error: DEFAULT_THREAD_PRIO undeclared (first use
in this function)
../dispatch.c:62: error: (Each undeclared identifier is reported only
once
../dispatch.c:62: error: for each function it appears in.)
make: *** [dispatch.o] Error 1

It looks like it's complaining that I haven't added lwip to the
include path. The xapp1026 instructions don't mention anything about
this, so I thought some kind of Xilinx distribution of lwip was
already included, but I guess not. Therefore, my question overall is,
how do I go about adding lwip to my Xilinx SDK in such a way that I
can get these projects to build? If that isn't the solution to these
errors, what is?

It sounds like you didn't include lwip library in your BSP. It is not
included by default.

You can add it by expanding your BSP in Project Explorer and double
click *.mss file. After that click Modify this BSP's Settings and then
include lwip130. You should also modify lwip's settings to suite your needs.

~Ale

Isn't the BSP configured as part of the hardware specification in the
EDK? Xilinx provides a pre-written hardware specification exclusively
for use with the xapp1026 exercises. I don't see why they would have
neglected to include the completely necessary lwip packages in that..
is there perhaps somewhere else I have to add these, as well?

I agree that the flow is kind of confusing, since "BSP" means
different things to HW&  SW.  Xilinx has been trying to decouple the
HW dev from the SW dev in more recent versions of EDK, reflected by
XPS and SDK.  The BSP in the HW case refers what is physically
available on the target platform.

The BSP you configure in the SDK is the software setup for the
platform -- OS / stand-alone, file system, other libraries (including
lwIP), etc.  All you need to do to get your application access to the
lwIP library is to click the appropriate check box in the SW BSP in
the SDK (as long as your hardware is configured correctly i.e.  a
timer for the TCP callbacks has been included).

M

Michael is completely correct regarding the BSP above.

However, the compilation problem that you have been seeing is related to
the imported application projects, which are not configured correctly if
you just import the projects into SDK. Somehow the inferred options are
not picked up by the import.

What you should do to get the compilation working is to manually specify
include folder in compiler settings and also specify libraries and their
search path in linker settings.

More specifically, right click on the project, select "C/C++ build
settings", then on the left side select "C/C++ build" -> "Settings".
Under compiler settings select "Directories" and add the include path
from the BSP (or platform, as is it called in this XAPP).

Then go to linker settings below and select "Libraries". At Libraries
(-l) field add "lwip4" and "xilkernel" and at Library search path point
to lib folder from the BSP (or platform, as is it called in this XAPP).

I always configure my project manually so I didn't stumble upon this
problem before, but I just tried the import approach and managed to
compile the project with the additional steps as described above.

HTH,
~ Ales
Thanks man, that sounds like it should work. I'll give it a try
tomorrow when I'm doing more of this.
 
This is an old thread, but I had the same errors. Turns out I didn't have the hardware configured correctly. When I finally did a clean build on my project, the BSP didn't compile and threw an error telling me that I didn't have the interrupt enabled on the ethernet controller.

tl;dr
Try doing a clean build and checking errors.
 
I had the same error of not having the correctly included files. Turns out I had an error while compiling the BSP. I didn't have the interrupt checkbox enabled on the ethernet controller, causing the error. Do a clean build and it will be easier to spot any errors.
 

Welcome to EDABoard.com

Sponsor

Back
Top