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

5
Last change on this file since 2afb22b 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: 1.6 KB
Line 
1/*  mrm332.h
2 */
3
4#ifndef _MRM332_H_
5#define _MRM332_H_
6
7/* SIM_MM (SIM Module Mapping) determines the location of the control
8   register block. When MM=0, register addresses range fom 0x7ff000 to
9   0x7FFFFF. When MM=1, register addresses range from 0xfff000 to
10   0xffffff. */
11#define SIM_MM 1
12
13/* Interrupt related definitions */
14#define SIM_IARB 15
15#define QSM_IARB 10
16
17#define MRM_PIV 64
18#define ISRL_PIT 4              /* zero disables PIT */
19
20#define EFI_QIVR 66             /* 66=>SCI and 67=>QSPI interrupt */
21#define ISRL_QSPI 0
22
23#define EFI_SPINT 24            /* spurious interrupt */
24#define EFI_INT1 25             /* CTS interrupt */
25#define ISRL_SCI 6
26
27/* System Clock definitions */
28#define XTAL 32768.0            /* crystal frequency in Hz */
29
30/* Specify the CPU frequency. Do not specify a faster clock than your */
31/* CPU is rated for! */
32#if 0
33/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
34#define MRM_W 0                 /* system clock parameters */
35#define MRM_X 0
36#define MRM_Y 0x3f
37#endif
38
39#if 0
40/* 16.77722 MHz: */
41#define MRM_W 1                 /* system clock parameters */
42#define MRM_X 1
43#define MRM_Y 0x0f
44#endif
45
46#if 1
47/* 25.16582 MHz: */
48#define MRM_W 1                 /* system clock parameters */
49#define MRM_X 1
50#define MRM_Y 0x17
51#define SET_EDIV
52#endif
53
54#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
55#define SCI_BAUD 19200          /* RS232 Baud Rate */
56
57/* macros/functions */
58
59#ifndef ASM
60
61/*
62 *  This prototype really should have the noreturn attribute but
63 *  that causes a warning. Not sure how to fix that.
64 */
65/*   static void reboot(void) __attribute__ ((noreturn)); */
66static void reboot(void);
67__inline__ static void reboot() {__asm__ ("trap #15; .word 0x0063");}
68
69#endif /* ASM */
70
71#endif /* _MRM_H_ */
Note: See TracBrowser for help on using the repository browser.