From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28255 invoked by alias); 7 Sep 2007 15:09:04 -0000 Received: (qmail 28241 invoked by uid 22791); 7 Sep 2007 15:09:03 -0000 X-Spam-Check-By: sourceware.org Received: from 204-133-123-27.dia.static.slbbi.com (HELO mail.chez-thomas.org) (204.133.123.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 07 Sep 2007 15:08:55 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 8FB8137C800B; Fri, 7 Sep 2007 09:08:52 -0600 (MDT) Received: from [192.168.1.101] (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 26C8419500E3; Fri, 7 Sep 2007 09:08:44 -0600 (MDT) Message-ID: <46E1697A.1010107@mlbassoc.com> Date: Fri, 07 Sep 2007 15:09:00 -0000 From: Gary Thomas User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Mike Arthur CC: ecos-discuss@ecos.sourceware.org References: <2a3305fe0709070752w7c1bca5eg37b06c2f6ab0ffe8@mail.gmail.com> In-Reply-To: <2a3305fe0709070752w7c1bca5eg37b06c2f6ab0ffe8@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Erroneous Network Traffic Affects Ethernet Debugging on PowerPC X-SW-Source: 2007-09/txt/msg00039.txt.bz2 Mike Arthur wrote: > We have an in house HAL for a PowerPC target that can be fatally > affected by erroneous network traffic while debugging over the > ethernet. > > If there is network traffic going to the RedBoot IP (i.e. ping > flooding the RedBoot IP) or there are network broadcasts during tests > such as heaptest, the target will become unresponsive to the point > that GDB will lose its connection to the target. We are not sure what > is causing GDB to timeout from the target. > > It appears the target gets stuck in the RedBoot ethernet code > processing packets; we have determined this by the use of a JTAG. > This of course does not happen if the host and target are on an > isolated network without any other traffic besides GDB packets going > to RedBoot. Debugging works great over ethernet on an isolated > network. > > Does anybody have any ideas of where the bug could reside? Could the > bug be in the ethernet drivers, in the stand alone stack, somewhere in > the variant or platform HALs? > > Has anyone ever ran into problems with network traffic during network > debug sessions? What caused the problem? > > Any tips on how to debug problems with ethernet debugging? > > The target becomes unresponsive at different points depending on the template. > > > Here is how far the target gets with the 'default' template running heaptest: > --------------------------------------------------------------------------------------------------------- > (gdb) load > Loading section .text, size 0x15950 lma 0x100000 > Loading section .rodata, size 0x103c lma 0x115950 > Loading section .eh_frame, size 0x84 lma 0x116990 > Loading section .data, size 0x3a40 lma 0x116a18 > Start address 0x100000, load size 107600 > Transfer rate: 286933 bits/sec, 505 bytes/write. > (gdb) c > Continuing. > INFO: 0x00115950, CRC a75f> > INFO: > INFO: > INFO: > INFO: > PASS: > > > > Here is how far the target gets with the 'net' template running heaptest: > ---------------------------------------------------------------------------------------------------- > (gdb) load > Loading section .text, size 0x63958 lma 0x100000 > Loading section .rodata, size 0x310c lma 0x163958 > Loading section .eh_frame, size 0x84 lma 0x166a68 > Loading section .data, size 0x4988 lma 0x166af0 > Start address 0x100000, load size 439408 > Transfer rate: 292938 bits/sec, 510 bytes/write. > (gdb) c > Continuing. > [cyg_net_init] Init: mbinit(0x00000000) > Remote communication error: No route to host. It seems to me that you're describing two different problems. The first - debugging over the network fails when the network is saturated. Remember that debugging via the network is a cooperating effort. RedBoot and your eCos application share the same hardware and if something gets unhappy in this process, then the whole thing will fail. Given the hardware and it's limitations (e.g. you don't have a separate ethernet controller and stack, etc. for debugging), then there is no other way for it to work. One would have to diagnose the problem, probably using an out of band tool like JTAG. The second problem you describe is an old one. Again, since the ethernet hardware is being shared, things can get confused, especially during system startup. What's happening is that the eCos application is reinitializing the network hardware, but at the same time, trying to print messages using that same hardware. This simply can't work. I put a change into the stack (years ago) that side-steps this by forcing those initialization messages to go to the raw serial console, rather than via the network. A couple of questions: * What's your target? CPU? There are many PowerPC choices and most have their own drivers, etc. It would be nice to know which one you are having trouble with. * What's the vintage of your eCos source tree. As mentioned, some of these things have been worked on and may be fixed, just not in the sources you are using. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss