source: rtems/bsps/powerpc/gen83xx/include/bsp.h @ 8f8ccee

5
Last change on this file since 8f8ccee 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: 4.3 KB
Line 
1/*===============================================================*\
2| Project: RTEMS generic MPC83xx BSP                              |
3+-----------------------------------------------------------------+
4|                    Copyright (c) 2007                           |
5|                    Embedded Brains GmbH                         |
6|                    Obere Lagerstr. 30                           |
7|                    D-82178 Puchheim                             |
8|                    Germany                                      |
9|                    rtems@embedded-brains.de                     |
10+-----------------------------------------------------------------+
11| The license and distribution terms for this file may be         |
12| found in the file LICENSE in this distribution or at            |
13|                                                                 |
14| http://www.rtems.org/license/LICENSE.                           |
15|                                                                 |
16+-----------------------------------------------------------------+
17| this file contains board specific definitions                   |
18\*===============================================================*/
19
20
21#ifndef LIBBSP_POWERPC_GEN83XX_BSP_H
22#define LIBBSP_POWERPC_GEN83XX_BSP_H
23
24#define BSP_FEATURE_IRQ_EXTENSION
25
26#include <bspopts.h>
27
28#include <libcpu/powerpc-utility.h>
29
30#include <bsp/hwreg_vals.h>
31
32/*
33 * Some symbols defined in the linker command file.
34 */
35
36LINKER_SYMBOL(bsp_ram_start);
37LINKER_SYMBOL(bsp_ram_end);
38LINKER_SYMBOL(bsp_ram_size);
39
40LINKER_SYMBOL(bsp_rom_start);
41LINKER_SYMBOL(bsp_rom_end);
42LINKER_SYMBOL(bsp_rom_size);
43
44LINKER_SYMBOL(bsp_section_text_start);
45LINKER_SYMBOL(bsp_section_text_end);
46LINKER_SYMBOL(bsp_section_text_size);
47
48LINKER_SYMBOL(bsp_section_data_start);
49LINKER_SYMBOL(bsp_section_data_end);
50LINKER_SYMBOL(bsp_section_data_size);
51
52LINKER_SYMBOL(bsp_section_bss_start);
53LINKER_SYMBOL(bsp_section_bss_end);
54LINKER_SYMBOL(bsp_section_bss_size);
55
56LINKER_SYMBOL(bsp_interrupt_stack_start);
57LINKER_SYMBOL(bsp_interrupt_stack_end);
58LINKER_SYMBOL(bsp_interrupt_stack_size);
59
60LINKER_SYMBOL(bsp_work_area_start);
61
62LINKER_SYMBOL(IMMRBAR);
63
64#ifndef ASM
65
66#include <rtems.h>
67#include <bsp/vectors.h>
68#include <bsp/irq.h>
69#include <bsp/default-initial-extension.h>
70
71#ifdef __cplusplus
72extern "C" {
73#endif
74
75/*
76 * indicate, that BSP has no IDE driver
77 */
78#undef RTEMS_BSP_HAS_IDE_DRIVER
79
80/* misc macros */
81#define BSP_ARRAY_CNT(arr) (sizeof(arr)/sizeof(arr[0]))
82
83void *bsp_idle_thread( uintptr_t ignored );
84#define BSP_IDLE_TASK_BODY bsp_idle_thread
85
86/* functions */
87rtems_status_code bsp_register_i2c(void);
88rtems_status_code bsp_register_spi(void);
89
90/*
91 * Network driver configuration
92 */
93struct rtems_bsdnet_ifconfig;
94extern int BSP_tsec_attach(struct rtems_bsdnet_ifconfig *config,int attaching);
95#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_tsec_attach
96
97#ifdef MPC83XX_BOARD_MPC8313ERDB
98  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec2"
99  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec1"
100#else
101  #define RTEMS_BSP_NETWORK_DRIVER_NAME "tsec1"
102  #define RTEMS_BSP_NETWORK_DRIVER_NAME2 "tsec2"
103#endif
104
105#if defined(MPC83XX_BOARD_MPC8349EAMDS)
106/*
107 * i2c EEPROM device name
108 */
109#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
110#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
111
112/*
113 * SPI Flash device name
114 */
115#define RTEMS_BSP_SPI_FLASH_DEVICE_NAME "flash"
116#define RTEMS_BSP_SPI_FLASH_DEVICE_PATH "/dev/spi.flash"
117#endif /* defined(MPC83XX_BOARD_MPC8349EAMDS) */
118
119#if defined(MPC83XX_BOARD_HSC_CM01)
120/*
121 * i2c EEPROM device name
122 */
123#define RTEMS_BSP_I2C_EEPROM_DEVICE_NAME "eeprom"
124#define RTEMS_BSP_I2C_EEPROM_DEVICE_PATH "/dev/i2c1.eeprom"
125
126/*
127 * SPI FRAM device name
128 */
129#define RTEMS_BSP_SPI_FRAM_DEVICE_NAME "fram"
130#define RTEMS_BSP_SPI_FRAM_DEVICE_PATH "/dev/spi.fram"
131#endif /* defined(MPC83XX_BOARD_HSC_CM01) */
132
133extern unsigned int BSP_bus_frequency;
134
135extern uint32_t bsp_clicks_per_usec;
136
137/*
138 *  Convert decrementer value to tenths of microseconds (used by shared timer
139 *  driver).
140 */
141#define BSP_Convert_decrementer( _value ) \
142  ((int) (((_value) * 10) / bsp_clicks_per_usec))
143
144void mpc83xx_zero_4( void *dest, size_t n);
145
146void cpu_init( void);
147
148void bsp_restart(void *addr);
149
150#if defined(HAS_UBOOT)
151  /* Routine to obtain U-Boot environment variables */
152  const char *bsp_uboot_getenv(
153    const char *name
154  );
155#endif
156
157#ifdef __cplusplus
158}
159#endif
160
161#endif /* ASM */
162
163#endif /* GEN83xx */
Note: See TracBrowser for help on using the repository browser.