source: rtems/bsps/m68k/mvme147/include/bsp.h @ d7d66d7

5
Last change on this file since d7d66d7 was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

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.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all MVME147 board IO definitions.
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.org/license/LICENSE.
11 *
12 *  MVME147 port for TNI - Telecom Bretagne
13 *  by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
14 *  May 1996
15 */
16
17#ifndef LIBBSP_M68K_MVME147_BSP_H
18#define LIBBSP_M68K_MVME147_BSP_H
19
20#include <bspopts.h>
21#include <bsp/default-initial-extension.h>
22
23#include <rtems.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/* Constants */
30
31#define RAM_START 0x00005000
32#define RAM_END   0x00400000
33
34  /* MVME 147 Peripheral controller chip
35     see MVME147/D1, 3.4 */
36
37struct pcc_map {
38  /* 32 bit registers */
39  uint32_t         dma_table_address;            /* 0xfffe1000 */
40  uint32_t         dma_data_address;             /* 0xfffe1004 */
41  uint32_t         dma_bytecount;                /* 0xfffe1008 */
42  uint32_t         dma_data_holding;             /* 0xfffe100c */
43
44  /* 16 bit registers */
45  uint16_t         timer1_preload;               /* 0xfffe1010 */
46  uint16_t         timer1_count;                 /* 0xfffe1012 */
47  uint16_t         timer2_preload;               /* 0xfffe1014 */
48  uint16_t         timer2_count;                 /* 0xfffe1016 */
49
50  /* 8 bit registers */
51  uint8_t         timer1_int_control;            /* 0xfffe1018 */
52  uint8_t         timer1_control;                /* 0xfffe1019 */
53  uint8_t         timer2_int_control;            /* 0xfffe101a */
54  uint8_t         timer2_control;                /* 0xfffe101b */
55
56  uint8_t         acfail_int_control;            /* 0xfffe101c */
57  uint8_t         watchdog_control;              /* 0xfffe101d */
58
59  uint8_t         printer_int_control;           /* 0xfffe101e */
60  uint8_t         printer_control;               /* 0xfffe102f */
61
62  uint8_t         dma_int_control;               /* 0xfffe1020 */
63  uint8_t         dma_control;                   /* 0xfffe1021 */
64  uint8_t         bus_error_int_control;         /* 0xfffe1022 */
65  uint8_t         dma_status;                    /* 0xfffe1023 */
66  uint8_t         abort_int_control;             /* 0xfffe1024 */
67  uint8_t         table_address_function_code;   /* 0xfffe1025 */
68  uint8_t         serial_port_int_control;       /* 0xfffe1026 */
69  uint8_t         general_purpose_control;       /* 0xfffe1027 */
70  uint8_t         lan_int_control;               /* 0xfffe1028 */
71  uint8_t         general_purpose_status;        /* 0xfffe1029 */
72  uint8_t         scsi_port_int_control;         /* 0xfffe102a */
73  uint8_t         slave_base_address;            /* 0xfffe102b */
74  uint8_t         software_int_1_control;        /* 0xfffe102c */
75  uint8_t         int_base_vector;               /* 0xfffe102d */
76  uint8_t         software_int_2_control;        /* 0xfffe102e */
77  uint8_t         revision_level;                /* 0xfffe102f */
78};
79
80#define pcc      ((volatile struct pcc_map * const) 0xfffe1000)
81
82#define z8530 0xfffe3001
83
84/* interrupt vectors - see MVME146/D1 4.14 */
85#define PCC_BASE_VECTOR        0x40 /* First user int */
86#define SCC_VECTOR             PCC_BASE_VECTOR+3
87#define TIMER_1_VECTOR         PCC_BASE_VECTOR+8
88#define TIMER_2_VECTOR         PCC_BASE_VECTOR+9
89#define SOFT_1_VECTOR          PCC_BASE_VECTOR+10
90#define SOFT_2_VECTOR          PCC_BASE_VECTOR+11
91
92#define USE_CHANNEL_A   1                /* 1 = use channel A for console */
93#define USE_CHANNEL_B   0                /* 1 = use channel B for console */
94
95#if (USE_CHANNEL_A == 1)
96#define CONSOLE_CONTROL  0xfffe3002
97#define CONSOLE_DATA     0xfffe3003
98#elif (USE_CHANNEL_B == 1)
99#define CONSOLE_CONTROL  0xfffe3000
100#define CONSOLE_DATA     0xfffe3001
101#endif
102
103extern rtems_isr_entry M68Kvec[];   /* vector table address */
104
105/* functions */
106
107rtems_isr_entry set_vector(
108  rtems_isr_entry     handler,
109  rtems_vector_number vector,
110  int                 type
111);
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif
Note: See TracBrowser for help on using the repository browser.