Add logic to re-direct debug output to a sysloggin device

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4381 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-02-11 14:20:40 +00:00
parent 667290b144
commit 8595411e4a
18 changed files with 128 additions and 55 deletions

View File

@ -43,6 +43,8 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include <arch/board/board.h>
#include "up_arch.h"
@ -159,6 +161,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
/* Initialize the netwok */
up_netinitialize();

View File

@ -81,6 +81,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
@ -297,14 +303,6 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
/* Defined in drivers/ramlog.c */
#ifdef CONFIG_RAMLOG_CONSOLE
extern void ramlog_consoleinit(void);
#else
# define ramlog_consoleinit()
#endif
/* DMA **********************************************************************/
#ifdef CONFIG_ARCH_DMA

View File

@ -168,6 +168,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/* If GPIO IRQ support is defined, then a set of GPIOs must all be included */
#if CONFIG_AVR32_GPIOIRQSETA == 0 && CONFIG_AVR32_GPIOIRQSETB == 0

View File

@ -87,6 +87,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/************************************************************************************
* Public Types
************************************************************************************/

View File

@ -92,6 +92,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/************************************************************************************
* Public Types
************************************************************************************/

View File

@ -43,6 +43,8 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include <arch/board/board.h>
#include "up_arch.h"
@ -76,6 +78,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@ -183,6 +191,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
/* Initialize the netwok */
up_netinitialize();

View File

@ -172,14 +172,6 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
/* Defined in drivers/ramlog.c */
#ifdef CONFIG_RAMLOG_CONSOLE
extern void ramlog_consoleinit(void);
#else
# define ramlog_consoleinit()
#endif
/* Defined in chip/xxx_timerisr.c */
extern void up_timerinit(void);

View File

@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include "up_arch.h"
#include "up_internal.h"
@ -158,6 +159,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
/* Initialize the netwok */
up_netinitialize();

View File

@ -81,6 +81,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
@ -178,12 +184,6 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
#ifdef CONFIG_RAMLOG_CONSOLE
extern void ramlog_consoleinit(void);
#else
# define ramlog_consoleinit()
#endif
extern void up_lowputc(char ch);
extern void up_puts(const char *str);
extern void up_lowputs(const char *str);

View File

@ -43,6 +43,8 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include <arch/board/board.h>
#include "up_arch.h"
@ -159,6 +161,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
/* Initialize the netwok */
up_netinitialize();

View File

@ -81,6 +81,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
@ -188,14 +194,6 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
/* Defined in drivers/ramlog.c */
#ifdef CONFIG_RAMLOG_CONSOLE
extern void ramlog_consoleinit(void);
#else
# define ramlog_consoleinit()
#endif
/* Debug */
#ifdef CONFIG_ARCH_STACKDUMP

View File

@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include "up_arch.h"
#include "up_internal.h"
@ -150,6 +151,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
/* Initialize the netwok */
up_netinitialize();

View File

@ -85,6 +85,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
@ -177,14 +183,6 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
/* Defined in drivers/ramlog.c */
#ifdef CONFIG_RAMLOG_CONSOLE
extern void ramlog_consoleinit(void);
#else
# define ramlog_consoleinit()
#endif
/* Defined in up_watchdog.c */
extern void up_wdtinit(void);

View File

@ -1,8 +1,8 @@
/****************************************************************************
* up_initialize.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include "up_internal.h"
@ -50,6 +51,12 @@
* Private Definitions
****************************************************************************/
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@ -99,6 +106,10 @@ void up_initialize(void)
devzero_register(); /* Standard /dev/zero */
up_devconsole(); /* Our private /dev/console */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit(); /* System logging device */
#endif
#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT)
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */
#endif

View File

@ -43,6 +43,8 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include <arch/board/board.h>
#include "up_arch.h"
@ -159,6 +161,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
/* Initialize the netwok */
up_netinitialize();

View File

@ -80,6 +80,12 @@
# endif
#endig
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
@ -203,14 +209,6 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
/* Defined in drivers/ramlog.c */
#ifdef CONFIG_RAMLOG_CONSOLE
extern void ramlog_consoleinit(void);
#else
# define ramlog_consoleinit()
#endif
/* Defined in up_watchdog.c */
extern void up_wdtinit(void);

View File

@ -44,6 +44,8 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/mm.h>
#include <nuttx/ramlog.h>
#include <arch/board/board.h>
#include "up_internal.h"
@ -174,6 +176,12 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
/* Initialize the netwok */
up_netinitialize();

View File

@ -70,7 +70,13 @@
# define USE_SERIALDRIVER 1
# define USE_EARLYSERIALINIT 1
#endif
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/* Macros for portability */
#define IN_INTERRUPT (current_regs != NULL)
@ -140,12 +146,6 @@ extern void up_serialinit(void);
extern void lowconsole_init(void);
#endif
/* Defined in drivers/ramlog.c */
#ifdef CONFIG_RAMLOG_CONSOLE
extern void ramlog_consoleinit(void);
#endif
/* Defined in up_timerisr.c */
extern void up_timerinit(void);