source: rtems/bsps/m68k/include/mcf5206/mcfuart.h @ d7d66d7

Last change on this file since d7d66d7 was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

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

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

Update #3254.

  • Property mode set to 100644
File size: 3.2 KB
[78dea6ce]2 *  Generic UART Serial driver for Motorola Coldfire processors definitions
[00717a3]3 *
[78dea6ce]4 *  Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russian Fed.
5 *  Author: Victor V. Vengerov <>
[00717a3]6 *
[78dea6ce]7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
[c499856]9 *
[00717a3]10 */
12#ifndef __MCFUART_H__
13#define __MCFUART_H__
15#include <termios.h>
16#include "bsp.h"
17#include "mcf5206e.h"
20 * The MCF5206e System Clock Frequency; 54MHz default
21 */
[00717a3]27 * The following structure is a descriptor of single UART channel.
28 * It contains the initialization information about channel and
29 * current operating values
30 */
31typedef struct mcfuart {
[b0e6c06]32   uint32_t            chn;              /* UART channel number */
33   uint8_t             intvec;           /* UART interrupt vector number, or
34                                                0 if polled I/O */
35   void               *tty;              /* termios channel descriptor */
[a94fb39]37   volatile const char     *tx_buf;      /* Transmit buffer from termios */
[b0e6c06]38   volatile uint32_t        tx_buf_len;  /* Transmit buffer length */
39   volatile uint32_t        tx_ptr;      /* Index of next char to transmit*/
40   rtems_isr_entry          old_handler; /* Saved interrupt handler */
[9a73f421]42   tcflag_t                 c_iflag;    /* termios input mode flags */
43   bool                     parerr_mark_flag; /* Parity error processing
[00717a3]44                                                  state */
45} mcfuart;
47/* mcfuart_init --
48 *     This function verifies the input parameters and perform initialization
49 *     of the Motorola Coldfire on-chip UART descriptor structure.
50 *
51 */
[8bc4430b]53mcfuart_init(mcfuart *uart, void *tty, uint8_t   intvec,
54             uint32_t   chn);
56/* mcfuart_reset --
57 *     This function perform the hardware initialization of Motorola
58 *     Coldfire processor on-chip UART controller using parameters
59 *     filled by the mcfuart_init function.
60 */
62mcfuart_reset(mcfuart *uart);
64/* mcfuart_disable --
65 *     This function disable the operations on Motorola Coldfire UART
66 *     controller
67 */
69mcfuart_disable(mcfuart *uart);
71/* mcfuart_set_attributes --
72 *     This function parse the termios attributes structure and perform
73 *     the appropriate settings in hardware.
74 */
76mcfuart_set_attributes(mcfuart *mcf, const struct termios *t);
78/* mcfuart_poll_read --
79 *     This function tried to read character from MCF UART and perform
80 *     error handling.
81 */
83mcfuart_poll_read(mcfuart *uart);
85/* mcfuart_interrupt_write --
86 *     This function initiate transmitting of the buffer in interrupt mode.
87 */
89mcfuart_interrupt_write(mcfuart *uart, const char *buf, size_t len);
91/* mcfuart_poll_write --
92 *     This function transmit buffer byte-by-byte in polling mode.
93 */
95mcfuart_poll_write(mcfuart *uart, const char *buf, size_t len);
97/* mcfuart_stop_remote_tx --
98 *     This function stop data flow from remote device.
99 */
101mcfuart_stop_remote_tx(mcfuart *uart);
103/* mcfuart_start_remote_tx --
104 *     This function resume data flow from remote device.
105 */
107mcfuart_start_remote_tx(mcfuart *uart);
Note: See TracBrowser for help on using the repository browser.