[ECOS] RedBoot and eCos application both using the same network port

Jonathan Larmour jifl@eCosCentric.com
Tue Mar 25 17:14:00 GMT 2003

Chris Garry wrote:
> The ks32c5000 ethernet driver was printf-ing lots of debug info to
> the console - this was causing the board to crash as there was no
> connection to the console while the ethernet driver is re-setting up
> the network port.  So I quickly removed the diag_printf's from the
> driver.

Yes, you can only use those in certain circumstances!

> In the file net/bsd_tcpip/current/src/sys/net/if.c, the function
> if_attach(ifp) contains a printf which writes 'driver didn't set
> ifq_maxlen' to the console.  This has to be commented out also
> as the console is not there when the code is executed.

This was fixed on the 14th in the trunk and v2.0 branch.

> Now gdb can connect to the board and run the application,
> including setting breakpoints and stepping through the code.
> The board also responds to pings to the IP address I assigned
> RedBoot and the IP address I assigned the application.
> However, hitting the stop button on the debugger doesn't work
> as yet - but I'm still looking into this.

I've noticed some flakiness with ctrl-c over ethernet too, but haven't had 
the time to investigate - right now it only seems to ctrl-c if stuff is 
output - when it sends data it will check for received data.

> My question:  For the final fix I can add an option to the
> ks32c5000 driver CDL to suppress the debug output from the
> driver, but how should I stop the if_attach() function from
> writing the ''driver didn't set ifq_maxlen'  message out?  Just
> remove that line...? Or should the driver be setting this value?

Just remove the printf - that's all that was done in the cvs trunk.

eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list