source: rtems/bsps/m68k/mvme162/include/bsp.h @ 2afb22b

5
Last change on this file since 2afb22b 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
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: 5.4 KB
Line 
1/*
2 *  This include file contains all MVME162fx board IO definitions.
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-2014.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 *
13 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
14 *  EISCAT Scientific Association. M.Savitski
15 *
16 *  This material is a part of the MVME162 Board Support Package
17 *  for the RTEMS executive. Its licensing policies are those of the
18 *  RTEMS above.
19 */
20
21#ifndef LIBBSP_M68K_MVME162_BSP_H
22#define LIBBSP_M68K_MVME162_BSP_H
23
24#include <bspopts.h>
25#include <bsp/default-initial-extension.h>
26
27#include <rtems.h>
28
29#include <mvme16x_hw.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/*----------------------------------------------------------------*/
36
37typedef volatile struct {
38
39  unsigned char     chipID;
40  unsigned char     chipREV;
41  unsigned char     gen_control;
42  unsigned char     vector_base;
43
44  unsigned long     timer_cmp_1;
45  unsigned long     timer_cnt_1;
46  unsigned long     timer_cmp_2;
47  unsigned long     timer_cnt_2;
48
49  unsigned char     LSB_prescaler_count;
50  unsigned char     prescaler_clock_adjust;
51  unsigned char     time_ctl_2;
52  unsigned char     time_ctl_1;
53
54  unsigned char     time_int_ctl_4;
55  unsigned char     time_int_ctl_3;
56  unsigned char     time_int_ctl_2;
57  unsigned char     time_int_ctl_1;
58
59  unsigned char     dram_err_int_ctl;
60  unsigned char     SCC_int_ctl;
61  unsigned char     time_ctl_4;
62  unsigned char     time_ctl_3;
63
64  unsigned short    DRAM_space_base;
65  unsigned short    SRAM_space_base;
66
67  unsigned char     DRAM_size;
68  unsigned char     DRAM_SRAM_opt;
69  unsigned char     SRAM_size;
70  unsigned char     reserved;
71
72  unsigned char     LANC_error;
73  unsigned char     reserved1;
74  unsigned char     LANC_int_ctl;
75  unsigned char     LANC_berr_ctl;
76
77  unsigned char     SCSI_error;
78  unsigned char     general_inputs;
79  unsigned char     MVME_162_version;
80  unsigned char     SCSI_int_ctl;
81
82  unsigned long     timer_cmp_3;
83  unsigned long     timer_cnt_3;
84  unsigned long     timer_cmp_4;
85  unsigned long     timer_cnt_4;
86
87  unsigned char     bus_clk;
88  unsigned char     PROM_acc_time_ctl;
89  unsigned char     FLASH_acc_time_ctl;
90  unsigned char     ABORT_int_ctl;
91
92  unsigned char     RESET_ctl;
93  unsigned char     watchdog_timer_ctl;
94  unsigned char     acc_watchdog_time_base_sel;
95  unsigned char     reserved2;
96
97  unsigned char     DRAM_ctl;
98  unsigned char     reserved4;
99  unsigned char     MPU_status;
100  unsigned char     reserved3;
101
102  unsigned long     prescaler_count;
103
104} mcchip_regs;
105
106#define mcchip      ((mcchip_regs * const) 0xFFF42000)
107
108/*----------------------------------------------------------------*/
109
110/*
111 * SCC Z8523(0) defines and macros
112 * -------------------------------
113 * Prototypes for the low-level serial io are also included here,
114 * because such stuff is bsp-specific (yet). The function bodies
115 * are in console.c
116 *
117 * NOTE from Eric Vaitl <evaitl@viasat.com>:
118 *
119 * I dropped RTEMS into a 162FX today (the MVME162-513). The 162FX has a
120 * bug in the MC2 chip (revision 1) such that the SCC data register is
121 * not accessible, it has to be accessed indirectly through the SCC
122 * control register.
123 */
124
125enum {portB, portA};
126
127extern bool char_ready(int port, char *ch);
128extern char char_wait(int port);
129extern void char_put(int port, char ch);
130
131#define TX_BUFFER_EMPTY   0x04
132#define RX_DATA_AVAILABLE 0x01
133#define SCC_VECTOR        0x40
134
135typedef volatile struct {
136  unsigned char pad1;
137  volatile unsigned char          csr;
138  unsigned char pad2;
139  volatile unsigned char          buf;
140} scc_regs;
141
142#define scc       ((scc_regs * const) 0xFFF45000)
143
144#define ZWRITE0(port, v)  (scc[port].csr = (unsigned char)(v))
145#define ZREAD0(port)  (scc[port].csr)
146
147#define ZREAD(port, n)  (ZWRITE0(port, n), (scc[port].csr))
148#define ZREADD(port)  (scc[port].csr=0x08, scc[port].csr )
149
150#define ZWRITE(port, n, v) (ZWRITE0(port, n), ZWRITE0(port, v))
151#define ZWRITED(port, v)  (scc[port].csr = 0x08, \
152                           scc[port].csr = (unsigned char)(v))
153/*----------------------------------------------------------------*/
154
155#ifdef M162_INIT
156#undef EXTERN
157#define EXTERN
158#else
159#undef EXTERN
160#define EXTERN extern
161#endif
162
163/*
164 *  This value is the default address location of the 162Bug vector table
165 *  and is also the default start address of the boards DRAM.  This value
166 *  may be different for your specific board based on a number of factors:
167 *
168 *     Default DRAM address:   0x00000000
169 *     Default SRAM address:   0xFFE00000
170 *
171 *  o  If no DRAM can be found by the 162Bug program, it will use SRAM.
172 *  o  The default SRAM address may be different if SRAM mezzanine boards
173 *     are installed on the main board.
174 *  o  Both the DRAM and SRAM addresses can be modified by changing the
175 *     appropriate values in NVRAM using the ENV command at the 162Bug
176 *     prompt.
177 *
178 *  If your board has different values than the defaults, change the value
179 *  of the following define.
180 *
181 */
182#define MOT_162BUG_VEC_ADDRESS  0x00000000
183
184extern rtems_isr_entry M68Kvec[];   /* vector table address */
185
186/* functions */
187
188rtems_isr_entry set_vector(
189  rtems_isr_entry     handler,
190  rtems_vector_number vector,
191  int                 type
192);
193
194/*
195 * Prototypes for methods in the BSP that cross file boundaries.
196 */
197bool char_ready(int port, char *ch);
198
199
200#ifdef __cplusplus
201}
202#endif
203
204#endif
Note: See TracBrowser for help on using the repository browser.