Fixes for serial monitor

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2320 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-12-11 15:29:11 +00:00
parent de46ca27ae
commit 1feb36a270
9 changed files with 76 additions and 88 deletions

View File

@ -585,7 +585,7 @@ configs/c5471evm
This port is complete, verified, and included in the NuttX release.
configs/demo9s12ne64
Feescale DMO9S12NE64 board based on the MC9S12NE64 hc12 cpu. This
Feescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This
port uses the m68hc12 GCC toolchain. STATUS: Under development.
configs/eagle100

View File

@ -50,7 +50,7 @@ NuttX buildroot Toolchain
building a Cortex-M3 toolchain for Cygwin under Windows.
HC12/DEMO9S12NEC64-specific Configuration Options
HCS12/DEMO9S12NEC64-specific Configuration Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONFIG_ARCH - Identifies the arch/ subdirectory. This should
@ -64,7 +64,7 @@ HC12/DEMO9S12NEC64-specific Configuration Options
CONFIG_ARCH_architecture - For use in C code:
CONFIG_ARCH_HC12=y
CONFIG_ARCH_HCS12=y
CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
@ -112,31 +112,34 @@ HC12/DEMO9S12NEC64-specific Configuration Options
the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until
the delay actually is 100 seconds.
HC12 specific chip initialization
HCS12 specific chip initialization
HC12 specific device driver settings
HCS12 specific device driver settings
CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
CONFIG_HCS12_SERIALMON - Indicates that the target systems uses
the Freescale serial bootloader.
CONFIG_SCIO_SERIAL_CONSOLE - selects the SCIO for the
console and ttys0 (default is the UART0).
CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
CONFIG_SCIO_RXBUFSIZE - Characters are buffered as received.
This specific the size of the receive buffer
CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
CONFIG_SCIO_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer
CONFIG_UARTn_BAUD - The configure BAUD of the UART.
CONFIG_SCIO_BAUD - The configure BAUD of the UART.
CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8.
CONFIG_SCIO_BITS - The number of bits. Must be either 7 or 8.
CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity, 3=mark 1, 4=space 0
CONFIG_SCIO_PARTIY - 0=no parity, 1=odd parity, 2=even parity, 3=mark 1, 4=space 0
CONFIG_UARTn_2STOP - Two stop bits
CONFIG_SCIO_2STOP - Two stop bits
Configurations
^^^^^^^^^^^^^^
Each Freescale HC12 configuration is maintained in a sudirectory and
Each Freescale HCS12 configuration is maintained in a sudirectory and
can be selected as follow:
cd tools

View File

@ -87,16 +87,16 @@ extern "C" {
* Public Function Prototypes
************************************************************************************/
/************************************************************************************
* Name: hc12_boardinitialize
* Name: hcs12_boardinitialize
*
* Description:
* All HC12 architectures must provide the following entry point. This entry point
* All HCS12 architectures must provide the following entry point. This entry point
* is called early in the intitialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
EXTERN void hc12_boardinitialize(void);
EXTERN void hcs12_boardinitialize(void);
/************************************************************************************
* Button support.

View File

@ -71,7 +71,7 @@
#
CONFIG_ARCH=hc
CONFIG_ARCH_HC=y
CONFIG_ARCH_HC12=y
CONFIG_ARCH_HCS12=y
CONFIG_ARCH_CHIP=mc9s12ne64
CONFIG_ARCH_CHIP_MCS92S12NEC64=y
CONFIG_ARCH_BOARD=demo9s12ne64
@ -93,58 +93,27 @@ CONFIG_ARCH_DMA=n
#
# MC9S12NEC64 specific serial device driver settings
#
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
# console and ttys0 (default is the UART1).
# CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
# CONFIG_HCS12_SERIALMON - Indicates that the target systems uses
# the Freescale serial bootloader.
# CONFIG_SCIO_SERIAL_CONSOLE - selects the SCIO for the
# console and ttys0 (default is the SCIO).
# CONFIG_SCIO_RXBUFSIZE - Characters are buffered as received.
# This specific the size of the receive buffer
# CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
# CONFIG_SCIO_TXBUFSIZE - Characters are buffered before
# being sent. This specific the size of the transmit buffer
# CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be
# CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8.
# CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
# CONFIG_UARTn_2STOP - Two stop bits
# CONFIG_SCIO_BAUD - The configure BAUD of the UART. Must be
# CONFIG_SCIO_BITS - The number of bits. Must be either 7 or 8.
# CONFIG_SCIO_PARTIY - 0=no parity, 1=odd parity, 2=even parity
# CONFIG_SCIO_2STOP - Two stop bits
#
CONFIG_UART1_SERIAL_CONSOLE=y
CONFIG_UART2_SERIAL_CONSOLE=n
CONFIG_UART3_SERIAL_CONSOLE=n
CONFIG_UART4_SERIAL_CONSOLE=n
CONFIG_UART5_SERIAL_CONSOLE=n
CONFIG_UART1_TXBUFSIZE=256
CONFIG_UART2_TXBUFSIZE=256
CONFIG_UART3_TXBUFSIZE=256
CONFIG_UART4_TXBUFSIZE=256
CONFIG_UART5_TXBUFSIZE=256
CONFIG_UART1_RXBUFSIZE=256
CONFIG_UART2_RXBUFSIZE=256
CONFIG_UART3_RXBUFSIZE=256
CONFIG_UART4_RXBUFSIZE=256
CONFIG_UART5_RXBUFSIZE=256
CONFIG_UART1_BAUD=115200
CONFIG_UART2_BAUD=115200
CONFIG_UART3_BAUD=115200
CONFIG_UART4_BAUD=115200
CONFIG_UART5_BAUD=115200
CONFIG_UART1_BITS=8
CONFIG_UART2_BITS=8
CONFIG_UART3_BITS=8
CONFIG_UART4_BITS=8
CONFIG_UART5_BITS=8
CONFIG_UART1_PARITY=0
CONFIG_UART2_PARITY=0
CONFIG_UART3_PARITY=0
CONFIG_UART4_PARITY=0
CONFIG_UART5_PARITY=0
CONFIG_UART1_2STOP=0
CONFIG_UART2_2STOP=0
CONFIG_UART3_2STOP=0
CONFIG_UART4_2STOP=0
CONFIG_UART5_2STOP=0
CONFIG_HCS12_SERIALMON=y
CONFIG_SCIO_SERIAL_CONSOLE=y
CONFIG_SCIO_TXBUFSIZE=256
CONFIG_SCIO_RXBUFSIZE=256
CONFIG_SCIO_BAUD=115200
CONFIG_SCIO_BITS=8
CONFIG_SCIO_PARITY=0
CONFIG_SCIO_2STOP=0
#
# MC9S12NEC64 specific SSI device driver settings

View File

@ -43,7 +43,7 @@ MEMORY
sram (rwx) : ORIGIN = 0x3800, LENGTH = 8K
}
OUTPUT_ARCH(m68hc12)
OUTPUT_ARCH(m68hcs12)
ENTRY(_stext)
SECTIONS
{

View File

@ -65,14 +65,26 @@
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: hc12_spiinitialize
* Name: up_ledinit
*
* Description:
* Configure and initialize on-board LEDs
*
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
extern void up_ledinit(void);
#endif
/************************************************************************************
* Name: hcs12_spiinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the STM3210E-EVAL board.
*
************************************************************************************/
extern void weak_function hc12_spiinitialize(void);
extern void weak_function hcs12_spiinitialize(void);
#endif /* __ASSEMBLY__ */

View File

@ -60,25 +60,25 @@
************************************************************************************/
/************************************************************************************
* Name: hc12_boardinitialize
* Name: hcs12_boardinitialize
*
* Description:
* All HC12 architectures must provide the following entry point. This entry point
* All INCLUDE_HCS12_ARCH architectures must provide the following entry point. This entry point
* is called early in the intitialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
void hc12_boardinitialize(void)
void hcs12_boardinitialize(void)
{
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
* hc12_spiinitialize() has been brought into the link.
* hcs12_spiinitialize() has been brought into the link.
*/
#if defined(CONFIG_HC12_SPI)
if (hc12_spiinitialize)
#if defined(CONFIG_INCLUDE_HCS12_ARCH_SPI)
if (hcs12_spiinitialize)
{
hc12_spiinitialize();
hcs12_spiinitialize();
}
#endif

View File

@ -79,6 +79,10 @@
/****************************************************************************
* Name: up_ledinit
*
* Description:
* Configure and initialize on-board LEDs
*
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS

View File

@ -48,7 +48,7 @@
#include "demo9s12ne64.h"
#if defined(CONFIG_HC12_SPI)
#if defined(CONFIG_HCS12_SPI)
/************************************************************************************
* Definitions
@ -81,31 +81,31 @@
************************************************************************************/
/************************************************************************************
* Name: hc12_spiinitialize
* Name: hcs12_spiinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the HC1210E-EVAL board.
* Called to configure SPI chip select GPIO pins for the DEMO9S12NE64 board.
*
************************************************************************************/
void weak_function hc12_spiinitialize(void)
void weak_function hcs12_spiinitialize(void)
{
}
/****************************************************************************
* Name: hc12_spiselect and hc12_spistatus
* Name: hcs12_spiselect and hcs12_spistatus
*
* Description:
* The external functions, hc12_spiselect and hc12_spistatus must be
* The external functions, hcs12_spiselect and hcs12_spistatus must be
* provided by board-specific logic. They are implementations of the select
* and status methods of the SPI interface defined by struct spi_ops_s (see
* include/nuttx/spi.h). All other methods (including up_spiinitialize())
* are provided by common HC12 logic. To use this common SPI logic on your
* are provided by common HCS12 logic. To use this common SPI logic on your
* board:
*
* 1. Provide logic in hc12_boardinitialize() to configure SPI chip select
* 1. Provide logic in hcs12_boardinitialize() to configure SPI chip select
* pins.
* 2. Provide hc12_spiselect() and hc12_spistatus() functions in your
* 2. Provide hcs12_spiselect() and hcs12_spistatus() functions in your
* board-specific logic. These functions will perform chip selection and
* status operations using GPIOs in the way your board is configured.
* 3. Add a calls to up_spiinitialize() in your low level application
@ -117,13 +117,13 @@ void weak_function hc12_spiinitialize(void)
*
****************************************************************************/
void hc12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, boolean selected)
void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, boolean selected)
{
}
ubyte hc12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
ubyte hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
{
return SPI_STATUS_PRESENT;
}
#endif /* CONFIG_HC12_SPI */
#endif /* CONFIG_HCS12_SPI */