source: rtems/bsps/bfin/bf537Stamp/include/bsp.h @ 9964895

5
Last change on this file since 9964895 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: 2.7 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all board IO definitions for bf537Stamp.
4 *
5 *  Copyright (c) 2006 by Atos Automacao Industrial Ltda.
6 *             written by Alain Schaefer <alain.schaefer@easc.ch>
7 *                    and Antonio Giovanini <antonio@atos.com.br>
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
14
15#ifndef LIBBSP_BFIN_BF537STAMP_BSP_H
16#define LIBBSP_BFIN_BF537STAMP_BSP_H
17
18#ifndef ASM
19
20#include <bspopts.h>
21#include <bsp/default-initial-extension.h>
22
23#include <rtems.h>
24
25#include <libcpu/bf537.h>
26#include <libcpu/memoryRegs.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/* configure data cache to use 16K of each SRAM bank when enabled */
33#define BSP_DATA_CACHE_CONFIG  (3 << DMEM_CONTROL_DMC_SHIFT)
34
35
36/*
37 * PLL and clock setup values:
38 */
39
40/*
41 *  PLL configuration for bf533Stamp
42 *
43 *  XTL   =  27 MHz
44 *  CLKIN =  13 MHz
45 *  VCO   = 391 MHz
46 *  CCLK  = 391 MHz
47 *  SCLK  = 130 MHz
48 */
49
50#define PLL_CSEL    0x0000      /* CCLK = VCO      */
51#define PLL_SSEL    0x0003      /* SCLK = CCLK/3   */
52#define PLL_MSEL    0x3A00      /* VCO = 29xCLKIN  */
53#define PLL_DF      0x0001      /* CLKIN = XTL/2   */
54
55#define CCLK        500000000   /* CORE CLOCK     */
56#define SCLK        100000000   /* SYSTEM CLOCK   */
57
58#define CONSOLE_FORCE_BAUD   57600
59
60/*
61 * Blackfin environment memory map
62 */
63#define L1_DATA_SRAM_A 0xff800000L
64
65#define FIFOLENGTH 0x100
66
67/*
68 *  Simple spin delay in microsecond units for device drivers.
69 *  This is very dependent on the clock speed of the target.
70 */
71
72#define rtems_bsp_delay( microseconds ) \
73  { \
74  }
75
76/* Constants */
77
78#define RAM_START 0
79#define RAM_END   0x4000000
80
81/* functions */
82
83/*
84 * Helper Function to use the EzKits LEDS.
85 * Can be used by the Application.
86 */
87void setLED(uint8_t value);
88
89/*
90 * Helper Function to use the EzKits LEDS
91 */
92uint8_t getLEDs(void);
93void setLEDs(uint8_t value);
94uint8_t getButtons(void);
95
96rtems_isr_entry set_vector(                     /* returns old vector */
97  rtems_isr_entry     handler,                  /* isr routine        */
98  rtems_vector_number vector,                   /* vector number      */
99  int                 type                      /* RTEMS or RAW intr  */
100);
101
102/*
103 *  Internal BSP methods that are used across file boundaries
104 */
105void Init_RTC(void);
106
107/*
108 * Network driver configuration
109 */
110struct rtems_bsdnet_ifconfig;
111extern int bf537Stamp_network_driver_attach(struct rtems_bsdnet_ifconfig *, int);
112
113#define RTEMS_BSP_NETWORK_DRIVER_NAME   "eth1"
114#define RTEMS_BSP_NETWORK_DRIVER_ATTACH bf537Stamp_network_driver_attach
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif /* !ASM */
121
122#endif
Note: See TracBrowser for help on using the repository browser.