As I said, the early serial initialization is needed for boot-up debug output.  Here is a little more detail:

If the serial is not initialized, then up_putc will not work.  In fact, any calls to up_putc() could hang.  If the serial console is the syslog debug channel, then up_putc is called from syslog under certain conditions:

 * Syslog output from an interrupt handler
 * Syslog() is called with LOG_EMERG
 * Syslog() is called early in the initialization (while using the
   g_default_channel)

up_putc is also used in most very low level startup logic in the PROGRESS macro that outputs the ABCDEF that you see when booting most NuttX systems.

What happens if the serial device used by up_putc is not initialized?  It will certainly fail to ouput anything but could also hang on a busy wait polling an uninitialized device.


Reply via email to