This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Halting RedBoot


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]