mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Add logic so that a RAM log can be used in place of a console device
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4380 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/arm/up_nommuhead.S
|
* arch/arm/src/arm/up_nommuhead.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -110,7 +110,7 @@ __start:
|
|||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
mov fp, #0
|
mov fp, #0
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
bl up_earlyserialinit
|
bl up_earlyserialinit
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/common/up_initialize.c
|
* arch/arm/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -149,12 +149,14 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the console device driver */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#if defined(USE_SERIALDRIVER)
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
ramlog_consoleinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the netwok */
|
/* Initialize the netwok */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_internal.h
|
* common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __UP_INTERNAL_H
|
#ifndef __ARCH_ARM_SRC_COMMON_UP_INTERNAL_H
|
||||||
#define __UP_INTERNAL_H
|
#define __ARCH_ARM_SRC_COMMON_UP_INTERNAL_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
@@ -62,13 +62,24 @@
|
|||||||
|
|
||||||
/* 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)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS == 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# else
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/* Check if an interrupt stack size is configured */
|
/* Check if an interrupt stack size is configured */
|
||||||
|
|
||||||
@@ -286,6 +297,14 @@ extern void lowconsole_init(void);
|
|||||||
# define lowconsole_init()
|
# define lowconsole_init()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Defined in drivers/ramlog.c */
|
||||||
|
|
||||||
|
#ifdef CONFIG_RAMLOG_CONSOLE
|
||||||
|
extern void ramlog_consoleinit(void);
|
||||||
|
#else
|
||||||
|
# define ramlog_consoleinit()
|
||||||
|
#endif
|
||||||
|
|
||||||
/* DMA **********************************************************************/
|
/* DMA **********************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_DMA
|
#ifdef CONFIG_ARCH_DMA
|
||||||
@@ -364,4 +383,4 @@ extern size_t up_check_tcbstack_remain(FAR _TCB);
|
|||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* __UP_INTERNAL_H */
|
#endif /* __ARCH_ARM_SRC_COMMON_UP_INTERNAL_H */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/dm320/dm320_boot.c
|
* arch/arm/src/dm320/dm320_boot.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009-2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -231,7 +231,7 @@ void up_boot(void)
|
|||||||
#endif
|
#endif
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* arch/arm/src/dm320/dm320_serial.c
|
* arch/arm/src/dm320/dm320_serial.c
|
||||||
* arch/arm/src/chip/dm320_serial.c
|
* arch/arm/src/chip/dm320_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
#include "os_internal.h"
|
#include "os_internal.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -781,7 +781,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -834,6 +834,6 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* arch/arm/src/imx/imx_boot.c
|
* arch/arm/src/imx/imx_boot.c
|
||||||
* arch/arm/src/chip/imx_boot.c
|
* arch/arm/src/chip/imx_boot.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009,2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -219,7 +219,7 @@ void up_boot(void)
|
|||||||
#endif
|
#endif
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* arch/arm/src/imx/imx_serial.c
|
* arch/arm/src/imx/imx_serial.c
|
||||||
* arch/arm/src/chip/imx_serial.c
|
* arch/arm/src/chip/imx_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
#include "os_internal.h"
|
#include "os_internal.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -1181,7 +1181,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -1239,6 +1239,6 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/kinetis/kinetis_serial.c
|
* arch/mips/src/kinetis/kinetis_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which UART with be tty0/console and which tty1-4? The console will always
|
/* Which UART with be tty0/console and which tty1-4? The console will always
|
||||||
* be ttyS0. If there is no console then will use the lowest numbered UART.
|
* be ttyS0. If there is no console then will use the lowest numbered UART.
|
||||||
@@ -1319,7 +1319,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1346,5 +1346,5 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* arch/arm/src/kinetis/kinetis_start.c
|
* arch/arm/src/kinetis/kinetis_start.c
|
||||||
* arch/arm/src/chip/kinetis_start.c
|
* arch/arm/src/chip/kinetis_start.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -135,7 +135,7 @@ void __start(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
kinetis_lowsetup();
|
kinetis_lowsetup();
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm3s/lm3s_serial.c
|
* arch/arm/src/lm3s/lm3s_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
* still must provide some minimal implementation of up_putc.
|
* still must provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which UART with be tty0/console and which tty1? */
|
/* Which UART with be tty0/console and which tty1? */
|
||||||
|
|
||||||
@@ -1038,7 +1038,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1065,4 +1065,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* arch/arm/src/lm3s/lm3s_start.c
|
* arch/arm/src/lm3s/lm3s_start.c
|
||||||
* arch/arm/src/chip/lm3s_start.c
|
* arch/arm/src/chip/lm3s_start.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -130,7 +130,7 @@ void __start(void)
|
|||||||
|
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
showprogress('D');
|
showprogress('D');
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lpc17xx/lpc17_serial.c
|
* arch/arm/src/lpc17xx/lpc17_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_USE_SERIALDRIVER) && defined(HAVE_UART)
|
#if defined(USE_SERIALDRIVER) && defined(HAVE_UART)
|
||||||
|
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
@@ -1417,7 +1417,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1444,4 +1444,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* arch/arm/src/lpc17xx/lpc17_start.c
|
* arch/arm/src/lpc17xx/lpc17_start.c
|
||||||
* arch/arm/src/chip/lpc17_start.c
|
* arch/arm/src/chip/lpc17_start.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -129,7 +129,7 @@ void __start(void)
|
|||||||
|
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
showprogress('D');
|
showprogress('D');
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* arch/arm/src/lpc214x/lpc214x_head.S
|
* arch/arm/src/lpc214x/lpc214x_head.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -582,7 +582,7 @@ __start:
|
|||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
mov fp, #0
|
mov fp, #0
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
bl up_earlyserialinit
|
bl up_earlyserialinit
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lpc214x/lpc214x_serial.c
|
* arch/arm/src/lpc214x/lpc214x_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
#include "lpc214x_pinsel.h"
|
#include "lpc214x_pinsel.h"
|
||||||
#include "lpc214x_uart.h"
|
#include "lpc214x_uart.h"
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -816,7 +816,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -841,4 +841,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the NuttX RTOS and based on the lpc2148 port:
|
* This file is part of the NuttX RTOS and based on the lpc2148 port:
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -181,7 +181,7 @@ __start:
|
|||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
mov fp, #0
|
mov fp, #0
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
bl up_earlyserialinit
|
bl up_earlyserialinit
|
||||||
showprogress 'S'
|
showprogress 'S'
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the NuttX RTOS and based on the lpc2148 port:
|
* This file is part of the NuttX RTOS and based on the lpc2148 port:
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
#include "lpc23xx_uart.h"
|
#include "lpc23xx_uart.h"
|
||||||
#include "lpc23xx_vic.h"
|
#include "lpc23xx_vic.h"
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -947,7 +947,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -971,4 +971,4 @@ int up_putc(int ch)
|
|||||||
up_lowputc(ch);
|
up_lowputc(ch);
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lpc31xx/lpc31_boot.c
|
* arch/arm/src/lpc31xx/lpc31_boot.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -387,7 +387,7 @@ void up_boot(void)
|
|||||||
|
|
||||||
/* Perform early serial initialization if we are going to use the serial driver */
|
/* Perform early serial initialization if we are going to use the serial driver */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lpc31xx/lpc31_lowputc.c
|
* arch/arm/src/lpc31xx/lpc31_lowputc.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
* initialization suppressed?
|
* initialization suppressed?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# if defined(CONFIG_USE_EARLYSERIALINIT) || defined(CONFIG_SUPPRESS_LPC31_UART_CONFIG)
|
# if defined(USE_EARLYSERIALINIT) || defined(CONFIG_SUPPRESS_LPC31_UART_CONFIG)
|
||||||
# undef NEED_LOWSETUP
|
# undef NEED_LOWSETUP
|
||||||
# else
|
# else
|
||||||
# define NEED_LOWSETUP 1
|
# define NEED_LOWSETUP 1
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lpc31xx/lpc31_serial.c
|
* arch/arm/src/lpc31xx/lpc31_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
#include "lpc31_cgudrvr.h"
|
#include "lpc31_cgudrvr.h"
|
||||||
#include "lpc31_uart.h"
|
#include "lpc31_uart.h"
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -826,7 +826,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -853,4 +853,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/sam3u/sam3u_serial.c
|
* arch/arm/src/sam3u/sam3u_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which UART/USART with be tty0/console and which tty1? tty2? tty3? tty4? */
|
/* Which UART/USART with be tty0/console and which tty1? tty2? tty3? tty4? */
|
||||||
|
|
||||||
@@ -1420,7 +1420,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1447,4 +1447,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* arch/arm/src/sam3u/sam3u_start.c
|
* arch/arm/src/sam3u/sam3u_start.c
|
||||||
* arch/arm/src/chip/sam3u_start.c
|
* arch/arm/src/chip/sam3u_start.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -129,7 +129,7 @@ void __start(void)
|
|||||||
|
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
showprogress('D');
|
showprogress('D');
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
#ifdef HAVE_UART
|
#ifdef HAVE_UART
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -1255,7 +1255,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1282,4 +1282,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* arch/arm/src/stm32/stm32_start.c
|
* arch/arm/src/stm32/stm32_start.c
|
||||||
* arch/arm/src/chip/stm32_start.c
|
* arch/arm/src/chip/stm32_start.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -140,7 +140,7 @@ void __start(void)
|
|||||||
|
|
||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
showprogress('D');
|
showprogress('D');
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* arch/arm/src/str71x/str71x_head.S
|
* arch/arm/src/str71x/str71x_head.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
.globl str71x_prccuinit /* Clock initialization */
|
.globl str71x_prccuinit /* Clock initialization */
|
||||||
.globl up_lowsetup /* Early initialization of UART */
|
.globl up_lowsetup /* Early initialization of UART */
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
.globl up_earlyserialinit /* Early initialization of serial driver */
|
.globl up_earlyserialinit /* Early initialization of serial driver */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
@@ -541,7 +541,7 @@ __flashstart:
|
|||||||
/* Perform early serial initialization */
|
/* Perform early serial initialization */
|
||||||
|
|
||||||
mov fp, #0
|
mov fp, #0
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
bl up_earlyserialinit
|
bl up_earlyserialinit
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/str71x/str71x_serial.c
|
* arch/arm/src/str71x/str71x_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
* still must provide some minimal implementation of up_putc().
|
* still must provide some minimal implementation of up_putc().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which UART with be tty0/console and which tty1? tty2? tty3? */
|
/* Which UART with be tty0/console and which tty1? tty2? tty3? */
|
||||||
|
|
||||||
@@ -1019,7 +1019,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1046,4 +1046,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -146,13 +146,27 @@
|
|||||||
|
|
||||||
/* 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) || !defined(HAVE_RS232_DEVICE)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# elif defined(HAVE_RS232_DEVICE)
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# else
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/* If GPIO IRQ support is defined, then a set of GPIOs must all be included */
|
/* If GPIO IRQ support is defined, then a set of GPIOs must all be included */
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* arch/avr/src/at32uc3/at32uc3_lowconsole.c
|
* arch/avr/src/at32uc3/at32uc3_lowconsole.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -362,7 +362,7 @@ void up_consoleinit(void)
|
|||||||
* by up_earlyserialinit()).
|
* by up_earlyserialinit()).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(HAVE_SERIAL_CONSOLE) && !defined(CONFIG_USE_EARLYSERIALINIT)
|
#if defined(HAVE_SERIAL_CONSOLE) && !defined(USE_EARLYSERIALINIT)
|
||||||
usart_configure(AVR32_CONSOLE_BASE, AVR32_CONSOLE_BAUD, AVR32_CONSOLE_PARITY,
|
usart_configure(AVR32_CONSOLE_BASE, AVR32_CONSOLE_BAUD, AVR32_CONSOLE_PARITY,
|
||||||
AVR32_CONSOLE_BITS, (bool)AVR32_CONSOLE_2STOP);
|
AVR32_CONSOLE_BITS, (bool)AVR32_CONSOLE_2STOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* arch/avr/src/at32uc3/at32uc3_lowinit.c
|
* arch/avr/src/at32uc3/at32uc3_lowinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -95,7 +95,7 @@ void up_lowinit(void)
|
|||||||
* available as soon as possible).
|
* available as soon as possible).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/at32uc3/at32uc3_serial.c
|
* arch/avr/src/at32uc3/at32uc3_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which USART with be tty0/console and which tty1? */
|
/* Which USART with be tty0/console and which tty1? */
|
||||||
|
|
||||||
@@ -808,7 +808,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -835,5 +835,5 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/avr/src/at90usb/at90usb_config.h
|
* arch/avr/src/at90usb/at90usb_config.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -65,13 +65,27 @@
|
|||||||
|
|
||||||
/* 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) || !defined(HAVE_USART_DEVICE)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# elif defined(HAVE_USART_DEVICE)
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# else
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* arch/avr/src/at90usb/at90usb_lowinit.c
|
* arch/avr/src/at90usb/at90usb_lowinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -142,7 +142,7 @@ void up_lowinit(void)
|
|||||||
* available as soon as possible).
|
* available as soon as possible).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/at90usb/at90usb_serial.c
|
* arch/avr/src/at90usb/at90usb_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
@@ -588,7 +588,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -615,5 +615,5 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/avr/src/atmega/atmega_config.h
|
* arch/avr/src/atmega/atmega_config.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -70,13 +70,27 @@
|
|||||||
|
|
||||||
/* 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) || !defined(HAVE_USART_DEVICE)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# elif defined(HAVE_USART_DEVICE)
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# else
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* arch/avr/src/atmega/atmega_lowinit.c
|
* arch/avr/src/atmega/atmega_lowinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -142,7 +142,7 @@ void up_lowinit(void)
|
|||||||
* available as soon as possible).
|
* available as soon as possible).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/atmega/atmega_serial.c
|
* arch/avr/src/atmega/atmega_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which USART with be tty0/console and which tty1? */
|
/* Which USART with be tty0/console and which tty1? */
|
||||||
|
|
||||||
@@ -982,7 +982,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1009,5 +1009,5 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/common/up_initialize.c
|
* arch/avr/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -57,13 +57,24 @@
|
|||||||
* This will probably have to be revisited someday.
|
* This will probably have to be revisited someday.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# else
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
@@ -162,12 +173,14 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the console device driver */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#if defined(USE_SERIALDRIVER)
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
ramlog_consoleinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the netwok */
|
/* Initialize the netwok */
|
||||||
|
|||||||
@@ -172,6 +172,14 @@ extern void lowconsole_init(void);
|
|||||||
# define lowconsole_init()
|
# define lowconsole_init()
|
||||||
#endif
|
#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 */
|
/* Defined in chip/xxx_timerisr.c */
|
||||||
|
|
||||||
extern void up_timerinit(void);
|
extern void up_timerinit(void);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/hc/src/common/up_initialize.c
|
* arch/hc/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -148,12 +148,14 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the console device driver */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#if defined(USE_SERIALDRIVER)
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
ramlog_consoleinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the netwok */
|
/* Initialize the netwok */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/hc/src/common/up_internal.h
|
* arch/hc/src/common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -62,13 +62,24 @@
|
|||||||
|
|
||||||
/* 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)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# else
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/* Check if an interrupt stack size is configured */
|
/* Check if an interrupt stack size is configured */
|
||||||
|
|
||||||
@@ -167,6 +178,12 @@ extern void lowconsole_init(void);
|
|||||||
# define lowconsole_init()
|
# define lowconsole_init()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_RAMLOG_CONSOLE
|
||||||
|
extern void ramlog_consoleinit(void);
|
||||||
|
#else
|
||||||
|
# define ramlog_consoleinit()
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void up_lowputc(char ch);
|
extern void up_lowputc(char ch);
|
||||||
extern void up_puts(const char *str);
|
extern void up_puts(const char *str);
|
||||||
extern void up_lowputs(const char *str);
|
extern void up_lowputs(const char *str);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/hc/src/m9s12/m9s12_serial.c
|
* arch/hc/src/m9s12/m9s12_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -54,13 +54,13 @@
|
|||||||
* disabled if we are using ROM-resident serial I/O
|
* disabled if we are using ROM-resident serial I/O
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(HAVE_SERIAL_CONSOLE) || !defined(CONFIG_USE_SERIALDRIVER) || \
|
#if !defined(HAVE_SERIAL_CONSOLE) || !defined(USE_SERIALDRIVER) || \
|
||||||
defined(CONFIG_HCS12_SERIALMON)
|
defined(CONFIG_HCS12_SERIALMON)
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Yes, which is ttyS0 and which is ttyS1 */
|
/* Yes, which is ttyS0 and which is ttyS1 */
|
||||||
|
|
||||||
@@ -735,7 +735,7 @@ static bool up_txempty(struct uart_dev_s *dev)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
void up_earlyserialinit(void)
|
void up_earlyserialinit(void)
|
||||||
{
|
{
|
||||||
/* Disable all UARTS */
|
/* Disable all UARTS */
|
||||||
@@ -813,7 +813,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -841,4 +841,4 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/common/up_initialize.c
|
* arch/mips/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -149,12 +149,14 @@ void up_initialize(void)
|
|||||||
devnull_register(); /* Standard /dev/null */
|
devnull_register(); /* Standard /dev/null */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the serial device driver */
|
/* Initialize the console device driver */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#if defined(USE_SERIALDRIVER)
|
||||||
up_serialinit();
|
up_serialinit();
|
||||||
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
ramlog_consoleinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the netwok */
|
/* Initialize the netwok */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/common/up_internal.h
|
* arch/mips/common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -62,13 +62,24 @@
|
|||||||
|
|
||||||
/* 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)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# else
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/* Check if an interrupt stack size is configured */
|
/* Check if an interrupt stack size is configured */
|
||||||
|
|
||||||
@@ -177,6 +188,14 @@ extern void lowconsole_init(void);
|
|||||||
# define lowconsole_init()
|
# define lowconsole_init()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Defined in drivers/ramlog.c */
|
||||||
|
|
||||||
|
#ifdef CONFIG_RAMLOG_CONSOLE
|
||||||
|
extern void ramlog_consoleinit(void);
|
||||||
|
#else
|
||||||
|
# define ramlog_consoleinit()
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Debug */
|
/* Debug */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_STACKDUMP
|
#ifdef CONFIG_ARCH_STACKDUMP
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/pic32/pic32mx-lowinit.c
|
* arch/mips/src/pic32/pic32mx-lowinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -195,7 +195,7 @@ void pic32mx_lowinit(void)
|
|||||||
* available as soon as possible).
|
* available as soon as possible).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
up_earlyserialinit();
|
up_earlyserialinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/pic32mx/pic32mx-serial.c
|
* arch/mips/src/pic32mx/pic32mx-serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
* provide some minimal implementation of up_putc.
|
* provide some minimal implementation of up_putc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which UART with be tty0/console and which tty1? The console will always
|
/* Which UART with be tty0/console and which tty1? The console will always
|
||||||
* be ttyS0. If there is no console then will use the lowest numbered UART.
|
* be ttyS0. If there is no console then will use the lowest numbered UART.
|
||||||
@@ -868,7 +868,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -895,5 +895,5 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/common/up_initialize.c
|
* arch/sh/src/common/up_initialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -142,10 +142,12 @@ void up_initialize(void)
|
|||||||
* will have to detect that case.
|
* will have to detect that case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#if defined(USE_SERIALDRIVER)
|
||||||
up_consoleinit();
|
up_consoleinit();
|
||||||
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
#elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
lowconsole_init();
|
lowconsole_init();
|
||||||
|
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
ramlog_consoleinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the netwok */
|
/* Initialize the netwok */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/common/up_internal.h
|
* arch/sh/src/common/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -66,13 +66,24 @@
|
|||||||
* will have to detect that case.
|
* will have to detect that case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
|
#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# undef CONFIG_USE_EARLYSERIALINIT
|
# undef USE_EARLYSERIALINIT
|
||||||
#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
# define CONFIG_USE_SERIALDRIVER 1
|
# undef CONFIG_RAMLOG_CONSOLE
|
||||||
# define CONFIG_USE_EARLYSERIALINIT 1
|
#else
|
||||||
#endif
|
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# undef CONFIG_DEV_LOWCONSOLE
|
||||||
|
# elif defined(CONFIG_DEV_LOWCONSOLE)
|
||||||
|
# undef USE_SERIALDRIVER
|
||||||
|
# undef USE_EARLYSERIALINIT
|
||||||
|
# else
|
||||||
|
# define USE_SERIALDRIVER 1
|
||||||
|
# define USE_EARLYSERIALINIT 1
|
||||||
|
# endif
|
||||||
|
#endig
|
||||||
|
|
||||||
/* Check if an interrupt stack size is configured */
|
/* Check if an interrupt stack size is configured */
|
||||||
|
|
||||||
@@ -166,6 +177,14 @@ extern void lowconsole_init(void);
|
|||||||
# define lowconsole_init()
|
# define lowconsole_init()
|
||||||
#endif
|
#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 */
|
/* Defined in up_watchdog.c */
|
||||||
|
|
||||||
extern void up_wdtinit(void);
|
extern void up_wdtinit(void);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/sh/src/m16c/m16c_head.S
|
* arch/sh/src/m16c/m16c_head.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -244,7 +244,7 @@ __start:
|
|||||||
|
|
||||||
/* Perform early console initialization */
|
/* Perform early console initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
.globl _up_earlyconsoleinit /* Early initialization of console driver */
|
.globl _up_earlyconsoleinit /* Early initialization of console driver */
|
||||||
jsr.a _up_earlyconsoleinit /* Call it */
|
jsr.a _up_earlyconsoleinit /* Call it */
|
||||||
showprogress 'D'
|
showprogress 'D'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/m16c/m16c_serial.c
|
* arch/sh/src/m16c/m16c_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -101,9 +101,9 @@
|
|||||||
/* Are there any UARTs? */
|
/* Are there any UARTs? */
|
||||||
|
|
||||||
#if defined(CONFIG_UART0_DISABLE) && defined(CONFIG_UART1_DISABLE) && defined(CONFIG_UART2_DISABLE)
|
#if defined(CONFIG_UART0_DISABLE) && defined(CONFIG_UART1_DISABLE) && defined(CONFIG_UART2_DISABLE)
|
||||||
# ifdef CONFIG_USE_SERIALDRIVER
|
# ifdef USE_SERIALDRIVER
|
||||||
# error "Serial driver selected, but UARTs not enabled"
|
# error "Serial driver selected, but UARTs not enabled"
|
||||||
# undef CONFIG_USE_SERIALDRIVER
|
# undef USE_SERIALDRIVER
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
# warning "No console is defined"
|
# warning "No console is defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/* Which UART with be tty0/console and which tty1 and tty2? */
|
/* Which UART with be tty0/console and which tty1 and tty2? */
|
||||||
|
|
||||||
@@ -1172,7 +1172,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_USE_SERIALDRIVER */
|
#else /* USE_SERIALDRIVER */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_putc
|
* Name: up_putc
|
||||||
@@ -1199,7 +1199,7 @@ int up_putc(int ch)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USE_SERIALDRIVER */
|
#endif /* USE_SERIALDRIVER */
|
||||||
#elif defined(CONFIG_UART0_SERIAL_CONSOLE) || defined(CONFIG_UART1_SERIAL_CONSOLE)|| defined(CONFIG_UART2_SERIAL_CONSOLE)
|
#elif defined(CONFIG_UART0_SERIAL_CONSOLE) || defined(CONFIG_UART1_SERIAL_CONSOLE)|| defined(CONFIG_UART2_SERIAL_CONSOLE)
|
||||||
# error "A serial console selected, but corresponding UART not enabled"
|
# error "A serial console selected, but corresponding UART not enabled"
|
||||||
#endif /* !CONFIG_UART0_DISABLE && !CONFIG_UART1_DISABLE && !CONFIG_UART2_DISABLE */
|
#endif /* !CONFIG_UART0_DISABLE && !CONFIG_UART1_DISABLE && !CONFIG_UART2_DISABLE */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* arch/sh/src/sh1/sh1_head.S
|
* arch/sh/src/sh1/sh1_head.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
/* Called functions */
|
/* Called functions */
|
||||||
|
|
||||||
.globl _up_lowsetup /* Early initialization of UART */
|
.globl _up_lowsetup /* Early initialization of UART */
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
.globl _up_earlyconsoleinit /* Early initialization of console driver */
|
.globl _up_earlyconsoleinit /* Early initialization of console driver */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
@@ -426,7 +426,7 @@ __start0:
|
|||||||
|
|
||||||
/* Perform early console initialization */
|
/* Perform early console initialization */
|
||||||
|
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
mov.l .Learlyconsole, r0 /* Address of up_earlyconsoleinit */
|
mov.l .Learlyconsole, r0 /* Address of up_earlyconsoleinit */
|
||||||
jsr @r0 /* Call it */
|
jsr @r0 /* Call it */
|
||||||
or r0, r0 /* Delay slot */
|
or r0, r0 /* Delay slot */
|
||||||
@@ -481,7 +481,7 @@ __start0:
|
|||||||
.long _sbss
|
.long _sbss
|
||||||
.Lebss:
|
.Lebss:
|
||||||
.long _ebss
|
.long _ebss
|
||||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
#ifdef USE_EARLYSERIALINIT
|
||||||
.Learlyconsole:
|
.Learlyconsole:
|
||||||
.long _up_earlyconsoleinit
|
.long _up_earlyconsoleinit
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user