summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-02-08 06:53:24 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-02-08 06:53:24 -0600
commitbaf972771e52416fbcddc05da8630bd65f530414 (patch)
tree05a418f1944c8106fee9b3ca17e967e7ce7db6be /nuttx/arch/arm/src
parent3531542145cc60792cf3f1134de9966a8313a7f6 (diff)
downloadnuttx-baf972771e52416fbcddc05da8630bd65f530414.tar.gz
nuttx-baf972771e52416fbcddc05da8630bd65f530414.tar.bz2
nuttx-baf972771e52416fbcddc05da8630bd65f530414.zip
SYSLOG: Add an option to use the syslog'ing device as the system consolution. This option enables a low-level, write-only console device at /dev/console (similar to the low-level UART console device). From Pierre-noel Bouteville.
Diffstat (limited to 'nuttx/arch/arm/src')
-rw-r--r--nuttx/arch/arm/src/common/up_initialize.c3
-rw-r--r--nuttx/arch/arm/src/efm32/efm32_config.h127
2 files changed, 71 insertions, 59 deletions
diff --git a/nuttx/arch/arm/src/common/up_initialize.c b/nuttx/arch/arm/src/common/up_initialize.c
index 69e1f2cf8..69227f516 100644
--- a/nuttx/arch/arm/src/common/up_initialize.c
+++ b/nuttx/arch/arm/src/common/up_initialize.c
@@ -44,6 +44,7 @@
#include <nuttx/arch.h>
#include <nuttx/fs/fs.h>
#include <nuttx/syslog/ramlog.h>
+#include <nuttx/syslog/syslog_console.h>
#include <arch/board/board.h>
@@ -220,6 +221,8 @@ void up_initialize(void)
#if defined(CONFIG_DEV_LOWCONSOLE)
lowconsole_init();
+#elif defined(CONFIG_SYSLOG_CONSOLE)
+ syslog_console_init();
#elif defined(CONFIG_RAMLOG_CONSOLE)
ramlog_consoleinit();
#endif
diff --git a/nuttx/arch/arm/src/efm32/efm32_config.h b/nuttx/arch/arm/src/efm32/efm32_config.h
index 8c377413e..b60c3a60e 100644
--- a/nuttx/arch/arm/src/efm32/efm32_config.h
+++ b/nuttx/arch/arm/src/efm32/efm32_config.h
@@ -127,73 +127,82 @@
#undef HAVE_UART_CONSOLE
#undef HAVE_LEUART_CONSOLE
-#if defined(CONFIG_USART0_SERIAL_CONSOLE) && defined(CONFIG_EFM32_USART0_ISUART)
+#if defined(CONFIG_SYSLOG_CONSOLE)
# undef CONFIG_USART1_SERIAL_CONSOLE
# undef CONFIG_USART2_SERIAL_CONSOLE
# undef CONFIG_UART0_SERIAL_CONSOLE
# undef CONFIG_UART1_SERIAL_CONSOLE
# undef CONFIG_LEUART0_SERIAL_CONSOLE
# undef CONFIG_LEUART1_SERIAL_CONSOLE
-# define HAVE_UART_CONSOLE 1
-#elif defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_EFM32_USART1_ISUART)
-# undef CONFIG_USART0_SERIAL_CONSOLE
-# undef CONFIG_USART2_SERIAL_CONSOLE
-# undef CONFIG_UART0_SERIAL_CONSOLE
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_LEUART0_SERIAL_CONSOLE
-# undef CONFIG_LEUART1_SERIAL_CONSOLE
-# define HAVE_UART_CONSOLE 1
-#elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_EFM32_USART2_ISUART)
-# undef CONFIG_USART0_SERIAL_CONSOLE
-# undef CONFIG_USART1_SERIAL_CONSOLE
-# undef CONFIG_UART0_SERIAL_CONSOLE
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_LEUART0_SERIAL_CONSOLE
-# undef CONFIG_LEUART1_SERIAL_CONSOLE
-# define HAVE_UART_CONSOLE 1
-#elif defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_EFM32_UART0)
-# undef CONFIG_USART0_SERIAL_CONSOLE
-# undef CONFIG_USART1_SERIAL_CONSOLE
-# undef CONFIG_USART2_SERIAL_CONSOLE
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_LEUART0_SERIAL_CONSOLE
-# undef CONFIG_LEUART1_SERIAL_CONSOLE
-# define HAVE_UART_CONSOLE 1
-#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_EFM32_UART1)
-# undef CONFIG_USART0_SERIAL_CONSOLE
-# undef CONFIG_USART1_SERIAL_CONSOLE
-# undef CONFIG_USART2_SERIAL_CONSOLE
-# undef CONFIG_UART0_SERIAL_CONSOLE
-# undef CONFIG_LEUART0_SERIAL_CONSOLE
-# undef CONFIG_LEUART1_SERIAL_CONSOLE
-# define HAVE_UART_CONSOLE 1
-#elif defined(CONFIG_LEUART0_SERIAL_CONSOLE) && defined(CONFIG_EFM32_LEUART0)
-# undef CONFIG_USART0_SERIAL_CONSOLE
-# undef CONFIG_USART1_SERIAL_CONSOLE
-# undef CONFIG_USART2_SERIAL_CONSOLE
-# undef CONFIG_UART0_SERIAL_CONSOLE
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_LEUART1_SERIAL_CONSOLE
-# define HAVE_LEUART_CONSOLE 1
-#elif defined(CONFIG_LEUART1_SERIAL_CONSOLE) && defined(CONFIG_EFM32_LEUART1)
-# undef CONFIG_USART0_SERIAL_CONSOLE
-# undef CONFIG_USART1_SERIAL_CONSOLE
-# undef CONFIG_USART2_SERIAL_CONSOLE
-# undef CONFIG_UART0_SERIAL_CONSOLE
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_LEUART0_SERIAL_CONSOLE
-# define HAVE_LEUART_CONSOLE 1
#else
-# ifdef CONFIG_DEV_CONSOLE
-# warning "No valid CONFIG_U[S]ART[n]_SERIAL_CONSOLE Setting"
+# if defined(CONFIG_USART0_SERIAL_CONSOLE) && defined(CONFIG_EFM32_USART0_ISUART)
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
+# undef CONFIG_UART0_SERIAL_CONSOLE
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_LEUART0_SERIAL_CONSOLE
+# undef CONFIG_LEUART1_SERIAL_CONSOLE
+# define HAVE_UART_CONSOLE 1
+# elif defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_EFM32_USART1_ISUART)
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
+# undef CONFIG_UART0_SERIAL_CONSOLE
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_LEUART0_SERIAL_CONSOLE
+# undef CONFIG_LEUART1_SERIAL_CONSOLE
+# define HAVE_UART_CONSOLE 1
+# elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_EFM32_USART2_ISUART)
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef CONFIG_UART0_SERIAL_CONSOLE
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_LEUART0_SERIAL_CONSOLE
+# undef CONFIG_LEUART1_SERIAL_CONSOLE
+# define HAVE_UART_CONSOLE 1
+# elif defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_EFM32_UART0)
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_LEUART0_SERIAL_CONSOLE
+# undef CONFIG_LEUART1_SERIAL_CONSOLE
+# define HAVE_UART_CONSOLE 1
+# elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_EFM32_UART1)
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
+# undef CONFIG_UART0_SERIAL_CONSOLE
+# undef CONFIG_LEUART0_SERIAL_CONSOLE
+# undef CONFIG_LEUART1_SERIAL_CONSOLE
+# define HAVE_UART_CONSOLE 1
+# elif defined(CONFIG_LEUART0_SERIAL_CONSOLE) && defined(CONFIG_EFM32_LEUART0)
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
+# undef CONFIG_UART0_SERIAL_CONSOLE
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_LEUART1_SERIAL_CONSOLE
+# define HAVE_LEUART_CONSOLE 1
+# elif defined(CONFIG_LEUART1_SERIAL_CONSOLE) && defined(CONFIG_EFM32_LEUART1)
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
+# undef CONFIG_UART0_SERIAL_CONSOLE
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_LEUART0_SERIAL_CONSOLE
+# define HAVE_LEUART_CONSOLE 1
+# else
+# ifdef CONFIG_DEV_CONSOLE
+# warning "No valid CONFIG_U[S]ART[n]_SERIAL_CONSOLE Setting"
+# endif
+# undef CONFIG_USART0_SERIAL_CONSOLE
+# undef CONFIG_USART1_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
+# undef CONFIG_UART0_SERIAL_CONSOLE
+# undef CONFIG_UART1_SERIAL_CONSOLE
+# undef CONFIG_LEUART0_SERIAL_CONSOLE
+# undef CONFIG_LEUART1_SERIAL_CONSOLE
# endif
-# undef CONFIG_USART0_SERIAL_CONSOLE
-# undef CONFIG_USART1_SERIAL_CONSOLE
-# undef CONFIG_USART2_SERIAL_CONSOLE
-# undef CONFIG_UART0_SERIAL_CONSOLE
-# undef CONFIG_UART1_SERIAL_CONSOLE
-# undef CONFIG_LEUART0_SERIAL_CONSOLE
-# undef CONFIG_LEUART1_SERIAL_CONSOLE
#endif
/****************************************************************************