This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Halting RedBoot
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Stefano Mora <smora at eos dot pr dot it>
- Cc: "'ecos-discuss at ecos dot sourceware dot org'" <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 01 Apr 2010 08:23:26 -0600
- Subject: Re: [ECOS] Halting RedBoot
- References: <70924D2F9956B6428BA0FDFD4FFA875C035CE1B7008A@SRVEOS.eos>
On 04/01/2010 06:28 AM, Stefano Mora wrote:
Hi there,
I'm in a trouble with RedBoot cause during the boot it receives a character from the serial port (different from ^C) and the boot stops waiting for a Return.
I don't need this behaviour cause the serial port is shared with a printer that, when the board powers up, sends a char then the board stops.
My question is:
How can i jump it?
The code that enable the behaviour is
} else {
script = hold_script;
}
??
If i comment out this code the bootloader can stops only with Ctrl-C ??
No, this is not how to fix the problem.
The problem is that this loop is calling _rb_gets() which is
expecting to read an entire line from the console. If that
function sees any characters, it will wait until a complete
line is entered, regardless of the timeout.
The correct way to fix this would be to use mon_read_char_with_timeout()
instead of _rb_gets(). This will take a little while to update and
test, but if you're patient I'll give you a patch to try.
--
------------------------------------------------------------
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