This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Network driver problem only with larger programs...
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Joe Porthouse <jporthouse at toptech dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 14 Aug 2006 22:04:10 +0200
- Subject: Re: [ECOS] Network driver problem only with larger programs...
- References: <MDAEMON-F200608141601.AA0102963md50000000034@toptech.com>
On Mon, Aug 14, 2006 at 04:01:05PM -0400, Joe Porthouse wrote:
>
> I've been stuck here for a while, so any advice would be greatly
> appreciated.
>
> Working with my small application, I am successfully able to manually
> configure the SMSC 91C111 driver from my application and everything seems to
> work without a problem (ping and socket connections).
>
> When I attempt to do the same in my much larger application, execution only
> gets a few lines into my main and locks up. The "network interface
> initialization" call in my application is not even called yet.
>
> If I ifdef out most of the code in my main (causing many functions to be
> excluded from the .bin file), the lockup no longer occurs.
>
> The "network initialization" that eCos does seems to be completing
> successfully from the debug messages I see, but after a timer tick,
> alarm_thread(), do_timeout() and ip_reass(), the execution gets hung up in
> an illegal memory reference.
>
> Init device '/dev/ttydiag'
> Init tty channel: 288eac
> Init device '/dev/haldiag'
> HAL/diag SERIAL init
> Network stack using 69632 bytes for misc space
> 69632 bytes for mbufs
> 139264 bytes for mbuf clusters
> [cyg_net_init] Init: mbinit(0x00000000)
> [cyg_net_init] Init: cyg_net_init_devs(0x00000000)
> Init device 'lan91cxx_eth0'
> [cyg_net_init] Init: loopattach(0x00000000)
> [cyg_net_init] Init: ifinit(0x00000000)
> [cyg_net_init] Init: domaininit(0x00000000)
> [cyg_net_init] Init: cyg_net_add_domain(0x00288b90)
> New domain internet at 0x00000000
> [cyg_net_init] Init: cyg_net_add_domain(0x00288620)
> New domain route at 0x00000000
> [cyg_net_init] Init: call_route_init(0x00000000)
> [cyg_net_init] Done
> 1
> (something bad happens here...)
>
> My instinct says I am exceeding some memory limit somewhere (stack, heap,
> code space, my sanity). I have increased the main() stack size from 8192 to
> 32,000 with no luck. I have a total of 64MB of SDRAM with a program image
> size of about 3.2 MB. Application is run from RAM. I am not using RedBoot,
> but compiling up eCos and my application into a single binary image.
Try enabling asserts and stack checking in the infra package. It might
tell you something.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss