Files
rtems/cpukit/libmisc/serdbg
Chris Johns 2afb22b7e1 Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step.  It
copied header files from arbitrary locations into the build tree.  The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

* The make preinstall step itself needs time and disk space.

* Errors in header files show up in the build tree copy.  This makes it
  hard for editors to open the right file to fix the error.

* There is no clear relationship between source and build tree header
  files.  This makes an audit of the build process difficult.

* The visibility of all header files in the build tree makes it
  difficult to enforce API barriers.  For example it is discouraged to
  use BSP-specifics in the cpukit.

* An introduction of a new build system is difficult.

* Include paths specified by the -B option are system headers.  This
  may suppress warnings.

* The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step.   All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc.  Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

* cpukit/include

* cpukit/score/cpu/@RTEMS_CPU@/include

* cpukit/libnetworking

The new BSP include directories are:

* bsps/include

* bsps/@RTEMS_CPU@/include

* bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed.  The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.
2018-01-25 08:45:26 +01:00
..

This directory contains three useful packages related to the termios I/O
system:

PACKAGE SERDBGIO
================
"serdbgio" provides the "serial gdb" standard I/O functions "getDebugChar"
and "putDebugChar" for any device driver supporting polled termios mode. 

The initialization function "serdbg_open" opens the v.24 port intended
for the serial debug connection, and sets the desired baud rate. The
"getDebugChar" and "putDebugChar" functions then interact with the
corresponding driver using the calls intended for polled termios
operation.

Specification for the debug device, baud rate and other parameters is
done in a global structure of type "serdbg_conf_t". A configuration
mechanism quite similar to the overall RTEMS configuration is available.

PACKAGE SERDBG
==============
"serdbg" provides a means to optionally initialize and/or start a
serial gdb session as soon as possible, this means as soon as all
drivers have been initialized. The serial debug I/O functions can
either be integrated as special routines of the BSP drivers, or using
the package "serdbgio"

PACKAGE TERMIOS_PRINTK
======================
"termios_printk" provides a standard output function suitable to use
with "printk". It uses the same technique as serdbgio, hooking the
interface between a polled device driver and the termios system. 


REQUIREMENTS
============

- These two packages can be used with any polled termios device
driver. 
- For standard initialization, they need a modified "bsppost.c"
to perform the initialization calls.

USAGE
=====

For using these packages add the following to your "init" module or
your "system.h" file (Note: most macro settings fall back to a
default, if not set.):

/*
 * CONFIGURE_USE_SERDBG
 * set this macro, if you want to connect gdb over a serial line
 * when set, the debug stub will be connected after driver
 * initialization in "bsppost.c"
 */
#define CONFIGURE_USE_SERDBG


/*
 * CONFIGURE_SERDBG_SKIP_INIT_BKPT
 * set this macro, if you do not want the gdb interface to wait for a
 * debugger connection directly after initialization
 * If you set this macro, the gdb stub will only hook various
 * exception vectors when called from "bsppost.c".
 */
/* #define CONFIGURE_SERDBG_SKIP_INIT_BKPT */

/*
 * CONFIGURE_SERDBG_USE_POLLED_TERMIOS
 * set this macro, if you want "serdbgio" to provide the I/O 
 * functions for the serial gdb connection
 */
#define CONFIGURE_SERDBG_USE_POLLED_TERMIOS

/*
 * CONFIGURE_SERDBG_DEVNAME
 * use this macro to specify the serial device to use
 * for "serdbgio". 
 * Only used, when CONFIGURE_SERDBG_USE_POLLED_TERMIOS is set
 */
#define CONFIGURE_SERDBG_DEVNAME "/dev/tty03"

/*
 * CONFIGURE_SERDBG_BAUDRATE
 * use this macro to specify the baud rate to use
 * for "serdbgio". 
 * Only used, when CONFIGURE_SERDBG_USE_POLLED_TERMIOS is set
 */
#define CONFIGURE_SERDBG_BAUDRATE 57600

/*
 * CONFIGURE_SERDBG_CALLOUT
 * use this macro to specify a routine that will called during I/O polling
 * Only used, when CONFIGURE_SERDBG_USE_POLLED_TERMIOS is set
 * This function of type "void pollfnc(void)" can be used for e.g.
 * tickling a watchdog
 */
/* #define CONFIGURE_SERDBG_CALLOUT tickle_my_watchdog_fnc */

#include <serdbgcnf.h>

/*
 * CONFIGURE_USE_TERMIOS_PRINTK
 * set this macro, if you want printk output to be sent to a serial
 * driver using the polled termios interface
 * when set, the printk output function will be connected after driver
 * initialization in "bsppost.c"
 */
#define CONFIGURE_USE_TERMIOS_PRINTK

/*
 * CONFIGURE_TERMIOS_PRINTK_DEVNAME
 * use this macro to specify the serial device to use
 * for printk output. 
 * Only used, when CONFIGURE_USE_TERMIOS_PRINTK is set
 */
#define CONFIGURE_TERMIOS_PRINTK_DEVNAME "/dev/console"

/*
 * CONFIGURE_TERMIOS_PRINTK_BAUDRATE
 * use this macro to specify the baudrate to use
 * for printk output. 
 * Only used, when CONFIGURE_USE_TERMIOS_PRINTK is set
 */
#define CONFIGURE_TERMIOS_PRINTK_BAUDRATE 9600

/*
 * CONFIGURE_TERMIOS_PRINTK_CALLOUT
 * use this macro to specify a routine that will called during I/O polling
 * This function of type "void pollfnc(void)" can be used for e.g.
 * tickling a watchdog
 */
/* #define CONFIGURE_TERMIOS_PRINTK_CALLOUT tickle_my_watchdog_fnc */

#include <termios_printk_cnf.h>