Problems with Xilinx SDK and LwIP

  • Follow


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=3D0 -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 =91print_headers=92:
.../dispatch.c:27: warning: implicit declaration of function
=91xil_printf=92
.../dispatch.c:32: warning: implicit declaration of function
=91print_echo_app_header=92
.../dispatch.c:35: warning: implicit declaration of function
=91print_rxperf_app_header=92
.../dispatch.c:38: warning: implicit declaration of function
=91print_txperf_app_header=92
.../dispatch.c:41: warning: implicit declaration of function
=91print_tftp_app_header=92
.../dispatch.c:44: warning: implicit declaration of function
=91print_web_app_header=92
.../dispatch.c: In function =91launch_app_threads=92:
.../dispatch.c:60: warning: implicit declaration of function
=91sys_thread_new=92
.../dispatch.c:62: error: =91DEFAULT_THREAD_PRIO=92 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?
0
Reply DaMunky89 3/3/2011 12:01:12 AM

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�

0
Reply ales.svetek (2) 3/3/2011 7:38:43 AM


On Mar 3, 2:38=A0am, Ale=9A 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=3D0 -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 nee=
ds.
>
> ~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?
0
Reply shwankymunky (1) 3/8/2011 10:58:34 PM

On Mar 8, 5:58=A0pm, DaMunky89 <shwankymu...@gmail.com> wrote:
> On Mar 3, 2:38=A0am, Ale=9A 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=3D0 -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 n=
eeds.
>
> > ~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
0
Reply michaelrbodnar (11) 3/10/2011 2:45:54 AM

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
0
Reply ales.svetek (2) 3/10/2011 7:16:11 AM

On Mar 10, 2:16=A0am, Ale=9A Svetek <ales.sve...@gmDELail.com> wrote:
> On 10/03/2011 03:45, MBodnar wrote:
>
>
>
> > On Mar 8, 5:58 pm, DaMunky89<shwankymu...@gmail.com> =A0wrote:
> >> On Mar 3, 2:38 am, Ale Svetek<ales.sve...@gmDELail.com> =A0wrote:
>
> >>> 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=3D0 -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 director=
y
> >>>> ../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 onl=
y
> >>>> 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 the=
n
> >>> 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& =A0SW. =A0Xilinx has been trying to decouple th=
e
> > HW dev from the SW dev in more recent versions of EDK, reflected by
> > XPS and SDK. =A0The 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. =A0All 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. =A0a
> > 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.
0
Reply DaMunky89 3/18/2011 1:36:25 AM

5 Replies
1250 Views

(page loaded in 1.396 seconds)

Similiar Articles:








7/24/2012 10:07:00 AM


Reply: