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 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.3 KB
RevLine 
[f610e83f]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|                                                                 |
[c499856]14| http://www.rtems.org/license/LICENSE.                           |
[f610e83f]15|                                                                 |
16+-----------------------------------------------------------------+
17| this file contains board specific definitions                   |
18\*===============================================================*/
19
[e570c313]20
[4784214a]21#ifndef LIBBSP_POWERPC_GEN83XX_BSP_H
22#define LIBBSP_POWERPC_GEN83XX_BSP_H
[f610e83f]23
[8a54204]24#define BSP_FEATURE_IRQ_EXTENSION
[574fb67]25
[8a54204]26#include <bspopts.h>
[574fb67]27
[ac7af4a]28#include <libcpu/powerpc-utility.h>
[574fb67]29
[42bf1b9]30#include <bsp/hwreg_vals.h>
[f610e83f]31
[574fb67]32/*
33 * Some symbols defined in the linker command file.
34 */
35
[d9be8024]36LINKER_SYMBOL(bsp_ram_start);
37LINKER_SYMBOL(bsp_ram_end);
38LINKER_SYMBOL(bsp_ram_size);
[574fb67]39
[d9be8024]40LINKER_SYMBOL(bsp_rom_start);
41LINKER_SYMBOL(bsp_rom_end);
42LINKER_SYMBOL(bsp_rom_size);
[574fb67]43
[d9be8024]44LINKER_SYMBOL(bsp_section_text_start);
45LINKER_SYMBOL(bsp_section_text_end);
46LINKER_SYMBOL(bsp_section_text_size);
[574fb67]47
[d9be8024]48LINKER_SYMBOL(bsp_section_data_start);
49LINKER_SYMBOL(bsp_section_data_end);
50LINKER_SYMBOL(bsp_section_data_size);
[574fb67]51
[d9be8024]52LINKER_SYMBOL(bsp_section_bss_start);
53LINKER_SYMBOL(bsp_section_bss_end);
54LINKER_SYMBOL(bsp_section_bss_size);
[574fb67]55
[d9be8024]56LINKER_SYMBOL(bsp_interrupt_stack_start);
57LINKER_SYMBOL(bsp_interrupt_stack_end);
58LINKER_SYMBOL(bsp_interrupt_stack_size);
[574fb67]59
[d9be8024]60LINKER_SYMBOL(bsp_work_area_start);
[574fb67]61
[d9be8024]62LINKER_SYMBOL(IMMRBAR);
[574fb67]63
[f610e83f]64#ifndef ASM
65
66#include <rtems.h>
67#include <bsp/vectors.h>
[8a54204]68#include <bsp/irq.h>
[a052181]69#include <bsp/default-initial-extension.h>
70
71#ifdef __cplusplus
72extern "C" {
73#endif
[574fb67]74
[f610e83f]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
[b5548e5]83void *bsp_idle_thread( uintptr_t ignored );
84#define BSP_IDLE_TASK_BODY bsp_idle_thread
[f610e83f]85
[b5548e5]86/* functions */
[e35c696]87rtems_status_code bsp_register_i2c(void);
[55a685b]88rtems_status_code bsp_register_spi(void);
[f610e83f]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
[7a752161]97#ifdef MPC83XX_BOARD_MPC8313ERDB
[8a54204]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
[574fb67]104
[7a752161]105#if defined(MPC83XX_BOARD_MPC8349EAMDS)
[e35c696]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
[55a685b]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"
[7a752161]117#endif /* defined(MPC83XX_BOARD_MPC8349EAMDS) */
[42bf1b9]118
[7a752161]119#if defined(MPC83XX_BOARD_HSC_CM01)
[42bf1b9]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"
[7a752161]131#endif /* defined(MPC83XX_BOARD_HSC_CM01) */
[55a685b]132
[574fb67]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
[699c2be]146void cpu_init( void);
147
[d4e2f337]148void bsp_restart(void *addr);
149
[b5548e5]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
[f610e83f]157#ifdef __cplusplus
158}
159#endif
160
161#endif /* ASM */
162
163#endif /* GEN83xx */
Note: See TracBrowser for help on using the repository browser.