[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Re: [microblaze-uclinux] UDP packet reception triggers a hangup on the microblaze



Hi Bas,

that's new feature which we added some days ago for uart16550 support.
Just go to your hw design and use latest BSP - and generate libraries.
Everything should be fine.

And of course you can use U-Boot from my site too.

Both version works well. I use both of them.

Regards,
Michal

Bas van Tiel wrote:
> Hi Michal,
> 
> thanx, it's getting through the build process. The next stop is at
> u-boot somehow I don't have the define CONFIG_STDINOUT_BASEADDR. Can I
> follow
> your procedure (http://www.monstr.eu/wiki/doku.php?id=uboot:uboot) to
> make a good bootloader or should the one from the petalinux work fine?
> 
> greetings
> Bas
> 
> On Thu, Nov 27, 2008 at 2:13 PM, Michal Simek <Monstr@xxxxxxxxx> wrote:
>> Hi Bas,
>>
>> Disable uClibc, uclibc is in toolchain
>>
>> Regards,
>> Michal
>>
>>> ----------------------------------------
>>> The problem I'm getting by building the latest svn tree   (r4917,
>>> clean checkout) is a compilation error in one of the files in ucLibc
>>> The error reproduces by selecting the Xilinx and ML506, uClibc
>>> together with the default config files. (that why the cpu version is
>>> 6.00.b)
>>>
>>> Is there any easy way to solve this?
>>>
>>> greetings
>>> Bas
>>>
>>>  microblaze-uclinux-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs
>>> -fno-strict-aliasing  -Os -funit-at-a-time  -mno-xl-soft-mul
>>> -mno-xl-soft-div -mxl-barrel-shift -mcpu=v6.00.b -O2 -g
>>> -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall
>>> -mno-xl-soft-mul -mno-xl-soft-div -mxl-barrel-shift -mcpu=v6.00.b
>>> -DEMBED    -fno-builtin -nostdinc -D_LIBC -I../../include -I. -isystem
>>> /home/bas.van.tiel/petalinux-svn/tools/linux-i386/microblaze-uclinux-tools/bin/../lib/gcc/microblaze-uclinux/3.4.1/include
>>> -DNDEBUG -c ether_addr.c -o ether_addr.o
>>> In file included from ../../include/linux/posix_types.h:47,
>>>                  from ../../include/linux/types.h:14,
>>>                  from ../../include/linux/if_ether.h:24,
>>>                  from ../../include/netinet/if_ether.h:26,
>>>                  from ../../include/netinet/ether.h:26,
>>>                  from ether_addr.c:32:
>>> ../../include/asm/posix_types.h:18: error: redefinition of typedef
>>> '__kernel_ino_t'
>>> ../../include/bits/kernel_types.h:20: error: previous declaration of
>>> '__kernel_ino_t' was here
>>> ../../include/asm/posix_types.h:19: error: redefinition of typedef
>>> '__kernel_mode_t'
>>> ../../include/bits/kernel_types.h:22: error: previous declaration of
>>> '__kernel_mode_t' was here
>>> ../../include/asm/posix_types.h:20: error: redefinition of typedef
>>> '__kernel_nlink_t'
>>> ../../include/bits/kernel_types.h:23: error: previous declaration of
>>> '__kernel_nlink_t' was here
>>> ../../include/asm/posix_types.h:21: error: redefinition of typedef
>>> '__kernel_off_t'
>>> ../../include/bits/kernel_types.h:24: error: previous declaration of
>>> '__kernel_off_t' was here
>>>
>>>
>>>
>>> On Wed, Nov 26, 2008 at 5:01 PM, Michal Simek <monstr@xxxxxxxxx> wrote:
>>>> Hi Bas,
>>>>
>>>> I look at your app.
>>>> 1. you should use user-apps folder for microblaze apps and changed prepare
>>>> Makefile. I believe that is not so hard to change it. (petalinux-new-app)
>>>> 2. I am missing any readme how to run it. Please add it to that folder and
>>> pack
>>>> and resend.
>>>>
>>>> Thanks,
>>>> Michal
>>>>
>>>>
>>>>> OK,
>>>>>
>>>>> I will try tomorrow with the latest changes from svn.
>>>>>
>>>>> the test program is also attached....
>>>>>
>>>>> thx, for the quick responses..
>>>>>
>>>>> Bas
>>>>>
>>>>> On Wed, Nov 26, 2008 at 10:21 AM, Michal Simek <monstr@xxxxxxxxx> wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> this changes is in latest entry.S too.
>>>>>>
>>>>>> Thanks,
>>>>>> Michal
>>>>>>
>>>>>>
>>>>>>>  Hi,
>>>>>>> We used to have the same problem, although we don't use xemac. Without
>>>>>>> going into possibly misleading details, we noticed a one-line difference
>>>>>>> between our entry.S and the one in the Petalogix tree. After making the
>>>>>>> change we've been able to run a simple script that continuously sends
>>>>>>> packets to the board for several days without crashing. Running the same
>>>>>>> script before the change, the system would freeze in seconds. I hope
>>>>>>> this helps, here's an attachment just in case.
>>>>>>>
>>>>>>> Location -
>>>>>>> petalinux/software/linux-2.6.x-petalogix/arch/microblaze/kernel/entry.S
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Bas van Tiel <bvantiel@xxxxxxxxx>
>>>>>>> To: microblaze-uclinux@xxxxxxxxxxxxxx
>>>>>>> Sent: Tue, 25 Nov 2008 15:10
>>>>>>> Subject: [microblaze-uclinux] UDP packet reception triggers a hangup on
>>>>>>> the microblaze
>>>>>>>
>>>>>>> Hello All,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> when I transmit a continously stream of UDP packets to the microblaze
>>>>>>>
>>>>>>> a hangup is triggered,  I have the following configuration:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> - petalinux-v0.30-rc1 software
>>>>>>>
>>>>>>> - xemac linux driver in PIO mode
>>>>>>>
>>>>>>> - xemac IP block which is connected via a PLB <-> OPB bridge to the
>>>>>>>
>>>>>>> ublaze. (the xemac is configured with "No DMA" and IPIF
>>>>>>>
>>>>>>> (recieve/transmit buffers) are set to 32768 bytes and FIFO depth of
>>>>>>>
>>>>>>> 16.)
>>>>>>>
>>>>>>> - EDK 9.2.02. with the patch (AR30051) from Xilinx for the microblaze
>>> v7.00.b.
>>>>>>> - 2 uarts, one for kernel console, other one for  shell access.
>>>>>>>
>>>>>>> - ML506 Evalutation platform
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I tried to capture the packets via AF_PACKET and AF_INET, both methods
>>>>>>>
>>>>>>> gave the same result -> a kind of hangup of the microblaze:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> symptoms:
>>>>>>>
>>>>>>> 1) no serial input is taken from both terminals
>>>>>>>
>>>>>>> 2) a ping to the microblaze doesn't send a reply packet back.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Has anybody seen this behavior before with the xemac connected via the
>>>>>>>
>>>>>>> OPB (PLB<->OPB) to the PLB bus, or is this setup with a bridge in
>>>>>>>
>>>>>>> between
>>>>>>>
>>>>>>> asking for trouble and should I look for an alternative?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Best regards,
>>>>>>>
>>>>>>> Bas
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --- some additional info
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Linux tmb 2.6.20-uc0 #1 Tue Nov 25 14:27:21 CET 2008 microblaze
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> CPU-Family:     MicroBlaze
>>>>>>>
>>>>>>> FPGA-Arch:      virtex5
>>>>>>>
>>>>>>> CPU-Ver:        Unknown
>>>>>>>
>>>>>>> CPU-MHz:        125.00
>>>>>>>
>>>>>>> BogoMips:       62.05
>>>>>>>
>>>>>>> HW-Div:         yes
>>>>>>>
>>>>>>> HW-Shift:       yes
>>>>>>>
>>>>>>> Icache:        8kB
>>>>>>>
>>>>>>> Dcache:        8kB
>>>>>>>
>>>>>>> HW-Debug:       yes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>   PID PORT STAT SIZE SHARED %CPU COMMAND
>>>>>>>
>>>>>>> 1      S    135K     0K  0.0 /bin/init
>>>>>>>
>>>>>>> 2      R      0K     0K  0.0 ksoftirqd/0
>>>>>>>
>>>>>>> 3      S      0K     0K  0.0 events/0
>>>>>>>
>>>>>>> 4      S      0K     0K  0.0 khelper
>>>>>>>
>>>>>>> 5      S      0K     0K  0.0 kthread
>>>>>>>
>>>>>>> 6      S      0K     0K  0.0 kblockd/0
>>>>>>>
>>>>>>> 7      S      0K     0K  0.0 pdflush
>>>>>>>
>>>>>>> 8      S      0K     0K  0.0 pdflush
>>>>>>>
>>>>>>> 9      S      0K     0K  0.0 kswapd0
>>>>>>>
>>>>>>> 10      S      0K     0K  0.0 aio/0
>>>>>>>
>>>>>>> 11      S      0K     0K  0.0 mtdblockd
>>>>>>>
>>>>>>> 24      S      0K     0K  0.0 jffs2_gcd_mtd4
>>>>>>>
>>>>>>> 40   S0 S    656K     0K  0.0 /bin/sh
>>>>>>>
>>>>>>> 41   S0 S    643K     0K  0.0 /bin/sh --
>>>>>>>
>>>>>>> 42      S     67K     0K  0.0 /bin/inetd
>>>>>>>
>>>>>>> 55   S0 R     68K     0K  0.0 ps
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> pseudo code:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ethernet mac is running at 100 BaseTX-FD
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> sender:  (host PC)
>>>>>>>
>>>>>>>     sd_ = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
>>>>>>>
>>>>>>>     sendto(sd_, buf, BUFLEN, 0, (struct sockaddr*)&sa_,
>>> (socklen_t)sizeof(sa_));
>>>>>>>
>>>>>>>
>>>>>>> receiver (Microblaze)
>>>>>>>
>>>>>>>  sd_ = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
>>>>>>>
>>>>>>>  bind(sd_, (struct sockaddr*)&sa, sizeof(sa))
>>>>>>>
>>>>>>>   if (!select(sd_+1, &rfds, 0, 0, &timeout)) { break; }
>>>>>>>
>>>>>>>  size = recv(sd_, buf, BUFLEN, 0);
>>>>>>>
>>>>>>> ___________________________
>>>>>>>
>>>>>>> microblaze-uclinux mailing list
>>>>>>>
>>>>>>> microblaze-uclinux@xxxxxxxxxxxxxx
>>> <mailto:microblaze-uclinux@xxxxxxxxxxxxxx>
>>>>>>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>>> <http://www.itee.uq.edu.au/%7Ejwilliams/mblaze-uclinux>
>>>>>>> Mailing List Archive :
>>> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>> <http://www.itee.uq.edu.au/%7Elistarch/microblaze-uclinux/>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------
>>>>>>> *AOL Email goes Mobile!* You can now read your AOL Emails whilst on the
>>>>>>> move. Sign up <http://info.aol.co.uk/email1> for a free AOL Email
>>>>>>> account with unlimited storage today.
>>>>>> ___________________________
>>>>>> microblaze-uclinux mailing list
>>>>>> microblaze-uclinux@xxxxxxxxxxxxxx
>>>>>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>>>>>> Mailing List Archive :
>>> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>>>>>
>>>> ___________________________
>>>> microblaze-uclinux mailing list
>>>> microblaze-uclinux@xxxxxxxxxxxxxx
>>>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>>>> Mailing List Archive :
>>> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>>>
>>> ___________________________
>>> microblaze-uclinux mailing list
>>> microblaze-uclinux@xxxxxxxxxxxxxx
>>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>>> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>>
>>>
>>>
>>>
>> ___________________________
>> microblaze-uclinux mailing list
>> microblaze-uclinux@xxxxxxxxxxxxxx
>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>
>>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
> 
> 
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/