diff options
34 files changed, 164 insertions, 48 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index af944aeb9..2edeef196 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -477,5 +477,6 @@ * Complete the basic port of the NXP LPC2148 on the mcu123.com board. The basic port includes successful booting, serial console and succesfully passing the examples/ostest. + * ARM architectures now support drivers/lowconsole.c diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index e93eb5bcb..bc8398e5d 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -8,7 +8,7 @@ <tr align="center" bgcolor="#e4e4e4"> <td> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> - <p>Last Updated: September 17, 2008</p> + <p>Last Updated: September 18, 2008</p> </td> </tr> </table> @@ -1111,6 +1111,7 @@ nuttx-0.3.15 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * Complete the basic port of the NXP LPC2148 on the mcu123.com board. The basic port includes successful booting, serial console and succesfully passing the examples/ostest. + * ARM architectures now support drivers/lowconsole.c pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/nuttx/arch/arm/src/c5471/c5471_lowputc.S b/nuttx/arch/arm/src/c5471/c5471_lowputc.S index 78154fd8c..4e949cf35 100644 --- a/nuttx/arch/arm/src/c5471/c5471_lowputc.S +++ b/nuttx/arch/arm/src/c5471/c5471_lowputc.S @@ -1,7 +1,7 @@ /************************************************************************** * c5471/c5471_lowputc.S * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/nuttx/arch/arm/src/common/up_head.S b/nuttx/arch/arm/src/common/up_head.S index e6afed640..019872f4d 100644 --- a/nuttx/arch/arm/src/common/up_head.S +++ b/nuttx/arch/arm/src/common/up_head.S @@ -284,7 +284,7 @@ __start: #endif /* Perform early serial initialization */ -#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0 +#ifdef CONFIG_USE_EARLYSERIALINIT bl up_earlyserialinit #endif diff --git a/nuttx/arch/arm/src/common/up_initialize.c b/nuttx/arch/arm/src/common/up_initialize.c index 583142ec0..e5b612fc6 100644 --- a/nuttx/arch/arm/src/common/up_initialize.c +++ b/nuttx/arch/arm/src/common/up_initialize.c @@ -135,7 +135,11 @@ void up_initialize(void) /* Initialize the serial device driver */ +#ifdef CONFIG_USE_SERIALDRIVER up_serialinit(); +#elif defined(CONFIG_DEV_LOWCONSOLE) + lowconsole_init(); +#endif /* Initialize the netwok */ diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h index 182e6058c..836a2579f 100644 --- a/nuttx/arch/arm/src/common/up_internal.h +++ b/nuttx/arch/arm/src/common/up_internal.h @@ -55,6 +55,16 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +/* Determine which (if any) console driver to use */ + +#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE) +# undef CONFIG_USE_SERIALDRIVER +# undef CONFIG_USE_EARLYSERIALINIT +#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0 +# define CONFIG_USE_SERIALDRIVER 1 +# define CONFIG_USE_EARLYSERIALINIT 1 +#endif + /**************************************************************************** * Public Types ****************************************************************************/ @@ -88,7 +98,6 @@ extern uint32 g_heapbase; * Inline Functions ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -110,12 +119,7 @@ extern void up_sigdeliver(void); extern void up_syscall(uint32 *regs); extern int up_timerisr(int irq, uint32 *regs); extern void up_undefinedinsn(uint32 *regs); - -#ifdef CONFIG_DEBUG extern void up_lowputc(char ch); -#else -# define up_lowputc(ch) -#endif /* Defined in up_vectors.S */ @@ -137,6 +141,14 @@ extern void up_serialinit(void); # define up_serialinit() #endif +/* Defined in drivers/lowconsole.c */ + +#ifdef CONFIG_DEV_LOWCONSOLE +extern void lowconsole_init(void); +#else +# define lowconsole_init() +#endif + /* Defined in up_watchdog.c */ extern void up_wdtinit(void); diff --git a/nuttx/arch/arm/src/common/up_nommuhead.S b/nuttx/arch/arm/src/common/up_nommuhead.S index 581ed0a6d..318afb186 100644 --- a/nuttx/arch/arm/src/common/up_nommuhead.S +++ b/nuttx/arch/arm/src/common/up_nommuhead.S @@ -105,10 +105,10 @@ __start: #endif -#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS >0 /* Perform early serial initialization */ mov fp, #0 +#ifdef CONFIG_USE_EARLYSERIALINIT bl up_earlyserialinit #endif diff --git a/nuttx/arch/arm/src/dm320/dm320_lowputc.S b/nuttx/arch/arm/src/dm320/dm320_lowputc.S index 5566b3f58..53c9912bf 100644 --- a/nuttx/arch/arm/src/dm320/dm320_lowputc.S +++ b/nuttx/arch/arm/src/dm320/dm320_lowputc.S @@ -1,7 +1,7 @@ /************************************************************************** * dm320/dm320_lowputc.S * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/nuttx/arch/arm/src/dm320/dm320_serial.c b/nuttx/arch/arm/src/dm320/dm320_serial.c index 7018f7b41..479c271bb 100644 --- a/nuttx/arch/arm/src/dm320/dm320_serial.c +++ b/nuttx/arch/arm/src/dm320/dm320_serial.c @@ -55,7 +55,7 @@ #include "os_internal.h" #include "up_internal.h" -#if CONFIG_NFILE_DESCRIPTORS > 0 +#ifdef CONFIG_USE_SERIALDRIVER /**************************************************************************** * Definitions @@ -780,7 +780,7 @@ int up_putc(int ch) return ch; } -#else /* CONFIG_NFILE_DESCRIPTORS > 0 */ +#else /* CONFIG_USE_SERIALDRIVER */ /**************************************************************************** * Definitions @@ -833,6 +833,6 @@ int up_putc(int ch) return ch; } -#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */ +#endif /* CONFIG_USE_SERIALDRIVER */ diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_head.S b/nuttx/arch/arm/src/lpc214x/lpc214x_head.S index 117ca6a1f..6b5c24e17 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_head.S +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_head.S @@ -477,7 +477,9 @@ __start: /* Perform early serial initialization */ mov fp, #0 +#ifdef CONFIG_USE_EARLYSERIALINIT bl up_earlyserialinit +#endif showprogress 'C' showprogress '\n' diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c index dc8a4accb..746899b96 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * lpc214x/lpc214x_serial.c + * arch/arm/src/lpc214x/lpc214x_serial.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> @@ -55,11 +55,13 @@ #include "lpc214x_uart.h" +#ifdef CONFIG_USE_SERIALDRIVER + /**************************************************************************** * Definitions ****************************************************************************/ -#define BASE_BAUD 115200 +#define BASE_BAUD 38400 /**************************************************************************** * Private Types @@ -458,9 +460,9 @@ static int up_interrupt(int irq, void *context) */ status = up_serialin(priv, LPC214X_UART_IIR_OFFSET); - + /* The NO INTERRUPT should be zero */ - + if (status != LPC214X_IIR_NO_INT) { /* Handline incoming, receive bytes (with or without timeout) */ @@ -478,20 +480,20 @@ static int up_interrupt(int irq, void *context) } /* Just clear modem status interrupts */ - + else if (status == LPC214X_IIR_MS_INT) { /* Read the modem status regisgter (MSR) to clear */ - + (void)up_serialin(priv, LPC214X_UART_MSR_OFFSET); } /* Just clear any line status interrupts */ - + else if (status == LPC214X_IIR_RLS_INT) { /* Read the line status register (LSR) to clear */ - + (void)up_serialin(priv, LPC214X_UART_LSR_OFFSET); } } @@ -698,19 +700,19 @@ static boolean up_txempty(struct uart_dev_s *dev) void up_earlyserialinit(void) { /* Enable UART0 and 1 */ - + uint32 pinsel = getreg32(LPC214X_PINSEL0); pinsel &= ~(LPC214X_UART0_PINMASK|LPC214X_UART1_PINMASK); pinsel |= (LPC214X_UART0_PINSEL|LPC214X_UART1_PINSEL); putreg32(pinsel, LPC214X_PINSEL0); /* Disable both UARTS */ - + up_disableuartint(TTYS0_DEV.priv, NULL); up_disableuartint(TTYS1_DEV.priv, NULL); /* Configuration whichever on is the console */ - + CONSOLE_DEV.isconsole = TRUE; up_setup(&CONSOLE_DEV); } @@ -735,8 +737,7 @@ void up_serialinit(void) * Name: up_putc * * Description: - * Provide priority, low-level access to support OS debug - * writes + * Provide priority, low-level access to support OS debug writes * ****************************************************************************/ @@ -764,3 +765,29 @@ int up_putc(int ch) return ch; } +#else /* CONFIG_USE_SERIALDRIVER */ + +/**************************************************************************** + * Name: up_putc + * + * Description: + * Provide priority, low-level access to support OS debug writes + * + ****************************************************************************/ + +int up_putc(int ch) +{ + /* Check for LF */ + + if (ch == '\n') + { + /* Add CR */ + + up_lowputc('\r'); + } + + up_lowputc(ch); + return ch; +} + +#endif /* CONFIG_USE_SERIALDRIVER */ diff --git a/nuttx/arch/z80/src/common/up_internal.h b/nuttx/arch/z80/src/common/up_internal.h index ec3f6b811..3c60495cc 100644 --- a/nuttx/arch/z80/src/common/up_internal.h +++ b/nuttx/arch/z80/src/common/up_internal.h @@ -63,7 +63,7 @@ * Definitions ****************************************************************************/ - /* Determine which (if any) console driver to use */ +/* Determine which (if any) console driver to use */ #if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE) # undef CONFIG_USE_SERIALDRIVER diff --git a/nuttx/configs/c5471evm/defconfig b/nuttx/configs/c5471evm/defconfig index eeeb61a9b..626e7fc8b 100644 --- a/nuttx/configs/c5471evm/defconfig +++ b/nuttx/configs/c5471evm/defconfig @@ -145,6 +145,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=ostest CONFIG_DEBUG=n @@ -159,6 +161,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=13 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/c5471evm/dhcpconfig b/nuttx/configs/c5471evm/dhcpconfig index b78b87eb8..cbcea2f62 100644 --- a/nuttx/configs/c5471evm/dhcpconfig +++ b/nuttx/configs/c5471evm/dhcpconfig @@ -145,6 +145,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=uip CONFIG_DEBUG=n @@ -159,6 +161,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=13 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/c5471evm/netconfig b/nuttx/configs/c5471evm/netconfig index 713467dd4..109cd7279 100644 --- a/nuttx/configs/c5471evm/netconfig +++ b/nuttx/configs/c5471evm/netconfig @@ -145,6 +145,8 @@ CONFIG_UART_MODEM_2STOP=0 # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=nettest CONFIG_DEBUG=n @@ -159,6 +161,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=13 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/c5471evm/nshconfig b/nuttx/configs/c5471evm/nshconfig index fef337dc0..206438f17 100644 --- a/nuttx/configs/c5471evm/nshconfig +++ b/nuttx/configs/c5471evm/nshconfig @@ -145,6 +145,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=nsh CONFIG_DEBUG=n @@ -159,6 +161,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=13 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig index 0df6da5d9..227677ba0 100644 --- a/nuttx/configs/m68332evb/defconfig +++ b/nuttx/configs/m68332evb/defconfig @@ -134,6 +134,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=ostest CONFIG_DEBUG=n @@ -148,6 +150,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=13 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig index 9d1567d3d..a0bd930fa 100644 --- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig +++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig @@ -1,5 +1,5 @@ ############################################################################ -# configs/mcu123-lpc214x/defconfig +# configs/mcu123-lpc214x/ostest/defconfig # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <spudmonkey@racsa.co.cr> @@ -33,7 +33,7 @@ # ############################################################################ # -# architecture selection +# Architecture selection # # CONFIG_ARCH - identifies the arch subdirectory and, hence, the # processor architecture. @@ -158,13 +158,15 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=ostest CONFIG_DEBUG=n CONFIG_DEBUG_VERBOSE=n CONFIG_MM_REGIONS=1 CONFIG_ARCH_LOWPUTC=y -CONFIG_RR_INTERVAL=200 +CONFIG_RR_INTERVAL=0 CONFIG_SCHED_INSTRUMENTATION=n CONFIG_TASK_NAME_SIZE=0 CONFIG_START_YEAR=2008 @@ -172,6 +174,7 @@ CONFIG_START_MONTH=9 CONFIG_START_DAY=17 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=y # # The following can be used to disable categories of @@ -264,12 +267,12 @@ CONFIG_NPTHREAD_KEYS=4 CONFIG_NFILE_DESCRIPTORS=8 CONFIG_NFILE_STREAMS=8 CONFIG_NAME_MAX=32 -CONFIG_STDIO_BUFFER_SIZE=512 +CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_NUNGET_CHARS=2 -CONFIG_PREALLOC_MQ_MSGS=8 +CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=4 -CONFIG_PREALLOC_WDOGS=8 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 CONFIG_PREALLOC_TIMERS=4 # @@ -325,6 +328,11 @@ CONFIG_NET_DHCP_LIGHT=n CONFIG_NET_RESOLV_ENTRIES=4 # +# Settings for examples/ostest +CONFIG_EXAMPLES_OSTEST_LOOPS=1 +CONFIG_EXAMPLES_OSTEST_STACKSIZE=512 + +# # Settings for examples/nsh CONFIG_EXAMPLES_NSH_CONSOLE=y CONFIG_EXAMPLES_NSH_TELNET=n @@ -354,8 +362,8 @@ CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0) CONFIG_BOOT_FROM_FLASH=y CONFIG_CUSTOM_STACK=n CONFIG_STACK_POINTER= -CONFIG_PROC_STACK_SIZE=1024 +CONFIG_PROC_STACK_SIZE=512 CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=1024 +CONFIG_PTHREAD_STACK_DEFAULT=512 CONFIG_HEAP_BASE= CONFIG_HEAP_SIZE= diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig index 6bba44f69..be3ca6d24 100644 --- a/nuttx/configs/ntosd-dm320/nettest/defconfig +++ b/nuttx/configs/ntosd-dm320/nettest/defconfig @@ -143,6 +143,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=nettest CONFIG_DEBUG=n @@ -157,6 +159,7 @@ CONFIG_START_MONTH=8 CONFIG_START_DAY=29 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig index c9bc5d208..d10fafeb2 100644 --- a/nuttx/configs/ntosd-dm320/nsh/defconfig +++ b/nuttx/configs/ntosd-dm320/nsh/defconfig @@ -143,6 +143,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=nsh CONFIG_DEBUG=n @@ -157,6 +159,7 @@ CONFIG_START_MONTH=9 CONFIG_START_DAY=12 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig index 1b0018040..3e4c44c6f 100644 --- a/nuttx/configs/ntosd-dm320/ostest/defconfig +++ b/nuttx/configs/ntosd-dm320/ostest/defconfig @@ -143,6 +143,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=ostest CONFIG_DEBUG=n @@ -157,6 +159,7 @@ CONFIG_START_MONTH=8 CONFIG_START_DAY=29 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig index b07a48092..d0ec81a7d 100644 --- a/nuttx/configs/ntosd-dm320/udp/defconfig +++ b/nuttx/configs/ntosd-dm320/udp/defconfig @@ -143,6 +143,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=udp CONFIG_DEBUG=n @@ -157,6 +159,7 @@ CONFIG_START_MONTH=8 CONFIG_START_DAY=29 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig index 52a59a515..d463ab1a9 100644 --- a/nuttx/configs/ntosd-dm320/uip/defconfig +++ b/nuttx/configs/ntosd-dm320/uip/defconfig @@ -143,6 +143,8 @@ CONFIG_HAVE_LIBM=n # CONFIG_JULIAN_TIME - Enables Julian time conversions # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=uip CONFIG_DEBUG=n @@ -157,6 +159,7 @@ CONFIG_START_MONTH=8 CONFIG_START_DAY=29 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=n +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig index 920eb96f8..280f61239 100644 --- a/nuttx/configs/pjrc-8051/defconfig +++ b/nuttx/configs/pjrc-8051/defconfig @@ -131,6 +131,8 @@ CONFIG_HAVE_LIBM=n # Used to initialize the internal time logic. # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=ostest CONFIG_DEBUG=n @@ -145,6 +147,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=21 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=n +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/sim/mount/defconfig b/nuttx/configs/sim/mount/defconfig index fd576979b..1ebb03bfc 100644 --- a/nuttx/configs/sim/mount/defconfig +++ b/nuttx/configs/sim/mount/defconfig @@ -80,6 +80,8 @@ CONFIG_ARCH_BOARD_SIM=y # Used to initialize the internal time logic. # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=mount CONFIG_DEBUG=y @@ -94,6 +96,7 @@ CONFIG_START_MONTH=6 CONFIG_START_DAY=1 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/sim/nettest/defconfig b/nuttx/configs/sim/nettest/defconfig index bf918b2b2..df04db1ed 100644 --- a/nuttx/configs/sim/nettest/defconfig +++ b/nuttx/configs/sim/nettest/defconfig @@ -80,6 +80,8 @@ CONFIG_ARCH_BOARD_SIM=y # Used to initialize the internal time logic. # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=nettest CONFIG_DEBUG=n @@ -94,6 +96,7 @@ CONFIG_START_MONTH=8 CONFIG_START_DAY=16 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig index 828788895..6cc39f2b2 100644 --- a/nuttx/configs/sim/nsh/defconfig +++ b/nuttx/configs/sim/nsh/defconfig @@ -80,6 +80,8 @@ CONFIG_ARCH_BOARD_SIM=y # Used to initialize the internal time logic. # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=nsh CONFIG_DEBUG=y @@ -94,6 +96,7 @@ CONFIG_START_MONTH=6 CONFIG_START_DAY=1 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index a00dd1126..577b762a5 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -80,6 +80,8 @@ CONFIG_ARCH_BOARD_SIM=y # Used to initialize the internal time logic. # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=ostest CONFIG_DEBUG=y @@ -94,6 +96,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=27 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n CONFIG_MUTEX_TYPES=y # diff --git a/nuttx/configs/sim/pashello/defconfig b/nuttx/configs/sim/pashello/defconfig index bfddb43c3..a75275f6a 100644 --- a/nuttx/configs/sim/pashello/defconfig +++ b/nuttx/configs/sim/pashello/defconfig @@ -80,6 +80,8 @@ CONFIG_ARCH_BOARD_SIM=y # Used to initialize the internal time logic. # CONFIG_DEV_CONSOLE - Set if architecture-specific logic # provides /dev/console. Enables stdout, stderr, stdin. +# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console +# driver (minimul support) # CONFIG_EXAMPLE=pashello CONFIG_DEBUG=n @@ -94,6 +96,7 @@ CONFIG_START_MONTH=2 CONFIG_START_DAY=27 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=n # # The following can be used to disable categories of diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig index 8dea30eab..e091eb1d5 100644 --- a/nuttx/configs/z80sim/pashello/defconfig +++ b/nuttx/configs/z80sim/pashello/defconfig @@ -131,9 +131,8 @@ CONFIG_START_YEAR=2007 CONFIG_START_MONTH=2 CONFIG_START_DAY=21 CONFIG_JULIAN_TIME=n -CONFIG_DEV_CONSOLE=y CONFIG_HAVE_LOWUARTINIT=n -CONFIG_DEV_LOWCONSOLE=y +CONFIG_DEV_CONSOLE=y CONFIG_DEV_LOWCONSOLE=n # diff --git a/nuttx/drivers/lowconsole.c b/nuttx/drivers/lowconsole.c index d627d4d87..0dcfe72b3 100755 --- a/nuttx/drivers/lowconsole.c +++ b/nuttx/drivers/lowconsole.c @@ -50,6 +50,12 @@ * Definitions ****************************************************************************/ +/* The architecture must provide up_putc for this driver */ + +#ifndef CONFIG_ARCH_LOWPUTC +# error "Architecture must provide up_putc() for this driver" +#endif + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/nuttx/drivers/serial.c b/nuttx/drivers/serial.c index 9f26632ee..eb71f0c2c 100644 --- a/nuttx/drivers/serial.c +++ b/nuttx/drivers/serial.c @@ -53,12 +53,14 @@ * Definitions ************************************************************************************/ -#ifdef CONFIG_HAVE_LOWPUTC -# define uart_putc(ch) up_lowputc(ch); -#else -# define uart_putc(ch) up_putc(ch); +/* The architecture must provide up_putc for this driver */ + +#ifndef CONFIG_ARCH_LOWPUTC +# error "Architecture must provide up_putc() for this driver" #endif +#define uart_putc(ch) up_putc(ch) + /************************************************************************************ * Private Types ************************************************************************************/ diff --git a/nuttx/examples/ostest/Makefile b/nuttx/examples/ostest/Makefile index 3eeda4f08..adb875932 100644 --- a/nuttx/examples/ostest/Makefile +++ b/nuttx/examples/ostest/Makefile @@ -40,7 +40,10 @@ ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = main.c dev_null.c ifneq ($(CONFIG_DISABLE_PTHREAD),y) -CSRCS += cancel.c cond.c mutex.c sem.c roundrobin.c barrier.c +CSRCS += cancel.c cond.c mutex.c sem.c barrier.c +ifneq ($(CONFIG_RR_INTERVAL),0) +CSRCS += roundrobin.c +endif ifeq ($(CONFIG_MUTEX_TYPES),y) CSRCS += rmutex.c endif diff --git a/nuttx/examples/ostest/roundrobin.c b/nuttx/examples/ostest/roundrobin.c index 003c6cf6b..061d51f3d 100644 --- a/nuttx/examples/ostest/roundrobin.c +++ b/nuttx/examples/ostest/roundrobin.c @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory NuttX nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -47,7 +47,10 @@ * Definitions ********************************************************************************/ -/* This number may need to be tuned for different processor speeds */ +/* This number may need to be tuned for different processor speeds. Since these + * arrays must be large to very correct SCHED_RR behavior, this test may require + * too much memory on many targets. + */ /* #define CONFIG_NINTEGERS 32768 Takes forever on 60Mhz ARM7 */ |